I saw these POV(Persistence of Vision) devices on other Instructables and thought I would like to make one and I have always wanted my own "APPLAUSE" sign. Next improvement will be to make it go on whenever I enter the room. :) Maybe have it say, "And here's Charlie !" But that is for another time.
So I got a fan at a garage sale, did some reading , found some code and below is a video of my machine in action.
I started with nice code from an Instructable by Scott Mitchell - "Arduino Bike POV" but what I ended up with is his code greatly parred down. I could not get it to work at first and so I keep changing the code . Turned out my problem had nothing to do with the code. So I am going to go back to his code and try again as his is much more generic and would work more easily with different phrases. But that is for later also.
The video below shows the POV in action. It does not seem as broken or disconnected in real life as it does on the video.
Remove these ads by
Signing UpStep 1: Get stuff
Items used in this project:
small fan - garage sale - 2.00
misc lumber - my basement - 0.00
a length of plastic 15 by 2.5 inches - my basement - 0.00
an Arduino - I use a Ardweeny from SolarBotics - about 10.00
7 red LEDs - already had - 1.00
7 - 330 ohm resistors - 3.00
Halls Sensor - I got from Adafruit - US5881LUA - 2.00
1 10k resistor to be used with the Halls sensor - 1.00
2 magnets from local hobby store - 1.00
also will need : wire, 9v battery , screws, Loctite 5 min epoxy, small PCB from Radio Shack










































Visit Our Store »
Go Pro Today »




byte b = font[ch][i]; "font" nt declared in this scope
fanfk2.cpp: In function
'void printLetter(char)': fanfk2:103: error: 'font' was not declared in this scope
fanfk2.cpp: At global scope: font:32: error: redefinition of 'const unsigned char font [95][5]'
I appreciate any help to this "noobie"
Your arduino sketch should consists of 2 pieces each in its own tab
1. the arduino code from this instructable but only from the begining of the code to the the line "delayMicroseconds(51000);"
2. then thewre is a drop down menu which you access by clicking the little arrow on the upper right of the shetch (just under the serial monitor icon) . select "new tab" and name it font.h. then copy and paste the remainder of the code into that tab.
hard to explain but I hope that helps
e.g. it would say "applause" for 5 seconnds, then display "winner" 5 seconds and so on...
Thanks!
http://www.instructables.com/id/Simple-POV-wArdweeny-Persistence-of-Vision/
Also, you said you didn't use a sensor. I don't have one either, but perhaps my fan runs at a different speed and my letters spin around in a circle. Where in the code can I make adjustments to play around with this?
Thanks,...again
Gary
the width = 5 refers to the font.h file.
when you look at the font.h file you see that each letter is a matrix of 5 unigue pieces. each piece will light the 7 leds in a pattern that when done quickly and in the proper sequence will produce the letter required.
worddelay will define the blank space between each word so you can play with that to get more or fewer words in the circle
delayMicroseconds(500); this effects the time between 2 columns of leds
delayMicroseconds(2800); this effects the time between 2 different letters
You will need to adjust the above 2 based on the rpms of your fan. just trial and error
hope that helps
I was curious if adjusting the variable here
var = 0;
while(var < 95){
// do something repetitive 120 times
would make a difference.
Gary
I am surprised the other 2 lines did not make drastic differences. Do not be afraid to change the 500 to say 2000 and the 2800 to say 10000. Try very big numbers to get something to happen and then scale it back if needed
Thanks for the quick response and help. I love it!!!
Gary
I've just made a small home-printed PCB (following instructions from here and elsewhere) with 7 LEDs on and the holes ready for the hall sensors.
I'll keep you posted on my progress. Keep up the good work. Thanks for an easy to understand Instructable (it's actually the first that I've tried to put into practice).
My kids love it! So, thanks once again for making an easy to understand 'able.
sketch_aug16a.cpp:28:19: error: font.h: No such file or directory
sketch_aug16a.cpp: In function 'void printLetter(char)':
sketch_aug16a:103: error: 'font' was not declared in this scope
sketch_aug16a.cpp: At global scope:
sketch_aug16a:129: error: expected unqualified-id before '--' token
i am very new to programing with microcontrollers so i not sure how to fix this any ideas?
I think this may be the problem:
I did not spell it out in the instructable and that is my fault but ....
In the instructable the code is actually 2 files. I get the same error if I copy and paste the whole code listing into an Arduino sketch but if you do the following it does verify:
copy and paste from the top of the file to the point where font.h is started ie the last 2 lines of the copy will be :
delayMicroseconds(2500);
}
Then in the arduino sketch you need to click on the arrow that is in the box on the right near the top and select "new tab" , name this font.h , copy and paste the font.h code from the Instructable into this sketch.
I just tried this again and it worked but after doing the copying and pasteing, I did need to go back and delete a couple of lines that were not commented out properly eg
------------------------------------- this line
and
*/ this line
So in summary:
you need the font.h to be a seperate file (or tab)
Hope that helps
thank you for pointing this out.
here its used to know when a certain point is reached on the circle, so the arduino knows when to start blinking the LED's
The following URL is to the Adafruit item that was used and a more detailed explanation can be found there.
http://www.adafruit.com/products/158