Got this ESP32 cam with USB adaptor board.
Can upload sketches, but can't get any serial output from it in the serial monitor.
Gut feeling is that it's something to do with these buttons on the adaptor board?
I uploaded a blink sketch to the ESP32 (I can get the LED to blink but not the flash) and it runs when it's powered from it's pins, but not when it's in the adaptor board.
Tried to get pass-through serial working via an Arduino Nano that I have (using SoftwareSerial) like this
#include <SoftwareSerial.h>
SoftwareSerial esp = SoftwareSerial(10 /* D3 brown TX */, 11 /* D3 orange TX */);
void setup() {
Serial.begin(9600);
esp.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
Serial.println("esp32_cam_arduino_serial started");
}
long n = 0;
void loop() {
while (esp.available()) {
Serial.write(esp.read());
}
while (Serial.available()) {
esp.write(Serial.read());
}
n++;
if( n == 2000000) {
Serial.println("esp32_cam_arduino_serial");
n = 0;
}
}
but it doesn't work and I can't work out why.
What are these buttons on the adaptor board for?
There's a button on the ESP32-CAM too -- what's that?
Here's the blink sketch.
/*
ESP32S3 Dev: A fatal error occurred: This chip is ESP32 not ESP32-S3. Wrong --chip argument?
ESP32S2 Dev: A fatal error occurred: This chip is ESP32 not ESP32-S2. Wrong --chip argument?
ESP32 Dev: Uploads but no serial.
*/
int pin = 33;
void setup() {
Serial.begin(9600);
Serial.println("***"); // Isn't received
pinMode(pin, OUTPUT);
pinMode(4, OUTPUT); // Causes a brief flash...
digitalWrite(4, HIGH);
delay(250); // ...but not as long as this.
digitalWrite(4, LOW);
// This does nothing.
for(int i = 0; i < 12; i++) {
// This causes blinking.
digitalWrite(pin, HIGH);
delay(250);
digitalWrite(pin, LOW);
delay(250);
}
}
int n = 0;
void loop() {
// No blinking and no serial output.
for(int i=0; i < n; i++){
digitalWrite(pin, HIGH);
Serial.print("*");
delay(250);
digitalWrite(pin, LOW);
delay(250);
}
Serial.println();
if( n == 12) {
n = 0;
}
n++;
delay(2000);
}

