|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Accelerometer: Analog or Digital?
We had our accelerometer connected to an Analog port, which we thought it was, but when we printfed the Get_Analog_Value(blah) it showed up some huge number like 17439, the value that we made get_analog_value go to was a double value, and we printfed with %d, when we moved the accelerometer no value changed
should it be an int instead of double? do you think our connections might be wrong? should it be digital instead? or any other thing it might be? thanks for the help Chantilly 612 |
|
#2
|
|||||
|
|||||
|
Re: Accelerometer: Analog or Digital?
The accelerometer is definitely an analog sensor. Make sure you have the wires connected correctly; the color code is nonstandard. Black goes to +5 volt power, red goes to ground, and white is the output to the RC.
Quote:
Last edited by Alan Anderson : 10-02-2005 at 16:40. |
|
#3
|
|||||
|
|||||
|
Re: Accelerometer: Analog or Digital?
Quote:
The easiest mistake to make is the colors of the wires on the accelerometer are not normal. Check the spec sheet for how they should be swapped around. Get_Analog_Value returns an int. When you printf make sure you are printing an int. The accelerometer should return a value in the neighborhood of --730 when facing up --512 when horizontal --340 when facing down |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Digital Caliper as a Digital Readout on Small Mill | sanddrag | Technical Discussion | 9 | 13-10-2005 22:51 |
| Analog / Digital IO Connectors | Aidan F. Browne | Control System | 4 | 06-02-2005 22:26 |
| Example accelerometer code released. | Kevin Watson | Programming | 0 | 20-01-2005 03:45 |
| Dynamic Input/Output Changing | Paolo | Control System | 6 | 23-09-2004 19:09 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |