subject

This is what I currently have, im just not sure about how I should go about making the lights blink since I only have 1 pushbutton int ledPinSingle= 9;
int ledPinFlash1= 10;
int ledPinFlash2= 11;
int ButtonPin =2;

void setup(){
pinMode(ledPinSingle, OUTPUT);
pinMode(ledPinFlash1, OUTPUT);
pinMode(ledPinFlash1, OUTPUT);
pinMode(ButtonPin, INPUT);
Serial. begin(9600);

}

void loop(){
if(digitalRead(ButtonPin)==HIGH)
{
digitalWrite(ledPinSingle, HIGH);
Serial. print("Single LED on");
}
else if (digitalRead(ButtonPin) == LOW){
digitalWrite(ledPinSingle, LOW);
digitalWrite(ledPinFlash1,HIGH);
digitalWrite(ledPinFlash2,LOW);
Serial. print("Flashing back and forth");
delay(50);

}

}


This is what I currently have, im just not sure about how I should go about making the lights blink

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Type the correct answer in the box. spell all words correctly. which view of report creation allows you to customize the report before the database program creates it? creating a report in allows you to customize the report before the database program creates it. pl asap
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
What do character formats do for your document's message? a.set the tone b.provide organization c.provide clarity d.set how texts align with documents
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
You know the right answer?
This is what I currently have, im just not sure about how I should go about making the lights blink...
Questions
question
Chemistry, 01.07.2020 15:01
Questions on the website: 13722363