GoForSmoke:
Learn about arrays and loops and you can shorten your code.
This should light the segments.// Assigns an I/O pin on Arduino to an individual segment
//segments are grouped 4 to a port to not overload Arduino <<==== whaaaaaat?
const byte seg[ 8 ] = { 8,9,10,11,14,15,16,17 };
byte index = 0;
void setup() {
for ( index = 0; index < 8; index++ )
{
pinMode( seg[ index ], OUTPUT ); // defaults LOW, segment will be ON
// digitalWrite( seg[ index ], HIGH ); // turns the segment OFF when you uncomment the line
}
}
void loop()
{
}
Thank you for the info. That was my next step. ![]()
The thing I mentioned about overloading the Arduino refers to limitations found here:Arduino Playground - HomePage
There are sets of pins on ports. 3 main ports. So the LED I have pulls 20mA off each pin and at 8 pins is 160mA with a max of 100mA per port. Therefore it's better to split it up so as not to burn out the Atmega.