This shows you the differences between two versions of the page.
|
pm:prj2025:mdinica:alin_ioan.alexandru [2025/05/28 13:26] alin_ioan.alexandru [Software Design] |
pm:prj2025:mdinica:alin_ioan.alexandru [2025/05/28 13:27] (current) alin_ioan.alexandru [Software Design] |
||
|---|---|---|---|
| Line 188: | Line 188: | ||
| updateLCD = true; | updateLCD = true; | ||
| } | } | ||
| + | |||
| + | </code> | ||
| + | |||
| + | Comunicare prin bluetooth: | ||
| + | |||
| + | <code cpp> | ||
| + | |||
| + | if (SerialBT.available()) { | ||
| + | String mesaj = SerialBT.readStringUntil('\n'); | ||
| + | mesaj.trim(); | ||
| + | mesaj.toLowerCase(); | ||
| + | |||
| + | if (mesaj == "start") { | ||
| + | startTimer(5 * 60); // 5 minute | ||
| + | SerialBT.println("Timer pornit"); | ||
| + | } else if (mesaj == "reset") { | ||
| + | stopTimer(); | ||
| + | SerialBT.println("Timer oprit/resetat"); | ||
| + | } else { | ||
| + | SerialBT.println("Comanda necunoscuta"); | ||
| + | } | ||
| + | } | ||
| </code> | </code> | ||