I need to control 3 led by bluetooth. They have to be 3 leds like a traffic lights. You must design three five-step patterns, for turning the lights on and off, which should turn on all the LEDs at least once (Example: L1-L2-L3-L1-L2 / L3-L1-L3 -L2-L1 / L2-L1-L2-L3-L1),(L=LED). I programmed everything but without bluetooth, I tried to do it but I could not because I'm a beginner.
The archive had my model.
sketch_apr06a.ino (2.17 KB)
sketch_apr06a.ino (3.02 KB)
Please post your code in the proper manner, using </> tags, as described in the forum headers.
If you have your LEDs going as you want without bluetooth, your code should do the job with bluetooth - no changes required. You have already done the hard bit. It is now essentially a matter of connecting bluetooth in the right manner and sending the same commands from a bluetooth terminal or device.
You might find the following background notes useful.
http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino