Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
ON
3D LED CUBE DISPLAY (8x8x8 PIXELS)
BACHELOR OF TECHNOLOGY
IN
(Rajasthan Technical University, Kota)
ELECTRICALAND ELECTRONICS ENGINEERING
SESSION (2014-15)
GUIDED BY :
JITENDRA KASERA
SUBMITTED BY:
Jumana Hussain
EEE & VIIIth sem
RTU, Roll No- 11EPAEX030.
CERTIFICATE
I hereby certify that the work which is being presented in the B. Tech Project Report
entitled Topic in partial fulfillment of the requirements for the award of the Bachelor of Technology
in Electrical and Electronics Engineering and submitted to the Department of Electrical and
Electronics Engineering, Pacific College of Engineering, Udaipur is an authentic work carried out
during a period from Jan. 2015 to May 2014 under the supervision of Jitendra Kasera.
The matter presented in this report has not been submitted by me for the award of any other degree
elsewhere.
Signature
This is to certify that the above statement made by the candidate is correct to the best of my
knowledge.
____________________
Head of
Department of EEE
AKNOWLEDGEMENT
This is opportunity to express my heartfelt words for the people who were part of this Project in
numerous ways, people who gave me unending support right from beginning of the Project.
I am grateful to my Project guide Miss. Jumana Hussain for giving guidelines to
make the project successful.
I extend my thanks to Mr. Jitendra Kasera, Head of the Department for his cooperation and guidance.
I want to give sincere thanks to the Dean, Prof. S. K. Sharma and Director, Dr. Prashant Sharma for
his valuable support.
Last but not least I would like to express my sincere thanks to Ms. Riddhi Mathur and Mr.
Mohammad Zakir Sheikh for their valuable support and cooperation during the preparation of this
report.
Yours Sincerely,
(Jumana Hussain)
ABSTRACT
The project is a 3D LED CUBE DISPLAY (8x8x8 PIXELS) which displays different patterns stored in
the microcontroller. This LED cube is like a LED screen, but it is special in that it has a third
dimension, making it 3D. Think of it as many transparent low resolution displays. In normal displays
it is normal to try to stack the pixels as close as possible in order to make it look better, but in a cube
one must be able to see through it, and more spacing between the pixels (actually it's voxels since it
is in 3d) is needed. The spacing is a trade-off between how easy the layers behind it are seen, and
voxel fidelity. Since it is a lot more work making a LED cube than a LED display, they are usually
low resolution. A LED display of 8x8 pixels are only 64 LEDs, but a LED cube in 8x8x8 is 512 LEDs,
an order of magnitude harder to make! This is the reason LED cubes are only made in low
resolution. A LED cube does not have to be symmetrical; it is possible to make a 7x8x9, or even
oddly shaped ones. Here we have an 8x8x8 shaped one. The code is written in the C language using
AVR studio and it is burned into the microcontroller using the pony prog 2000.The circuit needs to be
mounted on the mechanical structure or platform where it displays the patterns that are stored in the
microcontroller as indicated in the codes. The patterns are displayed on a 3D structure which is
made up of stainless steel rods. The messages can be changed as per user need by rewriting the
microcontrollers in-built memory. The complete display system circuit is power supply run on 5V, 2A
which is provided externally. This unique way of displaying messages is a very eye catching;
therefore its uses can in the field of advertising, toys, etc
CONTENTS
Page No
Chapter 1
INTRODUCTION
Chapter 2
2.1
2.2
Block diagram
Explanation
2
3
Chapter 3
3.1
Circuit Diagrams
6
7
3.2
Explanation
Chapter 4
PCB
10
4.1
4.2
4.3
4.4
10
11
12
13
Chapter 5
5.1
5.2
5.3
Chapter 6
Hardware section
Software platforms used
Flow chart
RESULTS
15
16
19
21
Chapter 7
22
Components List
23
References
24
Appendix
25
1. INTRODUCTION
3D LED CUBE DISPLAY (8x8x8 PIXELS)
1. INTRODUCTION
A microcontroller is a computer. All computers whether talk about a personal desktop
computer or a large mainframe computer or microcontrollers have several things in
common like the CPU (central processing unit), execution of programs, presence of RAM
(random-access memory) etc Microcontrollers are special purpose computers.
Microcontrollers are often low- power devices. A desktop computer is almost always
plugged into a wall socket and might consume 50 watts of electricity. A microcontroller has
a dedicated input device and often (but not always) has a small LED or LCD display for
output. A microcontroller is often small and low cost. Today the technology has advanced to
such an extent that has come a need to display electronic messages to satisfy all purposes,
whether it is business or domestic use. The solution found to satisfy this need is the matrix
display systems using LEDs and LCDs. Different kinds of matrix systems are available
today which are capable of displaying messages, graphics, logos and moving animation that
are sure to capture and hold the attention of any audience. It provides instantaneous,
flexible communications when and where theyre needed most.
This LED cube has 512 LEDs. Obviously, having a dedicated IO port for each LED
would be very impractical. We would need a micro controller with 512 IO ports, and run
512 wires through the cube. Instead, LED cubes rely on an optical phenomenon called
persistence of vision (POV).If we flash a led really fast, the image will stay on our retina for
a little while after the led turns off. By flashing each layer of the cube one after another
really fast, it gives the illusion of a 3d image, when in fact we are looking at a series of 2d
images stacked onto one another. This is also called multiplexing. With this setup, we only
need 64 (for the anodes) + 8 (for each layer) IO ports to control the LED cube. The main
purpose of our project is to build a 3D LED cube display using an ATMEGA32, high
performance, low power Atmel AVR 8-bit Microcontroller. It has advanced RISC
architecture and 131 powerful instructions with most single clock cycle execution and 32 x
8 general purpose working registers. Its function is to display the different patterns in 3D
using 512 LEDs.
By moving them fast enough, the output will be a human identifiable pattern or character.
230 V, 50 Hz AC Supply
2.2 Explanation
ATMEGA32-P
Q1 - Q8 (N-Mosfet)
IRFZ44
P1
2 Pin Header
P2
ISP Header
P3 P11
8 Pin Header
U2 U9 (D Latch)
74HC573
R2 R9
1K Resistors
20
16MHz
C1, C3
22PF
C2
10PF
Fig 3.1
schematic
controller board
Electronics & Communication Engineering, FISAT
3.2 Explanation
A LED cube is like a LED screen, but it is special in that it has a third dimension, making it
3D. Think of it as many transparent low resolution displays. In normal displays it is normal
to try to stack the pixels as close as possible in order to make it look better, but in a cube
one must be able to see trough it, and more spacing between the pixels (actually it's voxels
since it is in 3d) is needed. The spacing is a trade-off between how easy the layers behind it
are seen, and voxel fidelity. Since it is a lot more work making a LED cube than a LED
display, they are usually low resolution. A LED display of 8x8 pixels are only 64 LEDs, but
a LED cube in 8x8x8 is 512 LEDs, an order of magnitude harder to make! This is the
reason LED cubes are only made in low resolution. A LED cube does not have to be
symmetrical; it is possible to make a 7x8x9, or even oddly shaped ones.
This LED cube has 512 LEDs. Obviously, having a dedicated IO port for each LED
would be very impractical. Thus there comes the need of a micro controller with 512 IO
ports, and run 512 wires through the cube. Instead, LED cubes rely on an optical
phenomenon called persistence of vision (POV). When a led is flashed really fast, the image
will stay on the retina for a little while after the led turns off. By flashing each layer of the
cube one after another really fast, it gives the illusion of a 3d image, when in fact we are
looking at a series of 2d images stacked onto one another. This is also called multiplexing.
With this setup, there exists the need of only 64 (for the anodes) + 8 (for each layer) IO
ports to control the LED cube. There are anodes, cathodes, columns and layers,
for
this
led
cube.
In order to light up an LED, we have to run current from the anode to the cathode.
The LED cube is made up of columns and layers. The cathode legs of every LED in a layer
are soldered together. All the anode legs in one column are soldered together. Each of the 64
columns is connected to the controller board with a separate wire. Each column can be
for
the
The layers
will be
next
layer.
referred to as
Rinse
and
layers, cathode
repeat
layers or
very
fast.
ground layers.
Since the d-latches are only able to sink or source 70mA on all 8 latches, we had to limit the
diode current to ~9mA, which is fairly enough for this type of LED.
4.
PCB
4. PCB
4.1 PCB Component Layout
10
11
12
PCBs are inexpensive, and can be highly reliable. They require much more layout
effort and higher initial cost than either wire-wrapped or pint-to-point constructed circuits,
but are much cheaper and faster for high- volume production. Much of the electronics
industrys PCB design, assembly and quality control needs are set by standards that are
published by the IPC organization.
4.4.1 materials
Conducting layers are typically made of thin copper foil. Insulating layers dielectric
are typically laminated together with epoxy resin prepreg. The board is typically coated
with a solder mask that is green in color. Other colors that are normally available are blue
and red. There are quite a few different dielectrics that can be chosen to provide different
insulating values depending on the requirements of the circuit. Some of these dielectrics are
polytetrafluroethylene (Teflon), FR-4, FR-1, CEM-1 or CEM-3. Well known prepreg
materials used in the PCB industry are FR-2 (Phenolic cotton paper), FR-3 (Cotton paper
and epoxy), FR-4 (Woven glass and epoxy), FR-5 (Woven glass and epoxy), FR-6 (Matte
glass and polyester), G-10 (Woven glass and epoxy), CEM-1 (Cotton paper and epoxy),
CEM-2 (Cotton paper and epoxy) CEM-3 (Woven glass and epoxy), CEM-4 (Woven glass
and epoxy), CEM-5 (Woven glass and polyester). Thermal expansion is an important
consideration especially with BGA and naked die technologies, and glass fiber offers the
best dimensional stability.
13
1. Silk Screen printing uses etch-resistant inks to protect the copper foil. Subsequent etching
removes the unwanted copper. Alternatively, the ink may be conductive, printed on a blank
(non conductive) board. The latter technique is also used in the manufacture of hybrid
circuits.
2. Photoengraving uses a photomask and chemical etching to remove the copper foil from the
substrate. The photomask is usually prepared with a photo plotter from data produced by a
technician using CAM, or computer-aided manufacturing software.
3. PCB milling uses a two or three-axis mechanical milling system to mill away the copper
foil from the substrate. A PCB milling machine (referred to as a PCB Prototype) operates
in a similar way to a plotter of the milling head in the x, y, and (if relevant z axis). Data to
drive the Prototypes is extracted from files generated in PCB design software and stored in
HPGL or Gerber file format.
14
This simple AVR Programmer will allow you to painlessly transfer hex programs to most
ATMEL AVR microcontrollers without sacrificing your budget and time. It is more reliable
than most other simple AVR programmers available out there and can be built in very short
amount of time.
15
16
17
18
Port Configurations
Initialization
While (1)
YES
Call the
function
cube
explosion ()
Display
String
FISAT
19
Rotate
string
3D
Call functions
block wipe (),
cube_2_auto (),
cube_wipe (),
cube_waves (),
cube_explosion (),
cube_stripes ()
Call functions
cube_belt_wipe();
outline_shrink();
cube_explosion();
cubes_4();
cubes_4();
cube_belt_wipe();
cube_outline();
cube_explosion();
cube_stars();
cube_explosion();
cube_sonic();
cube_belt_wipe();
cube_string_belt("
.thank you");
20
6. RESULTS
6. RESULTS
After successfully completing this project we came to know more about our project. It gave
us a lot of experience which will help in our future. The main advantages and limitations of
the project were identified. There are many applications for our project like in the field of
advertising, for making toys, to use as a study material, etc. but the only limitation of this
project we had found is that it requires complete darkness, as it deals with the light. Since it
consists of the LEDs it should be kept in a dark room for the perfect output.
21
We were successful in completing our mini project 3D LED CUBE DISPLAY (8x8x8
Pixels). It was a wonderful experience as we attained basic knowledge on different steps in
circuit manufacturing such as circuit testing and debugging, soldering components, PCB
fabrication etc that will surely help us in our career in electronics field. By doing this
project we also came to know about the advantages and disadvantages of our project and its
future development. Today we have a 3D world; a 3D revolution will be formed in the
upcoming years. This project can be upgraded to a great extent by suitable add-ons and we
expect a bright future for our project in the coming years . The main applications of our
project include toys, advertisements, study material, research purposes etc
22
SL.NO:
1
COMPONENT
LEDS
SPECIFICATION
BLUE COLOR,
DOM TYPE
QUANTITY
512
RESISTORS
20 , 1K, 10K,
22K, 4.7K
64, 8, 2, 3, 3
MOSFET
IRFZ44 (N
CHANNEL)
LARGE PROTOTYPE
PCBS
MEDIUM SIZE
MICROCONTROLLER
ATMEGA32
D LATCH
74HC573
CAPACITORS
22PF, .01F
5, 5
TRANSISTOR
BC547
CRYSTAL
OSCILLATOR
POWER SUPPLY
16MHz
5V, 2A
11
FOR
PROGRAMMING
12
STAINLESS STEEL
RODS
FOR THE
STRUCTURE
1.25 KG
13
8 PIN CONNECTORS
WITH JACK
18
14
HEAT SINKS
WING TYPE
15
MISCELLANEOUS
10
23
References
24
APPENDIX
25
Program
Header Files
AB
#ifndef AB_H
#define AB_H
#include <inttypes.h>
void cube_char( char ch, uint8_t z );
#endif
ANIMATIONS
#ifndef ANIMATIONS_H
#define ANIMATIONS_H
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
26
#define CUBE_AUTO_DELAY 60
void cube_2_auto( void );
void cube_2_auto_show( char cube2[4][4] );
uint8_t cube2_move_y_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_y_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_x_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_x_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_z_fwd( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
uint8_t cube2_move_z_rev( char cube2[4][4], uint8_t y, uint8_t x, uint8_t z );
void cube_diamond( void );
#define CUBES2_DELAY 15
void cubes_2( void );
#define CUBES4_DELAY 50
void cubes_4( void );
#define STRIPES_DELAY 60
void cube_stripes( void );
#define OUT_SHRINK_DELAY 140
void outline_shrink( void );
#define EXPLOSION_DELAY 10
void cube_explosion( void );
#define SWIPE_DELAY 60
void cube_wipe( void );
#define BLINK_DELAY 3 void
cube_flash( uint8_t cycle );
#define CUBE_STRING_DELAY 5
void cube_string( char *string );
#define OUTLINE_DELAY 60
void cube_outline( void );
#define SONIC_DELAY 40
void cube_sonic( void );
#define WAVES_DELAY 3
#define WAVES_DEPTH 255
void cube_waves( void );
Electronics & Communication Engineering, FISAT
27
#define STARS_DELAY 40
void cube_stars( void );
#define BLOCK_WIPE_DELAY 50
void cube_block_wipe( void );
#define BELT_WIPE_DELAY 50
void cube_belt_wipe( void );
#endif
LEDCUBE
#ifndef LEDCUBE_H
#define LEDCUBE_H
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
uint8_t cube[8][8];
void cube_show_init( void );
void cube_clear ( void );
void cube_clear_layer(uint8_t
layer); void cube_full ( void );
void cube_cube_3 ( void ); void
cube_cube_4_line ( void ); void
cube_random( void ); void
cube_test_z( void );
void cube_test_y( void );
void cube_test_x( void );
void cube_show( void );
void cube_show_loop( uint8_t cycle );
void cube_show_loop_wo_int( uint8_t
cycle ); #endif
TRANSLATION
28
#endif
ROTATION
#ifndef ROTATION_H
#define ROTATION_H
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#define CL_LOOP_DELAY 30 //was 6
void rotate_90_auto ( uint8_t cycle );
void rotate_15_deg( void );
void rotate_30_deg( void );
void rotate_45_deg( void );
void rotate_60_deg( void );
void rotate_75_deg( void );
void rotate_90_deg( void );
#endif
29
Source Files
AB
#include "ledcube.h"
#include <stdlib.h>
#include <inttypes.h>
#include <math.h>
#include "ab.h"
void cube_char( char ch, uint8_t z )
{
switch (ch)
{
case '0':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
cube[1][1] |= z;
cube[1][5] |= z;
cube[2][1] |= z;
cube[2][2] |= z;
cube[2][5] |= z;
cube[3][1] |= z;
cube[3][3] |= z;
cube[3][5] |= z;
cube[4][1] |= z;
cube[4][4] |= z;
cube[4][5] |= z;
cube[5][1] |= z;
cube[5][5] |= z;
cube[6][2] |= z;
cube[6][3] |= z;
cube[6][4] |= z;
break;
case '1':
cube[0][2] |= z;
cube[0][3] |= z;
cube[0][4] |= z;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
}
}
cube2_arr[0][0] |= (1 << 0);
cube2_arr[0][1] |= (1 << 0);
cube2_arr[0][2] |= (1 << 0);
cube2_arr[0][3] |= (1 << 0);
46
47
48
49
50
}
}
}
cube_show_loop(CUBE_AUTO_DELAY);
}
void cubes_2( void )
{
cube_clear();
for (uint8_t i = 0; i < 8; i++ )
{ cube[0][i] = 0xFF;
cube[1][i] = 0xFF;
}
cube_show_loop(CUBES2_DELAY);
for (uint8_t i = 0; i < 6; i++) {
move_y_fwd(2,2,3,3);
move_y_fwd(2,6,3,7);
move_y_fwd(6,2,7,3);
move_y_fwd(6,6,7,7);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 4; i++)
{ move_y_fwd(0,0,1,1);
move_y_fwd(0,4,1,5);
move_y_fwd(4,0,5,1);
move_y_fwd(4,4,5,5);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++)
{ move_y_fwd(2,0,3,1);
move_y_fwd(6,0,7,1);
move_y_fwd(2,4,3,5);
move_y_fwd(6,4,7,5);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 4; i++)
{ move_y_rev(6,2,7,3);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++) {
51
}
for (uint8_t i = 0; i < 6; i++)
{ move_z_fwd(2,4,3,5);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++)
{ move_y_rev(2,0,3,1);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 6; i++)
{ move_z_fwd(0,2,1,3);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 4; i++)
{ move_y_fwd(0,2,1,3);
cube_show_loop(CUBES2_DELAY);
}
for (uint8_t i = 0; i < 2; i++)
{ move_x_fwd(2,4,3,5);
cube_show_loop(CUBES2_DELAY);
}
cube_show_loop(CUBES2_DELAY*10);
}
/* cubemoving 4x4 */
void cubes_4( void )
{
cube_clear();
for (uint8_t layer = 0; layer <= 3; layer++)
{ cube[layer][0] = 0b00001111;
cube[layer][1] = 0b00001111;
cube[layer][2] = 0b00001111;
cube[layer][3] = 0b00001111;
}
for (uint8_t layer = 4; layer <= 7; layer++)
{ cube[layer][4] = 0b11111111;
cube[layer][5] = 0b11111111;
cube[layer][6] = 0b11111111;
cube[layer][7] = 0b11111111;
52
53
0b00100100;
54
55
56
57
58
while(*string)
{ cube_clear(
); cli();
PORTC = 0x00;
cube_char(*string, 16);
string++;
rotate_90_deg();
rotate_90_deg();
rotate_90_deg();
move_x_rev(1,0,6,7);
move_x_rev(1,0,6,7);
move_x_rev(1,0,6,7);
sei();
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY);
move_x_fwd(1,0,6,7);
cube_show_loop(CUBE_STRING_DELAY);
rotate_90_auto(1);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
move_z_rev(0,0,7,7);
cube_show_loop(CUBE_STRING_DELAY);
cube_flash(5);
cube_explosion();
}
cube_explosion();
cube_explosion();
59
60
61
62
63
64
65
66
67
}
cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
for (uint8_t i = 8; i != 0; i--){
for(uint8_t layer = 0; layer < 8; layer++)
{ cube[layer][i-1] = 0x00;
}
cube_show_loop(BLOCK_WIPE_DELAY);
_delay_ms(100);
}
}
void cube_belt_wipe( void )
{
for (uint8_t layer = 8; layer != 0; layer--){
cube[layer-1][0] |= 0xFF;
cube[layer-1][7] |= 0xFF;
for (uint8_t i = 1; i < 7; i++){ cube[layer-1][i] |= 0b10000001; }
cube_show_loop(BELT_WIPE_DELAY);
}
for (uint8_t layer = 8; layer != 0; layer--){
for (uint8_t i = 0; i < 8; i++){ cube[layer-1][i] =
0x00; } cube_show_loop(BELT_WIPE_DELAY);
}
}
void cube_flash( uint8_t cycle )
{
for (; cycle > 0; cycle--){
cli();
PORTC = 0x00;
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
sei();
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
68
_delay_ms(BLINK_DELAY*5);
_delay_ms(BLINK_DELAY*5);
TRANSLATION
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include "ab.h"
#include "rotation.h"
#include "ledcube.h"
#include "translation.h"
69
}
}
}
void move_x_fwd( uint8_t x1, uint8_t y1, uint8_t x2, uint8_t y2 )
{
for (uint8_t layer = y1; layer <= y2; layer++)
{ for (uint8_t j = 7; j > 0; j--){
for (uint8_t k = x1; k <= x2; k++) {
if ((cube[layer][j-1] & (1 << k)))
{ cube[layer][j] |= (1 << k);
cube[layer][j-1] &= ~(1 << k);
} else {
70
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include "ledcube.h"
#include "animations.h"
#include "rotation.h"
void rotate_90_auto ( uint8_t cycle )
{
for (uint8_t loopcnt = 0; loopcnt < cycle; loopcnt++)
{_delay_ms(30); uint8_t cube_org[8][8];
_delay_ms(30);
71
LED CUBE
#include "ledcube.h"
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include <avr/interrupt.h>
72
73
74
75
}
}
void cube_show_loop( uint8_t cycle )
{
for (uint16_t i = 0; i < cycle*2; i++){
_delay_ms(8);
}
}
void cube_show_loop_wo_int( uint8_t cycle )
{
for (uint16_t i = 0; i < cycle*2; i++)
{ cube_show();
}
}
MAIN
#include <stdlib.h>
#include <avr/io.h>
#include <inttypes.h>
#include <util/delay.h>
#include <math.h>
#include <avr/interrupt.h>
#include "ledcube.h"
#include "animations.h"
void init(void)
{
PORTC = 0;
DDRC = 0xFF;
DDRA = 0xFF;
76
}
int main(void)
{
init();
_delay_ms(100);
_delay_ms(100);
cube_clear(); /* never forget this */
while ( 1 )
{ cube_explosion
();
cube_string_to_front("fisat");
cube_belt_wipe();
cube_fixed_string();
cube_block_wipe();
cube_2_auto();
cube_wipe();
cube_waves();
cube_explosion();
cube_stripes();
cube_belt_wipe();
outline_shrink();
cube_explosion();
cubes_4();
cubes_4();
cube_belt_wipe();
cube_outline();
cube_explosion();
cube_stars();
cube_explosion();
cube_sonic();
cube_belt_wipe();
cube_string_belt(" .thank you");
}
}
77