Hvala Bogdane sto si se javio.
Rec je o ploci ESP32-CAM koja svakako nema svoj RS232/TTL translator pa koristim neki kineski eksterni, koji je do sada radio svoj posao.
U sustini, ploca ESP32-CAM je uposlena da radi svasta nesto (bluetooth, I2C) i to sve radi perfektno. Htedoh da dodam modul preko koga cu kroz CLI izdati par komandi ploci ali avaj, ploca je prilicno nagluva iz nekog razloga.
Probao dve ESP32-CAM, obe se isto ponasaju.
Imam samo jedan RS232/TTL translator pa za pocetak mogu njega da optuzim. Sve ostale ploce koje probah imaju ga vec na sebi i kod svih ovaj kod radi perfektno.
Kod sam iskopao negde na netu, samo da ga pokusam. Nisam se bavio cistocom i finesama... Cak i ovaj example sa Arduino.cc koji objasnjava Serial.read() naredbu ne funkcionise.
Code:
int incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}
Cenim da je ipak do RS232/TTL transivera. Od prijateljice sam upravo dobio potvrdu da kod radi na ploci sa ESP32 koja ima inkorporiran transiver.
Pokusao sam sa USB/RS232 TTL transiverom koji u sebi ima neki FT cip i stvar ne radi nikako..(češ, češ)... nisam u stanju da uploadujem kod nikako pa se još bačkćem sa ovim u koji sam posumnjao...
Elem, ovaj kod sa Arduino.cc daje sledeći odziv na slanje samo broja 1. Evidentno je da CPU svaki put vidi različito i interpretira dobijeno na razlicit nacin...
Code:
12:20:50.411 -> I received: 0
12:20:50.411 -> I received: 168
12:20:50.457 -> I received: 141
12:20:53.648 -> I received: 0
12:20:53.648 -> I received: 101
12:20:53.648 -> I received: 227
12:20:55.316 -> I received: 0
12:20:55.316 -> I received: 172
12:20:55.361 -> I received: 172
12:20:55.361 -> I received: 246
12:20:56.530 -> I received: 0
12:20:56.530 -> I received: 200
12:20:56.575 -> I received: 99
12:20:56.575 -> I received: 101
12:20:57.655 -> I received: 0
12:20:57.655 -> I received: 176
12:20:57.655 -> I received: 172
12:20:57.655 -> I received: 254
12:20:59.271 -> I received: 0
12:20:59.271 -> I received: 202
12:20:59.271 -> I received: 99
12:21:00.124 -> I received: 0
12:21:00.124 -> I received: 101
12:21:00.124 -> I received: 227
12:21:00.932 -> I received: 0
12:21:00.932 -> I received: 170
12:21:00.978 -> I received: 141
12:21:01.742 -> I received: 0
12:21:01.742 -> I received: 202
12:21:01.742 -> I received: 99
12:21:01.742 -> I received: 229
12:21:02.643 -> I received: 0
12:21:02.643 -> I received: 168
12:21:02.688 -> I received: 141
12:21:02.688 -> I received: 253
[Ovu poruku je menjao DSL dana 24.02.2022. u 12:25 GMT+1]