Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2022:apredescu:led_matrix [2022/05/27 21:49]
laura_mihaela.duran [Hardware Design]
pm:prj2022:apredescu:led_matrix [2022/05/27 21:52] (current)
laura_mihaela.duran [Bibliografie/Resurse]
Line 33: Line 33:
 <note tip> <note tip>
 Descrierea codului aplicaţiei (firmware): Descrierea codului aplicaţiei (firmware):
-  * mediu de dezvoltare ​(if any) (e.gAVR StudioCodeVisionAVR+  * Arduino IDE 
-  * librării şi surse 3rd-party (e.gProcyon AVRlib+  * Librarii aditionale: LED Control 
-  ​* algoritmi şstructuri pe care plănuiţsă le implementaţ+ 
-  ​(etapa 3) surse ş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 = 0; 
 +   
 +  for(i=0;i<8;i++) 
 +  ​
 +    lc.setRow(0,i,​character[i]);​ 
 +  } 
 +
 +</​code>​
 </​note>​ </​note>​
  
Line 64: 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>​
  
pm/prj2022/apredescu/led_matrix.1653677360.txt.gz · Last modified: 2022/05/27 21:49 by laura_mihaela.duran
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0