ColorPAL and SimpleIDE code (Propeller C)
NikosG
Posts: 705
Does anyone have code in Propeller C able to run with SimleIDE for the ColorPAL sensor?
Tutorials with Propeller C - Simple Devices have a lot of examples for many sensors, but no one example for the use of the ColorPAL .
Of course there is a very good examlpe of code in SPIN language by Phil Pilgrim but nothing with Propeller C.
Tutorials with Propeller C - Simple Devices have a lot of examples for many sensors, but no one example for the use of the ColorPAL .
Of course there is a very good examlpe of code in SPIN language by Phil Pilgrim but nothing with Propeller C.
Comments
Spin2cpp provided a C code version of Phil's project quite easily. I copied the files into SimpleIDE and built a new C project that compiles. PASM portions of the code were translated to inline GAS code in two of the .c files. I don't have a ColorPal, so I can't test this, but it "should" provide a good starting point for your own project.
PhiPi's ColorPal_sense in C:
ColorPAL_sense.zip
dgately
Thank you!!!!!
It works!!!
The C code has the same result as the Spin code.
It returns (in the screen) the 3 parameters of red, green and blue color, that gets the sensor
Now I'm trying to change the code you attached in order to make the sensor to recognize the color of an object ! You wiil have a feedback very soon I hope......
I had no idea about "Spin2cpp" ! it is a really cool software application!!!!