hi my arduino l led is blinking so fast and the arduino not working if you want a video ill sent you
the code you uploaded will be more intersting than the video...
post it here, indented and with code tags (read How to get the best out of this forum and post accordingly)
please no picture of the code...
void setup() {
// put your setup code here, to run once:
pinMode(4, OUTPUT); //red
pinMode(7, OUTPUT); //green
pinMode(8, OUTPUT); //yellow
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(4, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
delay(2000);
}
where are the code tags ?...
where is the drawing of your circuit?
This is your code using appropriate code tags.
void setup() {
// put your setup code here, to run once:
pinMode(4, OUTPUT); //red
pinMode(7, OUTPUT); //green
pinMode(8, OUTPUT); //yellow
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(4, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
delay(2000);
}
Now what exactly do you want to do? What result were you wanting/expecting?
Had you read the suggested link in post #2 you would have used the proper code tags.
Ron
Please read the forum guidelines to see how to properly post code and some information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in a code block.
Remove unnecessary white space.
Here is how it should look:
void setup()
{
// put your setup code here, to run once:
pinMode(4, OUTPUT); //red
pinMode(7, OUTPUT); //green
pinMode(8, OUTPUT); //yellow
}
void loop()
{
// put your main code here, to run repeatedly:
digitalWrite(4, HIGH);
digitalWrite(7, LOW);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, HIGH);
digitalWrite(8, LOW);
delay(2000);
digitalWrite(4, LOW);
digitalWrite(7, LOW);
digitalWrite(8, HIGH);
delay(2000);
}
If you want to slow the code down, increase the delay() times.
ok so it not about the code becouse it not working for every code i dont know why
you mean you can't upload any code ?
what does the IDE say when you select the right board, the right Serial port and click compile and upload ? (modify the preferences to be in verbose mode)
➜ paste here the outcome (using code tags)
Are you not getting the 2-second delays?
Is the Arduino blinking fast when you upload the code and then the color LEDs do not blink?
Are you connecting the LEDs with the correct polarity? Using current-limiting resistors?
We need to see your circuit diagram.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.