Give me some basic arduino code
Answers
Answered by
1
Answer:
for blinking led
Explanation:
int ledPin = 13;
void setup()
{
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
}
Answered by
0
Answer:
In Arduino Programming, there are two parts are as follows as:
void setup(): put your setup code here, to run once.
void loop(): put your main code here, to run repeatedly.
Example:
Blinking of LEDs
void setup()
{
pinMode(8, OUTPUT);
}
void loop()
{
digitalWrite(8, HIGH);
delay(1000);
digitalWrite (8, LOW);
delay(1000);
}
Note : Here, 1000 is the time duration in milliseconds.
Similar questions