# Breadboard POV

**URL:** <https://forum.arduino.cc/t/breadboard-pov/8925>\
**Category:** Exhibition\
**Created:** [May 27, 2009, 5:20pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925 "2009-05-27T17:20:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![whosawhatsis](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@whosawhatsis](https://forum.arduino.cc/u/whosawhatsis)\
**Post date:** [May 27, 2009, 5:20pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/1 "2009-05-27T17:20:29Z")

</div>

This is a ten-segment POV device I made on a breadboard using a [tiny arduino board](http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239733868) I designed.

![](https://europe1.discourse-cdn.com/arduino/original/4X/5/f/4/5f45dff848419279b33030347d0aa7ab1045c8f4.jpeg)  
 ![](https://europe1.discourse-cdn.com/arduino/original/4X/7/7/3/773ba99d4b1890982acb7a75f439c9446312f43d.jpeg)  
 ![](https://europe1.discourse-cdn.com/arduino/original/4X/4/1/d/41dbae294bc8e08b3a708c5e872ea25ffd5e44dc.jpeg)

---

<div class="post-metadata">

**Author:** ![zooto68](https://avatars.discourse-cdn.com/v4/letter/z/5f9b8f/32.png) [@zooto68](https://forum.arduino.cc/u/zooto68)\
**Post date:** [May 27, 2009, 6:36pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/2 "2009-05-27T18:36:10Z")

</div>

Neat. Would be nice to see some video of it in action please 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 22, 2009, 12:39pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/3 "2009-06-22T12:39:42Z")

</div>

nice 🙂 what code are you using? 🙂 and got a schematic? :3

---

<div class="post-metadata">

**Author:** ![whosawhatsis](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@whosawhatsis](https://forum.arduino.cc/u/whosawhatsis)\
**Post date:** [June 22, 2009, 3:46pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/4 "2009-06-22T15:46:42Z")

</div>

No schematic really, just leds on pins 3-12 connected to the breadboard's power rail, which is connected to ground through a 330 Ohm resistor, and a button connecting pin 2 to ground. The button wakes the arduino from sleep mode, and it prints its message then goes back to sleep. Here's my code:

> #include \<avr/power.h\>  
> #include \<avr/sleep.h\>
> 
> int ledpin[] = {12,11,10,9,4,3,8,7,6,5};  
> int dotTime = 1;
> 
> int \_[] = {0b0000000000,  
> 0b0000000000,  
> 0b0000000000,  
> 0b0000000000,  
> 0b0000000000};  
> int A[] = {0b1111111100,  
> 0b0000010010,  
> 0b0000010001,  
> 0b0000010010,  
> 0b1111111100};  
> int B[] = {0b1111111111,  
> 0b1000010001,  
> 0b1000010001,  
> 0b0100101010,  
> 0b0011000100};  
> int C[] = {0b0011111100,  
> 0b0100000010,  
> 0b1000000001,  
> 0b0100000010,  
> 0b0011001100};  
> int D[] = {0b1111111111,  
> 0b1000000001,  
> 0b1000000001,  
> 0b0100000010,  
> 0b0011111100};  
> int E[] = {0b1111111111,  
> 0b1000010001,  
> 0b1000010001,  
> 0b1000010001,  
> 0b1000000001};  
> int F[] = {0b1111111111,  
> 0b0000010001,  
> 0b0000010001,  
> 0b0000010001,  
> 0b0000000001};  
> int G[] = {0b0011111100,  
> 0b0100000010,  
> 0b1001000001,  
> 0b0101000010,  
> 0b1111001100};  
> int H[] = {0b1111111111,  
> 0b0000010000,  
> 0b0000010000,  
> 0b0000010000,  
> 0b1111111111};  
> int I[] = {0b0000000000,  
> 0b1000000001,  
> 0b1111111111,  
> 0b1000000001,  
> 0b0000000000};  
> int J[] = {0b0011111111,  
> 0b0100000001,  
> 0b1000000001,  
> 0b0100000000,  
> 0b0011000000};  
> int K[] = {0b1111111111,  
> 0b0000010000,  
> 0b0000101000,  
> 0b0001000100,  
> 0b1110000011};  
> int L[] = {0b1111111111,  
> 0b1000000000,  
> 0b1000000000,  
> 0b1000000000,  
> 0b1000000000};  
> int M[] = {0b1111111100,  
> 0b0000000011,  
> 0b0000001100,  
> 0b0000000011,  
> 0b1111111100};  
> int N[] = {0b1111111111,  
> 0b0000000110,  
> 0b0000011000,  
> 0b0001100000,  
> 0b1111111100};  
> int O[] = {0b0011111100,  
> 0b0100000010,  
> 0b1000000001,  
> 0b0100000010,  
> 0b0011111100};  
> int P[] = {0b1111111111,  
> 0b0000010001,  
> 0b0000010001,  
> 0b0000001010,  
> 0b0000000100};  
> int Q[] = {0b0011111100,  
> 0b0100000010,  
> 0b1000000001,  
> 0b0100000010,  
> 0b1011111100};  
> int R[] = {0b1111111111,  
> 0b0000010001,  
> 0b0000010001,  
> 0b0000101010,  
> 0b1111000100};  
> int S[] = {0b0011000100,  
> 0b0100001010,  
> 0b1000010001,  
> 0b0100100010,  
> 0b0011001100};  
> int T[] = {0b0000000001,  
> 0b0000000001,  
> 0b1111111111,  
> 0b0000000001,  
> 0b0000000001};  
> int U[] = {0b0111111111,  
> 0b1000000000,  
> 0b1000000000,  
> 0b1000000000,  
> 0b0111111111};  
> int V[] = {0b0000011111,  
> 0b0011100000,  
> 0b1100000000,  
> 0b0011100000,  
> 0b0000011111};  
> int W[] = {0b0011111111,  
> 0b1100000000,  
> 0b0011000000,  
> 0b1100000000,  
> 0b0011111111};  
> int X[] = {0b1100000011,  
> 0b0011001100,  
> 0b0000110000,  
> 0b0011001100,  
> 0b1100000011};  
> int Y[] = {0b0000000011,  
> 0b0000001100,  
> 0b1111110000,  
> 0b0000001100,  
> 0b0000000011};  
> int Z[] = {0b1100000001,  
> 0b1011000001,  
> 0b1000110001,  
> 0b1000001101,  
> 0b1000000011};
> 
> void **setup** () {  
> Serial.begin(9600);  
> for (int i = 0; i \< 10; i++) {  
> pinMode(ledpin\*, OUTPUT);\*
> 
> - }\*
> - pinMode(2, INPUT);\*
> - digitalWrite(2, 1);\*
> - digitalWrite(13, 1);\*  
> _}_  
> _int pow(int num, int power) {_
> - return round(pow((double)num, (double)power));\*  
> _}_  
> _void printLetter(int letter[]) {_
> - delay(dotTime);\*
> - for (int i = 0; i \< 5; i++) {\*
> - for (int j = 0; j \< 10; j++) {\*  
> \_ digitalWrite(ledpin[j], (letter _& pow(2, j)) ? HIGH : LOW);_\_  
> _\_ Serial.print((letter & pow(2, j)) ? "O" : " ");  
> \* }  
> Serial.print("|\n");  
> delay(dotTime);  
> }  
> Serial.print("\n");  
> for (int i = 0; i \< 10; i++)  
> digitalWrite(ledpin, 0);  
> delay(dotTime);  
> }  
> void wake() {}  
> void **loop** () {  
> delay(1);  
> printLetter(H);  
> printLetter(E);  
> printLetter(L);  
> printLetter(L);  
> printLetter(O);\_  
> printLetter(\_);\*_
> 
> _\* attachInterrupt(0, wake, LOW);\*_  
> _\* delay(1);\*_  
> _\* set\_sleep\_mode(SLEEP\_MODE\_PWR\_DOWN);  
> sleep\_enable();  
> sleep\_mode();  
> sleep\_disable();  
> \_ detachInterrupt(0);  
> }[/quote]\*  
> Note: the led pins are not in numerical order in the array. This is a result of the way I had to route them to get ten consecutive rows on the breadboard connected to digital pins. The same routing will work if you are using a bare atmega (as this board has the same pinout), but for any other board, you will probably want to change that.\__

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 22, 2010, 5:32am UTC](https://forum.arduino.cc/t/breadboard-pov/8925/5 "2010-03-22T05:32:54Z")

</div>

I did something very similar (borrowing from your code) but I am having difficulties with my LEDs not being that bright. Can you (or anyone) elaborate on how those LEDs are wired up.

> just leds on pins 3-12 connected to the breadboard's power rail, which is connected to ground through a 330 Ohm resistor, and a button connecting pin 2 to ground.

I need a bit of clarification...  
😛

---

<div class="post-metadata">

**Author:** ![whosawhatsis](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@whosawhatsis](https://forum.arduino.cc/u/whosawhatsis)\
**Post date:** [March 22, 2010, 6:06am UTC](https://forum.arduino.cc/t/breadboard-pov/8925/6 "2010-03-22T06:06:25Z")

</div>

The leds are wired in a common-cathode configuration. Each one has its anode connected to a different digital pin, and the cathodes are all wired together. This common cathode is then connected to a single 330 ohm resistor that is wired to the arduino's ground. You may need to adjust the resistor value for your leds. You may get more consistent brightness by giving each led its own resistor (so none of the leds are wired to each each other), but I didn't see a difference with mine, and it made the wiring a lot easier.

The button on pin 2 activates an interrupt to begin displaying the message.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 22, 2010, 3:13pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/7 "2010-03-22T15:13:36Z")

</div>

Ok I did wire it up the same way you did. I am using 7 red LEDs, and they are really dim. I previously did a POV where I wrote out manually every line such as

digitalWrite(ledpin1, HIGH);  
thru  
digitalWrite(ledpin7, LOW);

and I had no problems with my brightness. I really liked your code so I decided to give it a try. It was good for me because I had to decipher excatly what the bitwise ternary bit was. Maybe I missed something in your code. I will stab at it again.

THX

---

<div class="post-metadata">

**Author:** ![whosawhatsis](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@whosawhatsis](https://forum.arduino.cc/u/whosawhatsis)\
**Post date:** [March 22, 2010, 3:25pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/8 "2010-03-22T15:25:11Z")

</div>

Really dim, huh? Sounds like you forgot to set the pinMode to OUTPUT. Running off the ~20k internal pullups has that effect.

Ternary bit? I don't recall using base 3 for anything, I'll have to look over my code again...

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 22, 2010, 7:30pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/9 "2010-03-22T19:30:04Z")

</div>

Hmm... Well I declared the pinMode to output in a for loop as you did. When I get home tonight I will try them indiviually, see if that does anything.

As for the ternary bit, excuse my programming newness, is the ? in the

> digitalWrite(ledpin[j], (letter _& pow(2, j)) ? HIGH : LOW);[/quote]_  
> _I thought the ? was called that. I googled it and thats the name it spit out. Then I found out the & (who knew it was called ampersand???) and did the bitwise run around. Busted out the calculator with Binary and started fidling.... It is a pretty neat way to do things. I have no idea what base 3 is though._  
> _I will be looking into it more though._

---

<div class="post-metadata">

**Author:** ![whosawhatsis](https://avatars.discourse-cdn.com/v4/letter/w/9fc348/32.png) [@whosawhatsis](https://forum.arduino.cc/u/whosawhatsis)\
**Post date:** [March 22, 2010, 8:00pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/10 "2010-03-22T20:00:38Z")

</div>

Ah, so it is called that. I always just called it an inline conditional expression.

Ternary is also a name for a base 3 number system, just as binary refers to base 2.

Check your loop carefully. A small error in the loop expression could prevent the loop code from running at all. You may want to temporarily add a serial print or blink your pin 13 led within the loop, just to verify that it is running the expected number of times. If that fails, try uploading a different sketch to simply blink the leds to verify that they can even achieve the desired brightness the way they are wired.

Also, if you post your code, I can take a look for you.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [March 23, 2010, 3:50am UTC](https://forum.arduino.cc/t/breadboard-pov/8925/11 "2010-03-23T03:50:44Z")

</div>

Well you got it right. I declared all of my pinMode outs individually and they come out nice and bright. I have an exam in the morning so figuring out why my for loop didn't work will have to wait.

Thank you for all the help whosawhatsis

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [January 22, 2011, 11:20pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/12 "2011-01-22T23:20:05Z")

</div>

does this project have a sensors?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 6:44pm UTC](https://forum.arduino.cc/t/breadboard-pov/8925/13 "2021-05-06T18:44:46Z")

</div>

Closed on May 6, 2021, 6:44pm UTC


