Shop OBEX P1 Docs P2 Docs Learn Events
LED Code Help Excel — Parallax Forums

LED Code Help Excel

anitabillanitabill Posts: 6
edited 2008-08-14 17:14 in BASIC Stamp
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.

Comments

  • Adrian SchneiderAdrian Schneider Posts: 92
    edited 2008-08-06 06:50
    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
  • anitabillanitabill Posts: 6
    edited 2008-08-06 14:13
    This is exactly why·I love this forum.
    ·
    Thanks Adrian,
    ·
    Worked liked a charm. I love it when·I learn something new.
    ·
    Cheers
    Bill
  • anitabillanitabill Posts: 6
    edited 2008-08-12 18:24
    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
  • ladianladian Posts: 3
    edited 2008-08-14 17:14
    I have the same question on that same LCD demo program. i bought the PING))) Ultrasonic Sensor

    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
Sign In or Register to comment.