Pages: 1 [2]   Go Down
Author Topic: Can't write multiple pins HIGH why?  (Read 1329 times)
0 Members and 1 Guest are viewing this topic.
Lost Wages
Offline Offline
Full Member
***
Karma: 11
Posts: 103
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Exactly. Good luck!
Logged

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I understand correctly, even after fixing the circuit there will be issues with the program. I'm NOT saying you shouldn't rewire the circuit, please DO it, but I think it won't change the timing issue.

Quote
I deleted all delays and it blinked for a tiny fraction of a second but was almost unnoticeable

If you delete all delays each LED is switched on for a tiny fraction of a second then is switched immediately off, so it's almost unnoticeable.

Quote
so I deleted the delay after the low and it blinks left to right really fast which is not what I want

Here you allowed each LED to stay on for some noticeable time, but you switched it off immediately before you switched on the next. What you want, I guess, is to switch all the LEDs on, without any delay between one and the next, stay on for a while (some delay), then switch them off at the same time.  
Logged

Gales Ferry, CT
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Always thinking
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the help first of all! I know it can be a pain sometimes but I have corrected the coded/wiring and am pretty happy how this came out. This way it goes through the letters then turns it all on one letter at a time holds for a second then takes each letter down one at a time and then rinse and repeats.

Any other tips for this?

Code:
int ledI = 13;
int ledL = 12;
int ledO = 11;
int ledV = 10;
int ledE = 9;
int ledY = 8;
int ledo = 7;
int ledU = 6;

void setup() {               
 
  pinMode(ledI, OUTPUT); 
  pinMode(ledL, OUTPUT);
  pinMode(ledO, OUTPUT);
  pinMode(ledV, OUTPUT);
  pinMode(ledE, OUTPUT);
  pinMode(ledY, OUTPUT);
  pinMode(ledo, OUTPUT);
  pinMode(ledU, OUTPUT);
}

// the loop routine runs over and over again forever:
void loop() {
  delay(1000);
  digitalWrite(ledI, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledI, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledL, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledL, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledO, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledO, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledV, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledV, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledE, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledE, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledY, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledY, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledo, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledo, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledU, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);               // wait for a second
  digitalWrite(ledU, LOW);    // turn the LED off by making the voltage LOW
  delay(500);               // wait for a second
  digitalWrite(ledI, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledL, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledO, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledV, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledE, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledY, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledo, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledU, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledI, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledL, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledO, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledV, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledE, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledY, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledo, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
  digitalWrite(ledU, LOW);   // turn the LED on (HIGH is the voltage level)
  delay(500);
 
}
Logged

Patience.....

Rome, Italy
Offline Offline
Sr. Member
****
Karma: 20
Posts: 442
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Glad to know. And special thanks to MaJiG on behalf of your LEDs  smiley-wink
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11160
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any other tips for this?

Imagining how this would look, I would have thought it would be more visually appealing if you took out the periods where everything was off. In other words, as you turn one LED off turn the next one on immediately without any delay, so you don't get all those periods when the whole thing is off. Then delay for a second or so, turn the current LED off and immediately turn the next one on, and so on.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Offline Offline
God Member
*****
Karma: 27
Posts: 829
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OP, you should post a video of the effect.
Logged

Gales Ferry, CT
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Always thinking
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I will when I get home. I finished the project thanks to you guys in the nick of time!

Lance
Logged

Patience.....

Gales Ferry, CT
Offline Offline
Newbie
*
Karma: 0
Posts: 35
Always thinking
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here you guys go!

The video didn't come out the best but the hint is there.

http://youtu.be/-ls5GGaD9IM

Picture of the plexi https://docs.google.com/file/d/0Bx_sFejXsULPczZRYzRyMUd1bTg/edit?usp=sharing

Picture of the LED holder https://docs.google.com/file/d/0Bx_sFejXsULPMW5YMXdtWW9tLWs/edit?usp=sharing

Picture of the board https://docs.google.com/file/d/0Bx_sFejXsULPMWljTTdEU2wyRHc/edit?usp=sharing
« Last Edit: February 20, 2013, 09:52:08 pm by steinklatre » Logged

Patience.....

Pages: 1 [2]   Go Up
Jump to: