Shop OBEX P1 Docs P2 Docs Learn Events
2pe Motherboard with accelerometer and LED display communication — Parallax Forums

2pe Motherboard with accelerometer and LED display communication

kuenylskuenyls Posts: 11
edited 2009-12-26 20:55 in BASIC Stamp
Could anyone help me communicate between the accelerometer and an LED 7 segment display using the 2pe motherboard.

The code I have tried is as follows, but it doesn't seem to be reading anything.

' {$STAMP BS2pe}
' {$PBASIC 2.5}

OWOUT 6, 0, [noparse][[/noparse]8]

Are there any recommendations for a different code.

Thank you,

Laura

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2009-11-30 17:28
    Can you read the accelerometer data?

    You're really talking about two separate problems here, and you need to find out which one is causing you trouble. Try to read the accelerometer and display the values in a debug window (using DEBUG). If you don't have that working, there's no point in trying to display them on the LED. Once you've got that working, figure out how to display numbers on the LED.
  • kuenylskuenyls Posts: 11
    edited 2009-11-30 17:30
    I can display values from the accelerometer in the DEBUG window, I cannot figure out how to display numbers on the LED.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-30 18:44
    Laura,

    Did you remember to load the 7SEG display driver into the AVR coprocessor first? Also, displaying numbers on the LED is similar to the way it's done in DEBUG: you have to precede the number with DEC. The documentation downloadable from the 7SEG-DB product page explains all this and more.

    -Phil
  • kuenylskuenyls Posts: 11
    edited 2009-12-26 20:01
    Yes, I am able to display numbers on the LED display, just not from the accelerometer. Thank you though.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-12-26 20:55
    Can you post your entire program, please?

    -Phil
Sign In or Register to comment.