View Full Version : code for memsic accelerometer that drives servo
08-08-2008, 03:29 AM
can anyone point me in the direction of "code" that reads the memsic and then drives the servo accordingly, whether it is on this site or anywhere else. presently i plan to use the bs2. all i can find is debug but that doesn't integrate the servo with the memsic reading. http://forums.parallax.com/images/smilies/nono.gif thanks, jim
08-08-2008, 09:06 AM
Pulse in comes to mind to read the memsic, then condition the value to get it into the proper range to pulseout to the servo. Have you read the sensor to a debug window?
Have you controlled a servo yet? I have some code that work with an ADXL202 and a stepper. Let me know where your at.
08-08-2008, 09:18 AM
If you have a program that reads the memsic and stores the value in a variable you only need to convert it to a value between 1ms and 2ms to send to the servo with pulseout.
If you have the program space you may want to use a filter to help smooth out the data from the accelerometer.