Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - turn on/off a led with serial

(you are viewing a thread; or go back to list of threads)

turn on/off a led with serial (by Alex)
Hello, i would like to control a led with serial communication using arduino uno, if i recieve letter "a" from my pc led turns on, if i recieve number"d"from my pc led turns off, give me some example please
Sun Mar 29 2020, 15:42:53
(no subject) (by Alex)
i found some solution here:

https://cq.cx/ladder-forum.pl?action=viewthread&parent=49

1) it works ok, but, when i recieve "attt" led turns on due to that in "attt" there is letter "a" which turn on led, the same with letter "d" which turns off led.

2) then,...how could i turn on led using now "aa" and turn off led using "dd" not 3 or 1 letter, just 2.
Sun Mar 29 2020, 16:14:25, download attachment test_serial_control_led.ld
(no subject) (by Ihor Nehrutsa)
led=on
led=of
Mon Mar 30 2020, 02:31:43, download attachment test_serial_control_led_2.ld
(no subject) (by Alex)
thanks for your reply Ihor, iŽll test it
Mon Mar 30 2020, 10:22:59
(no subject) (by MGP)
Another approach is to use a shift register, which works like Ihor's example.
Tue Mar 31 2020, 08:04:58, download attachment test_serial_control_led_shiftreg.ld
(no subject) (by Alex)
thanks for your reply MGP
Sun Apr 5 2020, 22:41:33
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):