firmware: v8 — handshake GO/OK bidireccional

Problema raiz: el bootloader ROM del ESP32 emite logs a 115200 baud.
Al recibirlos a 9600 baud en el ESP8266 salen bytes aleatorios, alguno
de los cuales puede ser F/B/L/R (mover ruedas) o '!' (activar espReady).

Solucion: handshake con string de 2 chars "GO\n" / "OK\n":
- ESP32-CAM envia "GO\n" cada 300ms hasta recibir "OK\n"
- ESP8266 descarta todo el buffer al arrancar (basura del bootloader),
  luego espera exactamente "GO\n" y responde "OK\n"
- En loop(), si ESP32 reinicia y manda "G", el ESP8266 repite el handshake
- Probabilidad de falso positivo: << 1 en millones vs ~40% del '!' solo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Natxo1000
2026-06-02 13:31:33 +02:00
parent 1688cdb185
commit 7707953d4d
6 changed files with 61 additions and 16 deletions

Binary file not shown.

View File

@@ -1 +1 @@
7
8

Binary file not shown.

View File

@@ -1 +1 @@
6
8