Hi,
I am creating my first program with project builder/AVR studio. So far I have been able to control servos and stepper motors, read the switch status etc. All is well and fun.
However I can not get my Maxbotix EZ1 sonar (supported by project builder) to work. It keeps reporting a distance of 12 cm whatever the conditions. I tried diffrent ADC pins with the same result.
I have tried the sensor with only a voltmeter and regulated power supply attached to it. The voltage values I read make sens and varie a lot when pointing the sensor around as it should. So I think it is safe to assume the sensor works.
It may be the Axon II ADC system that is broken ? So here what I checked.
I tried running the same program on the Axon II without having the sensor connected to the ADC pin in order to see if it would still report a value of 12 cm. Without the sensor connected, the reported value is quite large (like 450 cm or something). Measuring the voltage with an volt meter between the ground pin and the signal pin on the applicable ADC slot when nothing is connected to it and the controller is running returns close to 0 volts. (0 Volt and the value returned is the maximum range... strange)
Measuring the voltage between the same two pins while the sensor is connected return the right amount of volts, like when I tested the sensor alone.
I don't know what to conclude about the Axon II integrity I must admit...
Now I was thinking, maybe it is a problem with the Maxbotix EZ1 sonar librairy that no one discovered yet. So if I can ask the Axon to give me the voltage on the ADC pin I will know if the ACD circuit is working.
From the online documentation, I concluded that all sensors can respond to the method ".getVolts". To my surprise it is not the case or I don't know how to do it because I get the following error:
project1.cpp:46: error: 'class Ez1' has no member named 'getVolts'
Anyone can help
Thank you,
Francois