Difference between revisions of "Explore POV"
Line 209: | Line 209: | ||
|} | |} | ||
=Programming= | =Programming= | ||
+ | ==C Code== | ||
+ | <syntaxhighlight> | ||
+ | #include <avr/io.h> | ||
+ | #include<util/delay.h> | ||
+ | #include<stdint.h> | ||
+ | #include<avr/interrupt.h> | ||
+ | |||
+ | #define Blue 3 | ||
+ | #define Green 4 | ||
+ | #define Red 5 | ||
+ | |||
+ | uint8_t i=0; | ||
+ | |||
+ | const static uint16_t image[]= {0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000000000000000, 0b0000010011111110, 0b0000010000010001, 0b0000010000010001, 0b0000010000010001, 0b0000010011100001, 0b0000000000000000, 0b0000010001111110, 0b0000010010010001, 0b0000010010010001, 0b0000010010010001, 0b0000010000001110, 0b0000000000000000, 0b0000001011111111, 0b0000001000010001, 0b0000001000010001, 0b0000001000010001, 0b0000001000001110, 0b0000000000000000, 0b0000001000001110, 0b0000001000010001, 0b0000001000010001, 0b0000001011111111, 0b0000000000000000, 0b0000000000000000, 0b0000100001110000, 0b0000100011111100, 0b0000100011111110, 0b0000100011111111,0b0000100011111111, 0b0000100011111110, 0b0000100011111100, 0b0000100001111000, 0b0000000000000000, 0b0000000000000000, 0b0000010011111110, 0b0000010000010001, 0b0000010000010001, 0b0000010000010001, 0b0000010011100001, 0b0000000000000000, 0b0000001001110000, 0b0000001010001000, 0b0000001010001000, 0b0000001010001000, 0b0000001011111111, 0b0000000000000000, 0b0000001001110000, 0b0000001010001000, 0b0000001010001000, 0b0000001010001000, 0b0000001011111111, 0b0000000000000000, 0b0000010001111110, 0b0000010010010001, 0b0000010010010001, 0b0000010010010001, 0b0000010010001111, 0b0000000000000000, 0b0000000000000000, 0b0000010011111111, 0b0000010000010000, 0b0000010000010000, 0b0000010000010000, 0b0000010011111111}; | ||
+ | |||
+ | void disp(uint16_t); | ||
+ | |||
+ | ISR (TIMER1_OVF_vect) // Timer1 ISR | ||
+ | { | ||
+ | disp(image[i]); | ||
+ | i++; | ||
+ | |||
+ | if(i==72) | ||
+ | i=0; | ||
+ | |||
+ | TCNT1H=0xFF; // Reload the 16-bit count value | ||
+ | TCNT1L=0xF0; // in timer1 count registers | ||
+ | } | ||
+ | |||
+ | |||
+ | int main(void) | ||
+ | { | ||
+ | DDRC = 0b11111111; | ||
+ | DDRD = 0b11111111; | ||
+ | |||
+ | PORTC = 0b11111111; | ||
+ | PORTD = 0b00000111; | ||
+ | |||
+ | TCNT1H=0xFF; // Load the 16-bit count value | ||
+ | TCNT1L=0xF0; // for 1 sec at 7.3728MHz | ||
+ | |||
+ | TCCR1A=0x00; | ||
+ | TCCR1B=0x05; // Timer mode with 1024 prescAler | ||
+ | TIMSK=0x04; // Enable timer1 overflow interrupt(TOIE1) | ||
+ | sei(); // Enable global interrupts by setting global interrupt enable bit in SREG | ||
+ | |||
+ | while(1) | ||
+ | { | ||
+ | |||
+ | } | ||
+ | } | ||
+ | |||
+ | void disp(uint16_t pat) | ||
+ | { | ||
+ | |||
+ | PORTC = pat & 0x3f; | ||
+ | PORTD = (pat>>6)& 0xff; | ||
+ | } | ||
+ | |||
+ | |||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==Arduino Code== | ||
+ | Arduino Code will be uploaded soon. | ||
==Pattern Generation== | ==Pattern Generation== | ||
To create an image/patterm, you can use the POV image maker application. | To create an image/patterm, you can use the POV image maker application. |
Revision as of 17:02, 12 November 2014
The colorful Persistence Of Vision (POV) kit enables you to create colorful messages in air with just 8 LEDs. This kit is great introduction to soldering and AVR/Arduino Programming. The kit does not require a external programmer, it is self programmable with USB.
Contents
[hide]Solder it!
- Image below shows the layout of various components for the board. It is also printed on the PCB.
Component Layout
The image shows reference numbers for all the components.
- From the table below find out the exact part for the reference number.
Component List
|
|
|
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Programming
C Code
- #include <avr/io.h>
- #include<util/delay.h>
- #include<stdint.h>
- #include<avr/interrupt.h>
- #define Blue 3
- #define Green 4
- #define Red 5
- uint8_t i=0;
- const static uint16_t image[]= {0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000100011111111, 0b0000000000000000, 0b0000010011111110, 0b0000010000010001, 0b0000010000010001, 0b0000010000010001, 0b0000010011100001, 0b0000000000000000, 0b0000010001111110, 0b0000010010010001, 0b0000010010010001, 0b0000010010010001, 0b0000010000001110, 0b0000000000000000, 0b0000001011111111, 0b0000001000010001, 0b0000001000010001, 0b0000001000010001, 0b0000001000001110, 0b0000000000000000, 0b0000001000001110, 0b0000001000010001, 0b0000001000010001, 0b0000001011111111, 0b0000000000000000, 0b0000000000000000, 0b0000100001110000, 0b0000100011111100, 0b0000100011111110, 0b0000100011111111,0b0000100011111111, 0b0000100011111110, 0b0000100011111100, 0b0000100001111000, 0b0000000000000000, 0b0000000000000000, 0b0000010011111110, 0b0000010000010001, 0b0000010000010001, 0b0000010000010001, 0b0000010011100001, 0b0000000000000000, 0b0000001001110000, 0b0000001010001000, 0b0000001010001000, 0b0000001010001000, 0b0000001011111111, 0b0000000000000000, 0b0000001001110000, 0b0000001010001000, 0b0000001010001000, 0b0000001010001000, 0b0000001011111111, 0b0000000000000000, 0b0000010001111110, 0b0000010010010001, 0b0000010010010001, 0b0000010010010001, 0b0000010010001111, 0b0000000000000000, 0b0000000000000000, 0b0000010011111111, 0b0000010000010000, 0b0000010000010000, 0b0000010000010000, 0b0000010011111111};
- void disp(uint16_t);
- ISR (TIMER1_OVF_vect) // Timer1 ISR
- {
- disp(image[i]);
- i++;
- if(i==72)
- i=0;
- TCNT1H=0xFF; // Reload the 16-bit count value
- TCNT1L=0xF0; // in timer1 count registers
- }
- int main(void)
- {
- DDRC = 0b11111111;
- DDRD = 0b11111111;
- PORTC = 0b11111111;
- PORTD = 0b00000111;
- TCNT1H=0xFF; // Load the 16-bit count value
- TCNT1L=0xF0; // for 1 sec at 7.3728MHz
- TCCR1A=0x00;
- TCCR1B=0x05; // Timer mode with 1024 prescAler
- TIMSK=0x04; // Enable timer1 overflow interrupt(TOIE1)
- sei(); // Enable global interrupts by setting global interrupt enable bit in SREG
- while(1)
- {
- }
- }
- void disp(uint16_t pat)
- {
- PORTC = pat & 0x3f;
- PORTD = (pat>>6)& 0xff;
- }
Arduino Code
Arduino Code will be uploaded soon.
Pattern Generation
To create an image/patterm, you can use the POV image maker application.