Tronixlabs Support Forum
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
mentlone

Junior Member
Registered:
Posts: 1
Reply with quote  #1 
I know how to get 5 LEDs to turn on sequentially. But having trouble figuring out how to get them to turn on and off at the same time. Did I miss something in the previous projects?
tronixlabs

Avatar / Picture

Moderator
Registered:
Posts: 799
Reply with quote  #2 
You can have five digitalWrite() functions in a row to turn on five LEDs, however there will be a delay of a few milliseconds between each turning on. 
There is a faster more advanced way to control digital outputs, where you can control up to eight at once. This is called "port manipulation"
Check out the explanation of this at:
https://tronixstuff.com/2011/10/22/tutorial-arduino-port-manipulation/
have fun!

__________________

- Support always available for our products - email support@tronixlabs.com

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.