Shop OBEX P1 Docs P2 Docs Learn Events
Parallax serial Terminal — Parallax Forums

Parallax serial Terminal

karakikokarakiko Posts: 11
edited 2010-03-01 00:41 in Propeller 1
Hello Forum , i start with the easiet code to blink a LED 16 on the demo board, please could you guide me how i can send a command from the parallax serial terminal to run this·function and to make the LED·ON ? For example is it possible to write "led 16 On"·in the terminal to make the LED 16·high ?

Thank you·and have a nice day,
Kara

Comments

  • RaymanRayman Posts: 14,877
    edited 2010-02-28 21:45
    You can use the include fullduplexserial.spin object for this...

    Add an "obj" section to your code and specify the object like this:

    OBJ
     
    ser: "fullduplexserial"
    

    Then, start it up at 9600 baud in your main routine:

    ser.start(31,30,0,9600)
    

    Then, a simple loop can check for certain keys.· You can use "n" for on and "f" for off...

    repeat
      i:=ser.rxcheck
      if i=="n"
        'Turn LED on here
      if i=="f"
        'Turn LED off here
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm

    My Prop Products:· http://www.rayslogic.com/Propeller/Products/Products.htm
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-03-01 00:41
    I believe there is also an object with example code called the Parallax Serial Terminal which should be in the Prop Tool library. I want to say there is a free downloadable lab that has some examples of how to use the Parallax Serial terminal object too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
Sign In or Register to comment.