is there a way to do it through programming?
i''ve connected 6 leds to the breadboard all powered by the current from 13. but i don't know how to set each individual on and off (other than just connecting 6 leds to different ports,13,12,11....). is there a way to do it through programming? because i am looking forward to building 8x8x8 led cube.
digitalWrite (outputEnable, HIGH); // turn off all driversdigitalWrite (slaveSelect, LOW); SPI.transfer (anodeSelect); // 1 of 8 bits would be lowSPI.transfer (byte1);SPI.transfer (byte2);SPI.transfer (byte3);SPI.transfer (byte4);SPI.transfer (byte5);SPI.transfer (byte6);SPI.transfer (byte7);SPI.transfer (byte8);digitalWrite (slaveSelect, HIGH); // moves data to output drive latch digitalWrite (outputEnable, LOW); // turn on all drivers
PORTB = PORTB | B00000010; // makes PB1 highPORTB = PORTB & B11111011; // makes PB2 lowSPI.transfers...PORTB = PORTB | B00000100; // makes PB2 highPORTB = PORTB & B11111101; // makes PB1 low
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16