Analog to Digital C Function
Discovery
Posts: 606
I cannot find a C function for using the ADC on the Propeller Activity Board. In the SimpleIDE there is a C function description for using the DAC but I want the ADC.
Can it be supplied?
Discovery
Can it be supplied?
Discovery
Comments
Simple Libraries Convert folder
ADC DC Propeller Activity Board Library
ADC AC Proeller Activity Board Library
\SimpleIDE\Learn\Examples\Circuits
The program is "measure volts.c" The full IDE project is "measure volts.side"
The lesson starts on this page:
http://learn.parallax.com/propeller-c-simple-circuits/measure-volts
There is a following lesson on using the DAC.
In post 26 of:
http://forums.parallax.com/showthread.php/155501-Pixy-for-Propeller?p=1278851#post1278851
I have a c program that uses the ADC function to read voltage values from the Pixy image sensor and control the motion of the ActivityBot (uses the Activity Board.)
Hope this helps
Tom
How do I get the the learn update files to be seen by my IDE\project file set?
That appears to be my problem. The updates are being read when I perform the BUILD.
Discovery
http://learn.parallax.com/propeller-c-set-simpleide/update-your-learn-folder
Replace the Documents/SimpleIDE/Learn folder with the Learn folder you downloaded.
Remove any -I or -L entries from the Project Manager list.
Make sure "Auto Include Simple Libraries" is checked.
I began following the instructions provided by Andy for updating the learn file but ran into a problem understanding the instructions to rename the learn file then replace the learn file with the downloaded learn file. It did not make sense to me so I copied all my programs contained in My Projects to a thumb drive then erased all IDE files and started from scratch.
The Simple IDE was down loaded and installed as brand new. I am trying to get the Measure Volts application as called out in "Learn.Parallax" to operate so that I can use a version of it in my application. The compiler flagged the instruction #include "adcDCpropab.h" as an error. So, I downloaded the Learn file update, unzipped it and copied the files into the Learn folder under the Documents\IDE folder. The compiler got past the #include statement but flagged the putChar(Home); instruction as an error.
I have not been able to clear this error.
You mentioned to make sure the "Auto Include Simple Libraries" is checked. I cannot find the block to be checked.
Someone sent me the Measure Volts code in a file that was down loaded and run. It worked perfectly but was not in My Projects folder. This program was lost when I cleared out the Simple IDE files.
Sincerely,
Discovery
The "Auto Include Simple Libraries" checkbox is in the Properties General tab (F6 or Menu -> Tools -> Properties).
There was a problem with the spelling and case of some adc libraries at one time, but that should have been cleaned up already.
Can you capture the output of your build status? Right click, select all; right click, copy; paste to forum post. This is being simplified too.
I got it...
There was a type "O" in one instruction but the Build compiler could not catch it.
Measure volts DC works perfectly.
Now I can proceed with my project.
Thank you.
Discovery
If there is a type-o in the instruction, please provide more information so that it can be fixed.
Thanks.
The working analog to digital converter code was modified and inserted in a COG of my main propeller program that servos the z-axis position of my new plasma cutting machine. It works just fine.
Sincerely,
Discovery