My wixel’s A to D converter is not operating as expected. When I connect 3.3 volts from the wixel’s output pin ( the pin next to the reset pin ) to any one of the ADC pins (P0_0 through P0_5), it has no impact on the adcRead() values returned . In the same way, when I connect a jumper wire from ground to any one of those same ADC pins, the values do not change to zero ( or close to zero) as expected when I read the pin with adcRead().
I will paste my program below. It is based on the wireless_serial app provided on the Pololu site. I highlighted the code most directly involved in the ADC pins.
I see nothing on the forums about my problem (not a good sign). Is there something I am not configuring correctly before I use the ADC port pins? I read the adc.h file and tried to research every forum and all the application programs to no avail. In truth, the example code for using the ADC pins is very simple, so I feel humbled for asking for help.
The problem in a nut shell, The ADC port pins return static values when I call adcRead() and they do not change as I apply 3.3 volts or Zero volts. The most applicable code is below in the executeCommand() function.
Anyone willing to give me a push in the right direction? Thanks up front!
I found the problem. I was right above when I said I would be humbled for asking for help. I am using two wixels to talk to each other, one is the master and the other is a slave configuration. I was having the master ask the slave to send it’s adc pin values to the master to display. I had the master placed in a breadboard and I was connecting it’s adc pins alternately to 3.3 volts and ground to test the adc capabilities. I finally realized if I was going to get results from the adc on the slave, I better jumper pins on the slave - not the master! My apologies to all!