Activity 1(b)
Buzzer & LED circuit
- Laptop
- Arduino Board
- Breadboard
- 1 x Buzzer
- 1 x LED
- 1 x 330Ī©
- 5 x Jumper Wires
Codes:
const int buzzer = 9;
const int led = _;
void setup()
{
pinMode(buzzer, OUTPUT);
pinMode(led, ______);
}
void loop( )
{
digitalWrite (led, ____);
tone(buzzer,260,200);
delay (1000);
digitalWrite (led,LOW);
noTone(buzzer);
delay (1000);
const int buzzer = 9;
const int led = _;
void setup()
{
pinMode(buzzer, OUTPUT);
pinMode(led, ______);
}
void loop( )
{
digitalWrite (led, ____);
tone(buzzer,260,200);
delay (1000);
digitalWrite (led,LOW);
noTone(buzzer);
delay (1000);
}
*Please fill in the blanks.
*Please fill in the blanks.
No comments:
Post a Comment