PDA

View Full Version : 2pe Motherboard with accelerometer and LED display communication



kuenyls
11-30-2009, 11:41 PM
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, [8]

Are there any recommendations for a different code.

Thank you,

Laura

sylvie369
12-01-2009, 12:28 AM
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.

kuenyls
12-01-2009, 12:30 AM
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)
12-01-2009, 01:44 AM
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 (http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/28312/List/0/SortField/4/ProductID/454/Default.aspx) explains all this and more.

-Phil

kuenyls
12-27-2009, 03:01 AM
Yes, I am able to display numbers on the LED display, just not from the accelerometer. Thank you though.

Phil Pilgrim (PhiPi)
12-27-2009, 03:55 AM
Can you post your entire program, please?

-Phil