Spin2 Code Generator (Work in Progress, most things working)
Rayman
Posts: 14,633
P2S is a program to automatically generate Spin2 code for you.
It's a conversion of the P2C C code generator from C to Spin2.
Wasn't sure would work, but so far seems OK.
Most objects are working at the moment:
uSD
SimpleVGA
NeoPixel
I2C bus scanner
NCO
Sound
Servo
SmartPin
Global Digital Filters
DAC
ADC
The others need a few more hours of work to convert from C to Spin2, if don't run into any issues...
Note: Max file size seems to have decreased... The .zip version is too big now, but just fits with 7-Zip.
Update: Sound and servo now working.
Comments
broke vga trying to make file smaller, but just posted fixed version...
Got sound and servo objects working...
got smarpins, DAC, and ADC working. Not sure if ADC from neighboring pins is working or not though....
@Rayman this is a handy little tool! I was checking it out because I was hoping to convert some C code to spin2 with it, but now I see how the tool is used. It doesn't appear to be that, but I really like it! Especially for the smartpins!
Thanks for trying it @ke4pjw !
Feedback is some motivation for completing it...
It can't convert C to Spin2, but it can do the same things in C and Spin2 with P2C for C and P2S for Spin2. So, I guess that could interesting.
Actually use P2C and P2S myself sometimes, when want to test some hardware fast without digging through all my files...