Parallax Products' P2 code. {REQUEST P1 CONVERSION TO P2}
I have some parallax products that I need P2 code for, I do not have the skills to covert p1 to p2, specifically if the p1 code contains PASM.
Is there already a place to request p2 objects for parallax products which already have p1 objects.
Clearly every P1 product will eventually get done, but until then, can I request?
Like the:
Perhaps a designated thread to request conversions?
( I am converting the Model Railroad Controller and my WX module code and schematics to P2, and posting the updates in those threads, when its done, but small amounts of the code needs pasm conversion, the rest is just conversion work in spin ->spin2 which I can likely do myself)
I guess an alternative is the MPU 9DOF 27$ "click" chip since there is code for that in the parallax store, but the LSM6DSL is missing its code in the store/OBEX, so its useless to SELL IT, if you can't even use it as a customer, even the manufacturers page has no example P2 code.
So if you want movement sensor on the p2 you are limited to the MPU9DOF, the only one with available code.
Comments
Hi
I have the same problem.
It seems, that only new products and SW are supported
BR Magneto
The P2 doesn't have counters like the P1, but it does have smart pins that can measure pulses, and built in math functions that will do what Beau is doing in that code. I don't have a Memsic 2125 else I'd try it myself.
One of the many neat things that the P2 allows is inline PASM. I wondered what it would take to measure high-going pulse in the P2 that mimics the use of the counter in the P1. It turns out to be very easy. This works, and follows what Beau is doing (wait for pin to be low, reset, wait for pulse to finish, return result).
Edit: Upgraded from one pin to two pins -- you should be able to read the Memsic pulses with this.
The Memsic PASM1 code takes the x/y readings and converts them to polar coordinates. Spin2 has a built-in command for this called xypol() -- but the angle is returned in a 32-bit angle unit ($1_0000_0000 = 360 degrees). Inline PASM2 comes to the rescue again. You should be able to take the raw ticks values measured by xy_ticks() and run them through this:
My test results match this online converter:
-- https://keisan.casio.com/exec/system/1223526375#!
Great little routine! I just put it in my hex robot program to replace a SPIN version that I was using. Its faster and simpler.