Jump to content
Sign in to follow this  
Joby Taffey

MSP430G2221 jar-of-fireflies

Recommended Posts

MSP430G2221 jar-of-fireflies

 

A classic project, re-told on the MSP430 Launchpad's MSP430G2221.

 

Glass jars of LED fireflies which synchronize over time. A piezo transducer in the lid detects tapping and randomizes the pattern.

MSP430G2221, 7 LEDs, 2 resistors and a piezo transducer. Cheap and simple.

 

http://blog.hodgepig.org/2010/12/23/finished-fireflies/

 

5285841599_30fa716bbc.jpg

imag0216.jpg

imag0218-253x300.jpg

 

Eagle CAD design files: http://wp.hodgepig.org/wp-uploads/2010/ ... agletar.gz

Source code: http://wp.hodgepig.org/wp-uploads/2010/12/fireflies.c (mspgcc)

Share this post


Link to post
Share on other sites

really enjoy your project. when i looked at the 1st picture, i thought it's taken from an art shop. w/ all the wrap-up details, frosted jar, tag label on brown paper, etc.

 

it shows how to turn something simple into a treasure for someone.

Share this post


Link to post
Share on other sites

can't resist, have to try your code. hope u don't mind me borrowing your thread.

 

the ezprobe has 7 leds and a button input (substituting the piezo sensor, also edge triggers)

i just has to swap 1 led pin and 1 interrupt pin to get it to work.

and it's how it looks like w/ ezprobe

 

 

thanks joby for great code and project.

Share this post


Link to post
Share on other sites

not sure, but it's just 200+ lines, you can try and create a new CCS project and cut and paste source into your new project main.c

 

add

#include

 

and change

 

interrupt(TIMERA0_VECTOR) TIMERA0_ISR(void)

 

to

 

#pragma vector=TIMERA_VECTOR

__interrupt void TimerA_Vector(void)

 

the only other thing is the rand() function, which is in the msp gcc library, if CCS/IAR has equivalents, then u should compile fine.

 

may need to fiddle w/ other #include lines though.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...