PDA

View Full Version : LED Code Help Excel



anitabill
08-06-2008, 08:24 AM
Hi

I'm new to this so please forgive me if this seems like a ridiculously easy question. I have the parallax plug-in for excel and the BOE with basic stamp 2. I am trying to get a multicolor LED to turn off is cell D100 is 0. turn green if its less 10 and red if its greater then 10.

The plug-in is working great, but when the cell is 0 the LED doesn't turn off. Can anyone help me with?

Here is the code I'm using. Thanks everyone for reading.

Adrian Schneider
08-06-2008, 01:50 PM
what about



'...
IF D100 < 1 THEN
LOW 14
LOW 15

ELSEIF D100 < 10 THEN
HIGH 14
LOW 15

ELSEIF D100 >= 10 THEN
HIGH 15
LOW 14

ENDIF

PAUSE 1000
'...




adrian

anitabill
08-06-2008, 09:13 PM
This is exactly why·I love this forum.
·
Thanks Adrian,
·
Worked liked a charm. I love it when·I learn something new.
·
Cheers
Bill

anitabill
08-13-2008, 01:24 AM
Sorry if i'm being a pain.

I am now trying to send the info not just to light a LED but display number in the Cell on the LCD. I have the LCD working but I’m not sure the next steps. Can someone point me in the right direction?
·
I’m attaching both·BS2 programs I am using to test. One is for the LED and one for the LCD I’m guessing the next step is to combine the 2.
·
Thanks again for reading

ladian
08-15-2008, 12:14 AM
I have the same question on that same LCD demo program. i bought the PING))) Ultrasonic Sensor (http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/CategoryID/51/List/0/Level/a/ProductID/92/Default.aspx?SortField=ProductName%2cProductName)

and i'm trying to modify it to display the mesurement on the LCD. I can display the line of text on the LCD, but i cant the output of the Sonic to the LCD.

using the sample ping program, anyone have any idea how i can get it to display on the LCD Distance = XXX ? while using Anitabills LCD program ?

' PingTest.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
time VAR Word
DO
PULSOUT 15, 5
PULSIN 15, 1, time
DEBUG HOME, "time = ", DEC5 time
PAUSE 100
LOOP