This shows you the differences between two versions of the page.
pm:prj2021:avaduva:pov_alarma [2021/06/02 10:39] bogdan.anghel2010 [Asamblare] |
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 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); | ||
+ | } | ||
+ | |||
} | } | ||