This shows you the differences between two versions of the page.
pm:prj2022:apredescu:led_matrix [2022/05/27 21:43] laura_mihaela.duran [Introducere] |
pm:prj2022:apredescu:led_matrix [2022/05/27 21:52] (current) laura_mihaela.duran [Bibliografie/Resurse] |
||
---|---|---|---|
Line 12: | Line 12: | ||
<note tip> | <note tip> | ||
- | O schemă bloc cu toate modulele proiectului vostru, atât software cât şi hardware însoţită de o descriere a acestora precum şi a modului în care interacţionează. | + | {{:pm:prj2022:apredescu:led_matrix.png?700|}} |
- | + | ||
- | Exemplu de schemă bloc: http://www.robs-projects.com/mp3proj/newplayer.html | + | |
</note> | </note> | ||
Line 21: | Line 19: | ||
<note tip> | <note tip> | ||
Aici puneţi tot ce ţine de hardware design: | Aici puneţi tot ce ţine de hardware design: | ||
- | * listă de piese | + | * Arduino Uno board |
- | * scheme electrice (se pot lua şi de pe Internet şi din datasheet-uri, e.g. http://www.captain.at/electronic-atmega16-mmc-schematic.png) | + | * LED Matrix 8x8 |
- | * diagrame de semnal | + | * IC1- MAX 7219 |
- | * rezultatele simulării | + | * R1 – 10 KΩ |
+ | * C1 – 0.1 µF | ||
+ | * C2 – 10 µF | ||
+ | {{:pm:prj2022:apredescu:arduino-led-matrix.jpg?700|}} | ||
</note> | </note> | ||
Line 32: | Line 33: | ||
<note tip> | <note tip> | ||
Descrierea codului aplicaţiei (firmware): | Descrierea codului aplicaţiei (firmware): | ||
- | * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) | + | * Arduino IDE |
- | * librării şi surse 3rd-party (e.g. Procyon AVRlib) | + | * Librarii aditionale: LED Control |
- | * algoritmi şi structuri pe care plănuiţi să le implementaţi | + | |
- | * (etapa 3) surse şi funcţii implementate | + | <code cvp> |
+ | #include <LedControl.h> | ||
+ | |||
+ | int DIN = 13; | ||
+ | int CS = 12; | ||
+ | int CLK = 11; | ||
+ | |||
+ | |||
+ | byte E[8] = {0x3C,0x20,0x20,0x3C,0x20,0x20,0x20,0x3C}; | ||
+ | byte L[8] = {0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x3E}; | ||
+ | byte C[8] = {0x1C,0x20,0x20,0x20,0x20,0x20,0x20,0x1C}; | ||
+ | byte T[8] = {0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x10}; | ||
+ | byte R[8] = {0x38,0x24,0x24,0x28,0x30,0x28,0x24,0x24}; | ||
+ | byte O[8] = {0x1C,0x22,0x22,0x22,0x22,0x22,0x22,0x1C}; | ||
+ | byte N[8] = {0x42,0x62,0x52,0x52,0x4A,0x46,0x46,0x42}; | ||
+ | byte I[8] = {0x38,0x10,0x10,0x10,0x10,0x10,0x10,0x38}; | ||
+ | byte S[8] = {0x1C,0x20,0x20,0x10,0x08,0x04,0x04,0x38}; | ||
+ | byte smile[8]= {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C}; | ||
+ | byte neutral[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x81,0x42,0x3C}; | ||
+ | byte frown[8]= {0x3C,0x42,0xA5,0x81,0x99,0xA5,0x42,0x3C}; | ||
+ | |||
+ | LedControl lc=LedControl(DIN,CLK,CS,1); | ||
+ | |||
+ | void setup(){ | ||
+ | lc.shutdown(0,false); | ||
+ | lc.setIntensity(0,5); | ||
+ | lc.clearDisplay(0); | ||
+ | } | ||
+ | |||
+ | void loop() | ||
+ | { | ||
+ | printByte(smile); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(neutral); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(frown); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(E); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(L); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(E); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(C); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(T); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(R); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(O); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(N); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(I); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(C); | ||
+ | delay(1000); | ||
+ | |||
+ | printByte(S); | ||
+ | delay(1000); | ||
+ | |||
+ | lc.clearDisplay(0); | ||
+ | delay(1000); | ||
+ | } | ||
+ | |||
+ | |||
+ | void printByte(byte character []) | ||
+ | { | ||
+ | int i = 0; | ||
+ | |||
+ | for(i=0;i<8;i++) | ||
+ | { | ||
+ | lc.setRow(0,i,character[i]); | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
</note> | </note> | ||
Line 63: | Line 151: | ||
<note> | <note> | ||
- | Listă cu documente, datasheet-uri, resurse Internet folosite, eventual grupate pe **Resurse Software** şi **Resurse Hardware**. | + | [[https://www.arduino.cc/reference/en/libraries/ledcontrol/|LED Control Library]] |
</note> | </note> | ||
<html><a class="media mediafile mf_pdf" href="?do=export_pdf">Export to PDF</a></html> | <html><a class="media mediafile mf_pdf" href="?do=export_pdf">Export to PDF</a></html> | ||