jcan
New Member
It's my day off work so I had some time to mess around with my little Arduino. I salvaged a 4-digit display off of an old microwave and I'm trying to get the arduino to control one of the digits. I started with the basic "blink" code and messed around with it a bit. I was able to get the display segments to light up by setting the digital pins to OUTPUT and turning one on at a time...but I can only get two segments to light up before things start getting too dim. I haven't had a chance to use the arduino in more then 4 months...so I've lost most of what I've learned in the past.
Here's the code I have:
-------------------------------------------
//int led = 1;
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
// pinMode(2, OUTPUT);
// pinMode(3, OUTPUT);
// pinMode(4, OUTPUT);
// pinMode(5, OUTPUT);
// pinMode(6, OUTPUT);
}
void loop() {
digitalWrite(0, HIGH);
delay(1);
digitalWrite(0, LOW);
digitalWrite(1, HIGH);
delay(1);
digitalWrite(1, LOW);
}
-------------------------------------------
That code lights up two of the segments, as shown in the photo.
Here's the code I have:
-------------------------------------------
//int led = 1;
void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
// pinMode(2, OUTPUT);
// pinMode(3, OUTPUT);
// pinMode(4, OUTPUT);
// pinMode(5, OUTPUT);
// pinMode(6, OUTPUT);
}
void loop() {
digitalWrite(0, HIGH);
delay(1);
digitalWrite(0, LOW);
digitalWrite(1, HIGH);
delay(1);
digitalWrite(1, LOW);
}
-------------------------------------------
That code lights up two of the segments, as shown in the photo.