This shows you the differences between two versions of the page.
pm:prj2022:dbrezeanu:spanzuratoarea [2022/06/06 04:25] andrei.alexa |
pm:prj2022:dbrezeanu:spanzuratoarea [2022/06/06 11:19] (current) andrei.alexa |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Spanzuratoarea ====== | ====== Spanzuratoarea ====== | ||
+ | Student: Alexa Andrei, | ||
+ | Grupa: 1241F | ||
===== Introducere ===== | ===== Introducere ===== | ||
Line 23: | Line 25: | ||
===== Software Design ===== | ===== Software Design ===== | ||
- | W.I.P | + | |
<note tip> | <note tip> | ||
- | Descrierea codului aplicaţiei (firmware): | + | IDE folosit : [[https://www.arduino.cc/en/software|Arduino IDE 1.8.19]] |
- | * mediu de dezvoltare (if any) (e.g. AVR Studio, CodeVisionAVR) | + | |
- | * librării şi surse 3rd-party (e.g. Procyon AVRlib) | + | Cod rulat pentru resetarea placi: |
- | * algoritmi şi structuri pe care plănuiţi să le implementaţi | + | <note>void setup() { |
- | * (etapa 3) surse şi funcţii implementate | + | // put your setup code here, to run once: |
+ | |||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | // put your main code here, to run repeatedly: | ||
+ | |||
+ | }</note> | ||
+ | Variabila cu lista de cuvinte de unde alegem un cuvant random din lista: | ||
+ | <note>const char* words[] = {"politehnica", "dorna", "fils", "ventilator", "pahar", "punga", "paste", "examen", "deodorant", "elefant"}; | ||
+ | |||
+ | void newWord() { | ||
+ | |||
+ | int pick = random(NUMWORDS); | ||
+ | const char* pickWord = words[pick]; | ||
+ | guessWord = pickWord; | ||
+ | wordSize = guessWord.length(); | ||
+ | }</note> | ||
+ | Conditiile pentru a castiga/pierde sau a reseta jocul: | ||
+ | <note>void gameOver(int whatToDo) { | ||
+ | |||
+ | |||
+ | switch (whatToDo) { | ||
+ | case 0: | ||
+ | lcd.clear(); | ||
+ | lcd.setCursor(6, 0); | ||
+ | lcd.print("AI"); | ||
+ | lcd.setCursor(6, 1); | ||
+ | lcd.print("PIERDUT"); | ||
+ | |||
+ | |||
+ | break; | ||
+ | case 1: | ||
+ | lcd.clear(); | ||
+ | lcd.setCursor(4, 0); | ||
+ | lcd.print("AI"); | ||
+ | lcd.setCursor(4, 1); | ||
+ | lcd.print("CASTIGAT"); | ||
+ | |||
+ | |||
+ | } | ||
+ | delay(2000); | ||
+ | resetFunc(); | ||
+ | } | ||
+ | </note> | ||
</note> | </note> | ||
Line 36: | Line 82: | ||
{{:pm:prj2022:dbrezeanu:andreialexaresult.jpg?400|}} | {{:pm:prj2022:dbrezeanu:andreialexaresult.jpg?400|}} | ||
<note tip> | <note tip> | ||
- | Filmare : *coming soon* | + | Filmare : {{:pm:prj2022:dbrezeanu:andreialexaspanzuratoarea.rar|}} |
</note> | </note> | ||
Line 43: | Line 89: | ||
===== Download ===== | ===== Download ===== | ||
- | You can download the project code over here : {{:pm:prj2022:dbrezeanu:spanzuratoarea.rar|}} | + | You can download the project over here : {{:pm:prj2022:dbrezeanu:spanzuratoarea.rar|}} |
===== Jurnal ===== | ===== Jurnal ===== |