378Re: Regarding Analog Input with RoboJDE
- Jul 28, 2009The wheel position sensing tutorial on the RidgeSoft Web Site (see http://www.ridgesoft.com/articles/wheelpositionsensing/WheelPositionSensing.pdf) discusses analog to digital conversion starting on page 3. The tutorial uses the IntelliBrain robotics controller which has a higher precision analog-to-digital converter than the Sumo11 does. The input samples on the Sumo11 will be between 0 and 255 as opposed to 0 and 1023 for the IntelliBrain conroller.
--- In firstname.lastname@example.org, "jujames84" <jujames84@...> wrote:
> I'm using the Sumo11 board
> Ok the Analog Input ports are set for Pulled High
> Meaning if I put the port into a while() loop and so a System.out.println(HandyBoard.getAnalogInput(0)); I get the result of 255 each time.....
> Now if I send a 4V through that port (lets call it A0), and set a Thread.sleep(1000) using Nyquist Theorem, of 2 times the frequency to sample the signal (Analog)..
> How is that sample read? Lets the result is 254, 250, 252, etc. (because of the while loop)...
> How do I read those samples as a decimal or as a voltage? And how would I put it mathematically so te program can understand it?
- << Previous post in topic