Shop OBEX P1 Docs P2 Docs Learn Events
code for memsic accelerometer that drives servo — Parallax Forums

code for memsic accelerometer that drives servo

Let's Go!Let's Go! Posts: 124
edited 2008-08-08 01:50 in BASIC Stamp
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. nono.gif thanks, jim

Comments

  • IdtatIdtat Posts: 7
    edited 2008-08-08 01:06
    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.

    Aaron
  • FranklinFranklin Posts: 4,747
    edited 2008-08-08 01:18
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • SRLMSRLM Posts: 5,045
    edited 2008-08-08 01:50
    If you have the program space you may want to use a filter to help smooth out the data from the accelerometer.
Sign In or Register to comment.