NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » How do I get to save the .h file it creates?

February 07, 2012
by tpdcoyne
tpdcoyne's Avatar


I want to change the fonts which are displayed on the LED Array. I opened font.txt, redrew the fonts, ran and it converted the ###'s into hexadecimal (pretty cool!) but cant figure out how to save the new file as a .h

Also, I would like to save it as a different named file, "newfont". I can't figure out where in the code it actually reads the font.h file. If I just import newfont.h instead of font.h, would that work?

Many thanks..... having LOADS of fun with this!


February 07, 2012
by hevans
(NerdKits Staff)

hevans's Avatar

Hi typdcoyne,

The script just sends its output to the standard output. Normally standard output just prints out to the screen, however you can redirect standard out to a file by using the > operator.

python > font.h

should do what you are looking for. Note, on Unix this will overwrite whatever was in font.h. I'm pretty sure that is also true in Windows, but if it gives you problems just remove or rename the old font.h.

February 08, 2012
by tpdcoyne
tpdcoyne's Avatar


Thanks Humberto. I did

python > newfont.h and it worked.

Making brilliant progress. Thanks again.

Post a Reply

Please log in to post a reply.

Did you know that you can make a capacitive proximity sensor with some aluminum foil and paperclips? Learn more...