Pls I am really new here and will apreciate some help.
I am trying a small code but not knowing how to procedd.
I have 10 pushbuttons (pb1, pb2, pb3,...)and 5 leds (led1, led2, led3,...) want them to function in this order.
when I press 3 consecutive pushbuttons, for e.g pb4, pb5, pb6 all within 1 second, the the leds led3 and led4 should on.
if i press pb5, pb6, pb7 within 1 second then led4 and led5. should on. etc.
Conditions: Must press 3 consecutive pb's within one sec for two leds to on and the starting led to on is gotten from the nearest whole number after diving the last pressed pb by 2.
for e.g if I press pb5, pb6, pb7 within 1 second then the led to on will be 7/2 = 3.5 (when rounded to the nearest integer gives 4) meaning led4 and led5. should on. etc.
Start by telling us which pins the switches are connected to and which pins the LEDs are connected to ann do you have the proper current limiting resistors for the LEDS.
The tell us about what Arduino you have and what you are going to power the setup with.
Then tell us you have worked through the example code for using a switch and a LED.
I have proper powering, correct limiting resistors, I dont really have a problem with the basic setup and hardward and have gone through the basic sketches in example folder and understand some. I can use either arduino Uno or Mega.
My main problem is the code and how to go about it. As for the pins any pins since I will be using the arduino only for this purpose