This shows you the differences between two versions of the page.
|
pm:prj2021:avaduva:pov_alarma [2021/06/02 02:28] bogdan.anghel2010 [Download] |
pm:prj2021:avaduva:pov_alarma [2021/06/02 10:45] (current) bogdan.anghel2010 [Schema Bloc] |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| ==== Schema Bloc ==== | ==== Schema Bloc ==== | ||
| {{:pm:prj2021:avaduva:pov_buzzer1.png?480|}} | {{:pm:prj2021:avaduva:pov_buzzer1.png?480|}} | ||
| + | |||
| + | ==== Schema Electrica ==== | ||
| + | {{:pm:prj2021:avaduva:circuit_electric.png?800|}} | ||
| ===== Hardware Design ===== | ===== Hardware Design ===== | ||
| Line 36: | Line 39: | ||
| - am conectat o baterie 9V la o mufa de alimentare pentru a o putea conecta la placuta Arduino; | - am conectat o baterie 9V la o mufa de alimentare pentru a o putea conecta la placuta Arduino; | ||
| - am montat pe o placa de gips-carton subtire (spoiler: o sa fie prea grea) componentele mentionate anterior si le-am lipit cu silicon; | - am montat pe o placa de gips-carton subtire (spoiler: o sa fie prea grea) componentele mentionate anterior si le-am lipit cu silicon; | ||
| - | - am atasat un motor pe un suport de metal pentru a invarti placa. | + | - am atasat suportul pe un ventilator pentru a invarti placa. |
| Line 52: | Line 55: | ||
| Functia printLetter afiseaza litera curenta cu ajutorul ledurilor | Functia printLetter afiseaza litera curenta cu ajutorul ledurilor | ||
| <code> | <code> | ||
| + | void setup() | ||
| + | { | ||
| + | Serial.begin(9600); | ||
| + | pinMode(IR_pin,INPUT); | ||
| + | for( int i = 2; i<10 ;i++ ) | ||
| + | { | ||
| + | pinMode(i, OUTPUT); | ||
| + | } | ||
| + | | ||
| + | letterSpace =4; | ||
| + | delayTime =1; | ||
| + | } | ||
| + | |||
| + | |||
| void printLetter(int letter[]) | void printLetter(int letter[]) | ||
| { | { | ||
| int y; | int y; | ||
| - | | ||
| for (y=0; y<8; y++) | for (y=0; y<8; y++) | ||
| { | { | ||
| Line 61: | Line 77: | ||
| } | } | ||
| delay(delayTime); | delay(delayTime); | ||
| - | | ||
| for (y=0; y<8; y++) | for (y=0; y<8; y++) | ||
| { | { | ||
| Line 67: | Line 82: | ||
| } | } | ||
| delay(delayTime); | delay(delayTime); | ||
| - | |||
| for (y=0; y<8; y++) | for (y=0; y<8; y++) | ||
| { | { | ||
| Line 81: | Line 95: | ||
| } | } | ||
| delay(delayTime); | delay(delayTime); | ||
| - | |||
| for (y=0; y<8; y++) | for (y=0; y<8; y++) | ||
| { | { | ||
| Line 87: | Line 100: | ||
| } | } | ||
| delay(letterSpace); | delay(letterSpace); | ||
| + | |||
| + | pinMode(13, OUTPUT); | ||
| + | |||
| + | |||
| + | |||
| + | void loop() | ||
| + | { | ||
| + | if(digitalRead(IR_pin)==LOW) | ||
| + | { | ||
| + | printLetter (P); | ||
| + | printLetter (O); | ||
| + | printLetter (V); | ||
| + | } | ||
| + | |||
| + | } | ||
| + | |||
| </code> | </code> | ||
| + | |||
| + | {{:pm:prj2021:avaduva:pov.txt| Codul ca txt}} | ||
| + | |||
| ===== Rezultate Obtinute ===== | ===== Rezultate Obtinute ===== | ||