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.

Project Help and Ideas » Daft Punk Halloween costume.

August 01, 2011
by Sam_Size_12
Sam_Size_12's Avatar

Hi NerdKits community. I have spent a huge amount of time working on a Daft Punk Halloween costume and this year i want to add the nerdkits LED array to it. so i have bought the array and the USB kit. i have put it all together and its working quite well. but i have to admit that i am a chemical engineer who is just about hopeless when it comes to programming. so i have run in to a few issues with my limited programming abilities and what i want the display to do. So i have a few questions and need a huge amount of help.

firstly take a look at this link http://www.youtube.com/watch?v=n1ZZ4yTulxE , its a youtube video of my helmet. The area between the colored lights in the front visor is now occupied by the LED array.

I would like to put a program in the chip that will scroll txt both horizontally and vertically without the chip being attached to a computer. is this possible?

i hope you guys like my project and can send me in the right direction.

Thanks guys!

Sam

August 01, 2011
by Rick_S
Rick_S's Avatar

If you want, take a look at my THREAD where I show an added scrolling function for right to left scrolling. I also have in that same thread a function that will display individual letters from the bottom to top or top to bottom. I don't have a function for full word up/down scrolling though. You are more than welcome to write one though... BigGrin

I added a lot to the basic program and my program is designed to run without PC interaction.

Rick

August 02, 2011
by Ralphxyz
Ralphxyz's Avatar

I am getting a copyright violation block on your link.

Ralph

August 07, 2011
by Sam_Size_12
Sam_Size_12's Avatar

I think i have fix the copy right protection on the link... (my stereo was going in the background when i took the video and that is a copy right violation?!?!?)

August 07, 2011
by Sam_Size_12
Sam_Size_12's Avatar

ok so the left to right scrolling rocks, thanks Rick_S, does anyone have a top to bottom scrolling?

August 07, 2011
by Ralphxyz
Ralphxyz's Avatar

Top to bottom is limited to line by line.

Or at least I never figured out how to scroll a column, which would be nice.

Here is a method to scroll line by line top to bottom:

#define F_CPU 14745600
#include <stdio.h>
#include <avr/io.h>
#include <inttypes.h>

#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <avr/io.h>
//#include <avr/delay.h>
#include <util/delay.h>

#include "../libnerdkits/io_328p.h"
#include "../libnerdkits/delay.h"
#include "../libnerdkits/lcd.h"

int main() { // LED as output DDRC |= (1<<PC5);

// turn on LED
PORTC |= (1<<PC5);
while(1)

    //while(PINC & (1<<PC0))
        //{
            // do nothing in while loop.
        //}
    // continue when button is pressed doing any action but no longer /while(PINC & (1<<PC0))

{
// fire up the LCD
lcd_init();
lcd_home();

// print message to screen 
lcd_write_string(PSTR("Page1Page1Page1")); 
lcd_line_two(); 
lcd_write_string(PSTR("Page1Page1Page1")); 
lcd_line_three(); 
lcd_write_string(PSTR("Page1Page1Page1")); 
lcd_line_four(); 
lcd_write_string(PSTR("********************"));

delay_ms(1000); 
lcd_line_one(); 
lcd_write_string(PSTR(" Page2Page2Page2")); 
lcd_line_two(); 
lcd_write_string(PSTR(" Page2Page2Page2")); 
lcd_line_three(); 
lcd_write_string(PSTR(" Page2Page2Page2")); 
lcd_line_four();
lcd_write_string(PSTR("MMMMMMMMMMMMMMMMMMMM "));   //space is needed or first line next page is truncated

delay_ms(1000); 
lcd_line_one(); 
lcd_write_string(PSTR("Page3Page3Page3")); 
lcd_line_two();
lcd_write_string(PSTR("  Page3Page3Page3")); 
lcd_line_three(); 
lcd_write_string(PSTR("  Page3Page3Page3")); 
lcd_line_four(); 
lcd_write_string(PSTR("LLLLLLLLLLLLLLLLLLLL"));

delay_ms(1000); 
lcd_line_one(); 
lcd_write_string(PSTR("   Page4Page4Page4")); 
lcd_line_two(); 
lcd_write_string(PSTR("   Page4Page4Page4")); 
lcd_line_three(); 
lcd_write_string(PSTR("   Page4Page4Page4")); 
lcd_line_four(); 
lcd_write_string(PSTR("WWWWWWWWWWWWWWWWWWWW ")); //space is needed or first line next page is truncated

delay_ms(1000); 
lcd_line_one(); 
lcd_write_string(PSTR("Page5Page5Page5")); 
lcd_line_two(); 
lcd_write_string(PSTR("    Page5Page5Page5")); 
lcd_line_three(); 
lcd_write_string(PSTR("    Page5Page5Page5")); 
lcd_line_four(); 
lcd_write_string(PSTR("uuuuuuuuuuuuuuuuuuuu"));
delay_ms(1000);

    // write message to serial port
    // printf_P(PSTR("%.2f degrees F\r\n"), temp_avg);
}
return 0; }

I have not used this for a while but it should work.

You have to be careful with the character spacing/count as it is easy to get it messed up with line one wrapping around to line three instead of line two as expected.

Ralph

September 19, 2011
by Sam_Size_12
Sam_Size_12's Avatar

Update, I have mounted the array in the helmet and it works quite well. a friend of mine is working on the font (in the video its a bit squished) i will update with final video once i get it going.

September 19, 2011
by Sam_Size_12
Sam_Size_12's Avatar

http://www.youtube.com/watch?v=yriRUP02s7s

sorry forgot to add video

October 18, 2011
by Sam_Size_12
Sam_Size_12's Avatar

Project done! it looks great! take a look and let me know what you all think.

http://www.youtube.com/watch?v=p8h8Giai-1A

October 18, 2011
by hevans
(NerdKits Staff)

hevans's Avatar

Awesome

April 02, 2012
by Sam_Size_12
Sam_Size_12's Avatar

Well guys im back, with more questions...

So the former project just did not turn out quite right in the gold daft punk helmet. so i made a new helmet (the silver one) and mounted the nerd kits array in that one and it looks great! I am using Rick_s' code for running txt straight from the chip with no computer. my question is this- i am not using two pins on the chip (pins 12 and 13), because the four last rows just did not fit in the helmet, so i am wondering if, i can hook up a momentary button to my spare pins to display different txt.

IE

turn power on and scroll default txt push button one (with power on) and scroll txt set #1 push button two (with power on) and scroll txt set #2

is this possible? does any one have any example code?

thanks a ton!

PS here is a vid. of the new helmet Enjoy! http://www.youtube.com/watch?v=0PJGA6V6E3s

April 03, 2012
by Ralphxyz
Ralphxyz's Avatar

so i am wondering if, i can hook up a momentary button to my spare pins to display different txt.

Short answer Yes.

Ralph

Post a Reply

Please log in to post a reply.

Did you know that a microcontroller can measure an RC time constant? Learn more...