Wifi not showing

Hello I made this zeus car than proceeded to connect to the wifi. It worked but after I uploaded new code than I tried reverting back to the old one by using the github but the wifi wouldn’t show I tried putting it in run position charging it checking my esp32 cam but every time my serial monitor prints garbage text which I thought was because of this Serial.begin(115200); but I tried every value and every time i get. Arduino ready as ESP32-CAM programmer

Arduino Car version 1.4.6

Initialzing...

SET+RESET

...[FAIL]

Arduino Car version 1.4.6

Initialzing...

SET+RESET

...[FAIL]

Arduino Car version 1.4.6

Initialzing...

SET+RESET

...[FAIL]

Ln 147, Col 3

Arduino UNO

on COM4

  1. The cyan lights show up but it the wifi wont show

Based on the serial information you provided, the issue is likely not caused by the baud rate setting in Serial.begin(115200);. The serial repeatedly shows:

SET+RESET
…[FAIL]

This indicates that the Arduino UNO is failing to initialize or reset the ESP32‑CAM module. As a result, the ESP32‑CAM cannot start its WiFi hotspot, which is why you don’t see the corresponding WiFi signal on your phone or computer.

Please follow these steps to check:

Send us the code you are currently running.

After the code is successfully uploaded, have you switched the mode switch to the Run side and pressed the Reset button?

Also, please take some photos of the Zeus Car expansion board and the ESP32‑CAM module and send them to us.

Thats the code for the main one I have also switched the run and upload switch```
/*******************************************************************
The control program of the Ardunio Mecanum wheel trolley.

Please install SunFounder Controller APP from APP Store(iOS) or Google Play(Android).

Development test environment:
- Arduino IDE 1.8.19
Board tools:
- Arduino AVR Boards 1.8.3
Libraries:
- IRLremote
- SoftPWM
- ArduinoJson

Version: 1.5.0
GitHub - sunfounder/zeus-car: SunFounder FPV Omni Car for Arduino · GitHub

Documentation:
Zeus Car - SunFounder Arduino Robot Car Kit — SunFounder Zeus Robot Car Kit for Arduino documentation

Author: Sunfounder
Website: http://www.sunfounder.com
https://docs.sunfounder.com

*******************************************************************/
#include “Zeus_Car.h”

/** Instantiate aicamera, a class for serial communication with ESP32-CAM */
AiCamera aiCam = AiCamera(NAME, TYPE);

/** global variables */
// current state
uint8_t currentState = STATE_IDLE;
// last state
uint8_t lastState = 255;
// line track power
uint8_t lineTrackPower = 0;
// obstacle power
uint8_t obstaclePower = 0;
// calibration State
uint8_t calibrationState = CALIBRATION_STATE_IDLE;
// last mode
uint8_t lastMode = 255;
// app control power
int8_t appControlPower = 0;
// app control angle
int16_t appControlAngle = 0;
// app control heading
int16_t appControlHeading = 0;
// app control rotatePower
int8_t appControlRotatePower = 0;
// app control move time ms
uint16_t appControlMoveTimeMs = 0;
// app control moving state
uint8_t appControlMovingState = MOVING_STATE_IDLE;
// app control move start time ms
uint32_t appControlMoveStartTimeMs = 0;
// remote control state
uint8_t remoteControlState = REMOTE_CONTROL_STATE_NONE;
// variable of esp32-cam flash lamp
bool cam_lamp_status = false;

/**

  • setup(), Ardunio main program entrance
  • Initialization of some peripherals
    */
    void setup() {
    int m = millis();
    Serial.begin(115200);
    Serial.print(F("Zeus Car version "));
    Serial.println(F(VERSION));

Serial.println(F(“Initialzing…”));
SoftPWMBegin(); // init softpwm, before the motors initialization and the rgb LEDs initialization
rgbBegin();
rgbWrite(ORANGE); // init hint
carBegin();
irBegin();
irObstacleBegin();
gsBegin();

aiCam.begin(AP_SSID, AP_PASSWORD, PORT, false);
aiCam.setOnReceivedBinary(onReceive);

while (millis() - m < 500) { // Wait for peripherals to be ready
delay(1);
}

#if WATCH_DOG
wdt_disable(); /* Disable the watchdog and wait for more than 2 seconds /
delay(3000); /
Done so that the Arduino doesn’t keep resetting infinitely in case of wrong configuration /
wdt_enable(WDTO_2S); /
Enable the watchdog with a timeout of 2 seconds */
#endif

Serial.println(F(“Okie!”));
rgbWrite(GREEN); // init finished
}

/**

  • loop(), Ardunio main loop

*/
void loop() {
if (lastState != currentState) {
Serial.print(F("State changed to "));
lastState = currentState;
switch (currentState) {
case STATE_IDLE: {
Serial.println(F(“IDLE”));
rgbWrite(COLOR_STATE_IDLE);
carStop();
break;
}
case STATE_IR: {
Serial.println(F(“IR Remote”));
currentMode = MODE_REMOTE_CONTROL;
rgbWrite(COLOR_STATE_IR);
if (lastState == STATE_APP) {
aiCam.reset(false);
}
break;
}
case STATE_APP: {
Serial.println(F(“APP”));
currentMode = MODE_REMOTE_CONTROL;
rgbWrite(COLOR_STATE_APP);
break;
}
default:
break;
}
}
switch (currentState) {
case STATE_IDLE:
{
aiCam.loop();
irRemoteHandler();
if (aiCam.ws_connected == true) {
currentState = STATE_APP;
}
break;
}
case STATE_APP:
{
// Serial.println(F(“aiCam loop”));
aiCam.loop();
// Serial.println(F(“aiCam loop done”));
handleSensorData();
if (aiCam.ws_connected == false) {
currentState = STATE_IDLE;
}
modeHandler();
break;
}
case STATE_IR:
{
irRemoteHandler();
modeHandler();
break;
}
default:
break;
}

#if WATCH_DOG
wdt_reset(); /* Reset the watchdog */
#endif

#if MEM
Serial.print(F("Free RAM = ")); // F function does the same and is now a built in library, in IDE > 1.0.0
Serial.println(freeMemory()); // print how much RAM is available in bytes.
#endif
}

/***************************** Functions ******************************/
// https://docs.arduino.cc/learn/programming/memory-guide
int freeRam() {
extern int __heap_start, *__brkval;
int v;
return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int)__brkval);
}

/**

  • modeHandler(), Execute the corresponding program according to the set mode
    • inclued
    • MODE_NONE
    • MODE_LINE_TRACK
    • MODE_OBSTACLE_FOLLOWING
    • MODE_OBSTACLE_AVOIDANCE
    • MODE_REMOTE_CONTROL
    • MODE_COMPASS_CALIBRATION
      /
      void modeHandler() {
      if (lastMode != currentMode) {
      // Serial.print(F("Mode Change: “));Serial.print(lastMode);Serial.print(F(” → "));Serial.println(currentMode);
      if (lastMode == MODE_COMPASS_CALIBRATION && calibrationState != CALIBRATION_STATE_CALIBRATED) {
      // Serial.print(F(“Calibration interrupted”));
      calibrationState = CALIBRATION_STATE_INTERRUPTED;
      }
      }
      lastMode = currentMode;
      switch (currentMode) {
      case MODE_LINE_TRACK_WITHOUT_MAG:
      // rgbWrite(COLOR_MODE_LINE_TRACK_NO_MAG);
      remotePower = LINE_TRACK_POWER;
      line_track(false);
      break;
      case MODE_LINE_TRACK_WITH_MAG:
      // rgbWrite(COLOR_MODE_LINE_TRACK_MAG);
      remotePower = LINE_TRACK_POWER;
      line_track(true);
      break;
      case MODE_OBSTACLE_FOLLOWING:
      // rgbWrite(COLOR_MODE_OBSTACLE_FOLLOWING);
      remotePower = OBSTACLE_FOLLOW_POWER;
      obstacleFollowing();
      break;
      case MODE_OBSTACLE_AVOIDANCE:
      // rgbWrite(COLOR_MODE_OBSTACLE_AVOIDANCE);
      remotePower = OBSTACLE_AVOID_POWER;
      obstacleAvoidance();
      break;
      case MODE_REMOTE_CONTROL:
      // rgbWrite(COLOR_STATE_APP);
      // Serial.print(“TEST MODE_REMOTE_CONTROL, angle:”);
      // Serial.print(appControlAngle);
      // Serial.print("power: ");
      // Serial.print(appControlPower);
      // Serial.print("rot: ");
      // Serial.println(appControlRotatePower);
      switch (remoteControlState) {
      case REMOTE_CONTROL_STATE_CAR_CENTRIC:
      carMove(appControlAngle, appControlPower, appControlRotatePower);
      break;
      case REMOTE_CONTROL_STATE_FIELD_CENTRIC:
      carMoveFieldCentric(appControlAngle, appControlPower, appControlHeading);
      break;
      case REMOTE_CONTROL_STATE_NONE:
      break;
      // If move time is not zero, the car will move for the specified time and then stop.
      if (appControlMoveTimeMs > 0) {
      // If the car is not moving, start moving
      if (appControlMovingState == MOVING_STATE_IDLE) {
      appControlMoveStartTimeMs = millis();
      appControlMovingState = MOVING_STATE_MOVING;
      } else {
      // If the car is moving, check if the time is up
      uint32_t elapsedTimeMs = millis() - appControlMoveStartTimeMs;
      if (elapsedTimeMs >= appControlMoveTimeMs) {
      appControlMovingState = MOVING_STATE_IDLE;
      appControlPower = 0;
      appControlAngle = 0;
      appControlHeading = 0;
      appControlRotatePower = 0;
      appControlMoveTimeMs = 0;
      appControlMoveStartTimeMs = 0;
      carStop();
      }
      }
      }
      }
      // carMoveFieldCentric(remoteAngle, remotePower, remoteHeading);
      // lastRemotePower = remotePower;
      break;
      case MODE_COMPASS_CALIBRATION:
      #if WATCH_DOG
      wdt_disable(); /
      Disable the watchdog and wait for more than 2 seconds /
      #endif
      bool changed = compassCalibrateLoop();
      if (changed) {
      rgbWrite(GREEN);
      delay(20);
      rgbOff();
      }
      if (compassCalibrateDone()) {
      currentMode = MODE_REMOTE_CONTROL;
      calibrationState = CALIBRATION_STATE_CALIBRATED;
      carStop();
      }
      #if WATCH_DOG
      wdt_enable(WDTO_2S); /
      Enable the watchdog with a timeout of 2 seconds */
      #endif
      default:
      break;
      }
      }

/**

  • stopAll(), Stop the car
    */
    void stopAll() {
    currentMode = MODE_REMOTE_CONTROL;
    remoteControlState = REMOTE_CONTROL_STATE_NONE;
    appControlPower = 0;
    appControlAngle = 0;
    appControlHeading = 0;
    appControlRotatePower = 0;
    appControlMoveTimeMs = 0;
    appControlMovingState = MOVING_STATE_IDLE;
    appControlMoveStartTimeMs = 0;
    calibrationState = CALIBRATION_STATE_IDLE;
    rgbOff();
    carStop();
    }

/**

  • Line track program
  • @param useMag whether to use the geomagnetic sensor to keep the direction of the car,
  •           true(default), use the geomagnetic sensor,
    
  •           false, without the geomagnetic sensor
    

*/
void line_track(bool useMag) {
uint16_t result = gsGetAngleOffset();
uint8_t angleType = result >> 8 & 0xFF;
uint8_t offsetType = result & 0xFF;
int16_t angle = 0;
int8_t offset = 0;

switch (angleType) {
case ANGLE_N45:
angle = -45;
break;
case ANGLE_0:
angle = 0;
break;
case ANGLE_45:
angle = 45;
break;
case ANGLE_90:
angle = 90;
break;
case ANGLE_ERROR:
angle = currentAngle;
break;
}
switch (offsetType) {
case OFFSET_N1:
offset = -1;
break;
case OFFSET_0:
offset = 0;
break;
case OFFSET_1:
offset = 1;
break;
case OFFSET_ERROR:
offset = 0;
break;
}

int16_t deltaAngle = currentAngle - angle;
if (deltaAngle > 180) {
deltaAngle -= 360;
} else if (deltaAngle < -180) {
deltaAngle += 360;
}

if (deltaAngle > 90) {
angle -= 180;
offset *= -1;
} else if (deltaAngle < -90) {
angle += 180;
offset *= -1;
}
currentAngle = angle + (offset * LINE_TRACK_OFFSET_ANGLE);

if (useMag) {
carMoveFieldCentric(currentAngle, lineTrackPower, 0, false, true);
} else {
carMove(currentAngle, lineTrackPower, 0, false);
}
}

/**

  • Obstacle follow program
    */
    void obstacleFollowing() {
    byte result = irObstacleRead();
    bool leftIsClear = result & 0b00000001;
    bool rightIsClear = result & 0b00000010;
    float usDistance = ultrasonicRead();

if (usDistance < 4) {
carStop();
} else if (usDistance < 10) {
carForward(30);
} else if (usDistance < FOLLOW_DISTANCE) {
carForward(OBSTACLE_FOLLOW_POWER);
} else {
if (!leftIsClear) {
carTurnLeft(obstaclePower);
} else if (!rightIsClear) {
carTurnRight(obstaclePower);
} else {
carStop();
}
}
}

/**

  • Obstacle avoidance program
    */
    int8_t last_clear = -1; // last_clear, 1, left; -1, right;
    bool last_forward = false;

void obstacleAvoidance() {
byte result = irObstacleRead();
bool leftIsClear = result & 0b00000001;
bool rightIsClear = result & 0b00000010;
bool middleIsClear = ultrasonicIsClear();

if (middleIsClear && leftIsClear && rightIsClear) { // 111
last_forward = true;
carForward(OBSTACLE_AVOID_POWER);
} else {
if ((leftIsClear && rightIsClear) || (!leftIsClear && !rightIsClear)) { // 101, 000, 010
carMove(0, 0, last_clear * 50); // last_clear=1, turn left
last_forward = false;
} else if (leftIsClear) { // 100, 110
if (last_clear == 1 || last_forward == true) {
carTurnLeft(OBSTACLE_AVOID_POWER);
last_clear = 1;
last_forward = false;
}
} else if (rightIsClear) { // 001, 011
if (last_clear == -1 || last_forward == true) {
carTurnRight(OBSTACLE_AVOID_POWER);
last_clear = -1;
last_forward = false;
}
}
}
}

/**

  • irRemoteHandler, handle IR remote control key events
    */
    void irRemoteHandler() {

uint8_t key = irRead();
if (key == IR_KEY_ERROR) {
return; // No key pressed
} else {
remotePower = IR_REMOTE_POWER;
currentState = STATE_IR;
}

int8_t cmd_code = ir_key_2_cmd_code(key);
if (cmd_code != -1) {
currentMode = MODE_REMOTE_CONTROL;
cmd_fuc_tablecmd_code;
} else {
switch (key) {
case IR_KEY_MODE:
break;
case IR_KEY_MUTE:
currentMode = MODE_COMPASS_CALIBRATION;
carMove(0, 0, CAR_CALIBRATION_POWER);
compassCalibrateStart();
break;
case IR_KEY_PLAY_PAUSE:
carResetHeading();
currentMode = MODE_LINE_TRACK_WITH_MAG;
break;
case IR_KEY_EQ:
carResetHeading();
currentMode = MODE_LINE_TRACK_WITHOUT_MAG;
break;
case IR_KEY_BACKWARD:
carResetHeading();
currentMode = MODE_OBSTACLE_FOLLOWING;
break;
case IR_KEY_FORWARD:
carResetHeading();
currentMode = MODE_OBSTACLE_AVOIDANCE;
break;
case IR_KEY_MINUS: // drift left
currentMode = MODE_REMOTE_CONTROL;
remoteAngle = 0;
remotePower = lastRemotePower;
remoteHeading = -90;
remoteDriftEnable = true;
carResetHeading();
break;
case IR_KEY_PLUS: // drift right
currentMode = MODE_REMOTE_CONTROL;
remoteAngle = 0;
remotePower = lastRemotePower;
remoteHeading = 90;
remoteDriftEnable = true;
carResetHeading();
break;
case IR_KEY_0: // Reset origin direction
currentMode = MODE_REMOTE_CONTROL;
remoteAngle = 0;
remotePower = 0;
remoteHeading = 0;
remoteDriftEnable = false;
carStop();
carResetHeading();
break;
}
}
}

/**

  • websocket received data processing
    */
    void onReceive() {
    Serial.print(“onReceive:”);
    for (int i = 0; i < aiCam.recvBufferLength; i++) {
    Serial.print(aiCam.recvBuffer[i], HEX);
    Serial.print(" “);
    }
    Serial.println(” “);
    for (int i = 0; i < aiCam.recvBufferLength; i++) {
    uint8_t entityId = aiCam.recvBuffer[i];
    switch (entityId) {
    case 0x01: // Car move car centric
    {
    i += 1;
    uint8_t angleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t angleLSB = aiCam.recvBuffer[i];
    i += 1;
    int8_t movePower = aiCam.recvBuffer[i];
    i += 1;
    int8_t rotatePower = aiCam.recvBuffer[i];
    int16_t angle = (angleMSB << 8) | angleLSB;
    // Serial.println(“Car move car centric”);
    // Serial.print(“angle:”);Serial.println(angle);
    // Serial.print(“movePower:”);Serial.println(movePower);
    // Serial.print(“rotatePower:”);Serial.println(rotatePower);
    // carMove(angle, movePower, rotatePower);
    appControlAngle = angle;
    appControlPower = movePower;
    appControlRotatePower = rotatePower;
    currentMode = MODE_REMOTE_CONTROL;
    remoteControlState = REMOTE_CONTROL_STATE_CAR_CENTRIC;
    break;
    }
    case 0x02: // Car move field centric
    {
    i += 1;
    uint8_t moveAngleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t moveAngleLSB = aiCam.recvBuffer[i];
    i += 1;
    int8_t movePower = aiCam.recvBuffer[i];
    i += 1;
    uint8_t headingAngleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t headingAngleLSB = aiCam.recvBuffer[i];
    int16_t moveAngle = (moveAngleMSB << 8) | moveAngleLSB;
    int16_t headingAngle = (headingAngleMSB << 8) | headingAngleLSB;
    // Serial.println(F(“Car move field centric”));
    // Serial.print(F(“moveAngle:”));Serial.println(moveAngle);
    // Serial.print(F(“movePower:”));Serial.println(movePower);
    // Serial.print(F(“headingAngle:”));Serial.println(headingAngle);
    // carMoveFieldCentric(moveAngle, movePower, headingAngle);
    appControlAngle = moveAngle;
    appControlPower = movePower;
    appControlHeading = headingAngle;
    currentMode = MODE_REMOTE_CONTROL;
    remoteControlState = REMOTE_CONTROL_STATE_FIELD_CENTRIC;
    break;
    }
    case 0x03: // Direct motor control
    {
    i += 1;
    int8_t motor0 = aiCam.recvBuffer[i];
    i += 1;
    int8_t motor1 = aiCam.recvBuffer[i];
    i += 1;
    int8_t motor2 = aiCam.recvBuffer[i];
    i += 1;
    int8_t motor3 = aiCam.recvBuffer[i];
    // Serial.println(F(“Direct motor control”));
    // Serial.print(F(“motor0:”));Serial.println(motor0);
    // Serial.print(F(“motor1:”));Serial.println(motor1);
    // Serial.print(F(“motor2:”));Serial.println(motor2);
    // Serial.print(F(“motor3:”));Serial.println(motor3);
    currentMode = MODE_REMOTE_CONTROL;
    remoteControlState = REMOTE_CONTROL_STATE_NONE;
    carSetMotors(motor0, motor1, motor2, motor3);
    break;
    }
    case 0x04: // RGB control
    {
    i += 1;
    uint8_t r = aiCam.recvBuffer[i];
    i += 1;
    uint8_t g = aiCam.recvBuffer[i];
    i += 1;
    uint8_t b = aiCam.recvBuffer[i];
    // Serial.println(F(“Set RGB: (”));Serial.print(r);
    // Serial.print(F(”, “));Serial.print(g);
    // Serial.print(F(”, “));Serial.print(b);Serial.println(”)“);
    rgbWrite(r, g, b);
    break;
    }
    case 0x05: // Set User Heading
    {
    i += 1;
    uint8_t userHeadingMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t userHeadingLSB = aiCam.recvBuffer[i];
    int16_t userHeading = (userHeadingMSB << 8) | userHeadingLSB;
    // Serial.print(F(“Set Heading: “));Serial.println(userHeading);
    carSetHeading(userHeading);
    break;
    }
    case 0x06: // Calibrate compass
    {
    i += 1;
    uint8_t state = aiCam.recvBuffer[i];
    if (state == 0) {
    // Serial.println(F(“Compass calibration stop”));
    currentMode = MODE_REMOTE_CONTROL;
    calibrationState = CALIBRATION_STATE_INTERRUPTED;
    carStop();
    } else if (state == 1) {
    if (currentMode == MODE_COMPASS_CALIBRATION) break;
    Serial.println(F(“Calibrate compass”));
    carMove(0, 0, CAR_CALIBRATION_POWER);
    compassCalibrateStart();
    currentMode = MODE_COMPASS_CALIBRATION;
    calibrationState = CALIBRATION_STATE_CALIBRATING;
    }
    break;
    }
    case 0x07: // Line Track mode
    {
    i += 1;
    uint8_t state = aiCam.recvBuffer[i];
    i += 1;
    uint8_t mag = aiCam.recvBuffer[i];
    i += 1;
    lineTrackPower = aiCam.recvBuffer[i];
    // Serial.print(F(“Line Track”));
    if (state == 1) {
    // Serial.print(F(” ON”));
    if (mag == 1) {
    // Serial.print(F(” with mag"));
    currentMode = MODE_LINE_TRACK_WITH_MAG;
    } else {
    // Serial.print(F(" without mag"));
    currentMode = MODE_LINE_TRACK_WITHOUT_MAG;
    }
    } else {
    // Serial.print(F(" OFF"));
    currentMode = MODE_REMOTE_CONTROL;
    carStop();
    }
    // Serial.print(F(" power:“));Serial.println(lineTrackPower);
    break;
    }
    case 0x08: // Obstacle mode
    {
    i += 1;
    uint8_t state = aiCam.recvBuffer[i];
    i += 1;
    uint8_t mode = aiCam.recvBuffer[i];
    i += 1;
    obstaclePower = aiCam.recvBuffer[i];
    // Serial.print(F(“Obstacle “));
    if (state) {
    // Serial.print(F(” ON”));
    if (mode == 0) {
    // Serial.print(F(” avoidance"));
    currentMode = MODE_OBSTACLE_AVOIDANCE;
    } else {
    // Serial.print(F(" following"));
    currentMode = MODE_OBSTACLE_FOLLOWING;
    }
    } else {
    // Serial.print(F(" OFF"));
    currentMode = MODE_REMOTE_CONTROL;
    carStop();
    }
    // Serial.print(F(" power:"));Serial.println(obstaclePower);
    break;
    }
    case 0x09: // Car move car centric for ms
    {
    i += 1;
    uint8_t angleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t angleLSB = aiCam.recvBuffer[i];
    i += 1;
    int8_t movePower = aiCam.recvBuffer[i];
    i += 1;
    int8_t rotatePower = aiCam.recvBuffer[i];
    i += 1;
    int8_t moveTimeMsMSB = aiCam.recvBuffer[i];
    i += 1;
    int8_t moveTimeMsLSB = aiCam.recvBuffer[i];

       int16_t angle = (angleMSB << 8) | angleLSB;
       int16_t moveTimeMs = (moveTimeMsMSB << 8) | moveTimeMsLSB;
       // Serial.println("Car move car centric for ms");
       // Serial.print("angle:");Serial.println(angle);
       // Serial.print("movePower:");Serial.println(movePower);
       // Serial.print("rotatePower:");Serial.println(rotatePower);
       // Serial.print("moveTimeMs:");Serial.println(moveTimeMs);
       appControlAngle = angle;
       appControlPower = movePower;
       appControlRotatePower = rotatePower;
       currentMode = MODE_REMOTE_CONTROL;
       remoteControlState = REMOTE_CONTROL_STATE_CAR_CENTRIC;
       appControlMoveTimeMs = moveTimeMs;
       break;
     }
    

    case 0x0A: // Car move field centric for ms
    {
    i += 1;
    uint8_t moveAngleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t moveAngleLSB = aiCam.recvBuffer[i];
    i += 1;
    int8_t movePower = aiCam.recvBuffer[i];
    i += 1;
    uint8_t headingAngleMSB = aiCam.recvBuffer[i];
    i += 1;
    uint8_t headingAngleLSB = aiCam.recvBuffer[i];
    int16_t moveAngle = (moveAngleMSB << 8) | moveAngleLSB;
    int16_t headingAngle = (headingAngleMSB << 8) | headingAngleLSB;
    // Serial.println(F(“Car move field centric for ms”));
    // Serial.print(F(“moveAngle:”));Serial.println(moveAngle);
    // Serial.print(F(“movePower:”));Serial.println(movePower);
    // Serial.print(F(“headingAngle:”));Serial.println(headingAngle);
    // carMoveFieldCentric(moveAngle, movePower, headingAngle);
    appControlAngle = moveAngle;
    appControlPower = movePower;
    appControlHeading = headingAngle;
    currentMode = MODE_REMOTE_CONTROL;
    remoteControlState = REMOTE_CONTROL_STATE_FIELD_CENTRIC;
    break;
    }
    case 0x0B: // Stop
    {
    // Serial.println(F(“Stop”));
    stopAll();
    break;
    }
    case 0x0C: // Front light control
    {
    i += 1;
    uint8_t state = aiCam.recvBuffer[i];
    // Serial.print(F(“Front light control:”));Serial.println(state);
    if (state) {
    cam_lamp_status = true;
    aiCam.lamp_on(5); //turn on cam lamp, level 0 ~ 10
    } else{
    cam_lamp_status = false;
    aiCam.lamp_off();
    }
    break;
    }
    }
    }
    }

void handleSensorData() {
uint8_t toSend[WS_BUFFER_SIZE];
int index = 0;
toSend[index] = WS_DATA_START_BIT;

// data length placeholder
index += 1;
toSend[index] = 0x00;

// checksum placeholder
index += 1;
toSend[index] = 0x00;

// UltraSonic
index += 1;
toSend[index] = 0x81;
uint16_t ultrasonicMM = ultrasonicRead() * 10.0;
uint8_t ultrasonicMMMSB = ultrasonicMM >> 8;
uint8_t ultrasonicMMLS = ultrasonicMM & 0xFF;
index += 1;
toSend[index] = ultrasonicMMMSB;
index += 1;
toSend[index] = ultrasonicMMLS;

// IR Obstacle
index += 1;
toSend[index] = 0x82;
uint8_t irObstacle = irObstacleRead();
index += 1;
toSend[index] = irObstacle;

// Grayscale Value
index += 1;
toSend[index] = 0x83;
uint8_t grayscale = gsRead();
index += 1;
toSend[index] = grayscale;

// Grayscale State
index += 1;
toSend[index] = 0x84;
uint16_t grayscaleState = gsGetAngleOffset();
uint8_t grayscaleAngle = grayscaleState >> 8;
uint8_t grayscaleOffset = grayscaleState & 0xFF;
index += 1;
toSend[index] = grayscaleAngle | grayscaleOffset << 3;

// User Heading
index += 1;
toSend[index] = 0x85;
int16_t userHeading = carGetHeading();
// Serial.print(“userHeading:”);Serial.println(userHeading);
uint8_t userHeadingMSB = userHeading >> 8;
uint8_t userHeadingLSB = userHeading & 0xFF;
index += 1;
toSend[index] = userHeadingMSB;
index += 1;
toSend[index] = userHeadingLSB;

// Car Heading
index += 1;
toSend[index] = 0x86;
int16_t carHeading = compassReadAngle();
// Serial.print(“car heading:”);Serial.println(carHeading);
uint8_t carHeadingMSB = carHeading >> 8;
uint8_t carHeadingLSB = carHeading & 0xFF;
index += 1;
toSend[index] = carHeadingMSB;
index += 1;
toSend[index] = carHeadingLSB;

// Calibration State
index += 1;
toSend[index] = 0x87;
index += 1;
toSend[index] = calibrationState;

// Car Moving State
index += 1;
toSend[index] = 0x88;
index += 1;
toSend[index] = appControlMovingState;

// End bit
index += 1;
toSend[index] = WS_DATA_END_BIT;

uint8_t payloadLength = index + 1;

// Data length
toSend[1] = payloadLength - 4;

// Checksum
uint8_t checksum = 0;
for (int i = 0; i < payloadLength - 1; i++) {
checksum ^= toSend[i];
}
toSend[2] = checksum;

aiCam.sendBinaryData(toSend, payloadLength);
}

Apologize for the confusion in my previous message. I meant to ask for a screenshot or the code file, but my wording was incorrect.

From your description, it seems you have downloaded the wrong code. The version you used (1.5) is intended for new Scratch software compatibility and has not been released yet.

Please use one of the following methods to upload the correct code:

Method 1 – Download the correct code directly:

https://github.com/sunfounder/zeus-car/archive/refs/heads/main.zip

Method 2 – Follow the tutorial to upload the code via the update-arduino-firmware.bat script:

https://docs.sunfounder.com/projects/zeus-car/en/latest/faq.html#how-to-upload-the-zeus-car-ino-code

Both methods will upload the Zeus_Car.ino file to the Uno R3 board. You can choose either one.

After the code is successfully uploaded:

Reconnect the ESP32‑CAM module.

Press the Reset button on the board.

You should now see the Zeus Car WiFi network on your mobile device.

If you still encounter any issues, please let me know.

I have tried to buy a new esp32 cam because the other one was not working i am using a FT232 adapter but when I try to upload it i get an error I have tried to use a slower baud or even switch the TXD and RXD and tried to time the rst button with the connection the esp32 cam I bought is the same its a Esp32-32S

Thank you for your message.

If you purchased the same kit as ours, you do not need an FT232 adapter to flash the firmware. You can simply insert the ESP32 CAM into the Camera Adapter Board, and then use the Uno R3 board to update the ESP32 CAM firmware.

In my previous reply, I asked you to update the Uno R3 code because you had uploaded the wrong version (1.5).

Now that you have purchased a new ESP32-S module, you need to upload the correct firmware to it. Please follow the steps below:

Steps to flash the ESP32 CAM firmware:
Download the firmware from the following link:
https://github.com/sunfounder/ai-camera-firmware/archive/refs/tags/1.4.3.zip

Extract the downloaded zip file, then navigate to the following folder:
ai-camera-firmware-1.4.3\burn-esp32-cam-bat

Double-click install_ESP32.bat and wait for the flashing process to complete.

Additional observation from your photo:
In the photo you attached, the D1 LED on the Camera Adapter Board is not lit. This could indicate:

The ESP32 CAM module is faulty, or

The 7‑pin cable is defective

Please try using a different 7‑pin cable and test again.

Let me know the results. Thank you for your patience and cooperation.

yeah I tried that already but I keep getting an error i got a new esp32 and the led is red now but this is still appearing C:\Users\yosya\Downloads\ai-camera-firmware\burn-esp32-cam-bat>set baud=921600

C:\Users\yosya\Downloads\ai-camera-firmware\burn-esp32-cam-bat>set factory_firmware=“ai-camera-firmware.v1.4.3-factory.bin”

C:\Users\yosya\Downloads\ai-camera-firmware\burn-esp32-cam-bat>esptool.exe --chip esp32 --baud 921600 --before default_reset erase_flash
esptool.py v4.5.1
Found 2 serial ports
Serial port COM4
Connecting…
COM4 failed to connect: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool latest documentation
Serial port COM3
Connecting…
COM3 failed to connect: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool latest documentation

A fatal error occurred: Could not connect to an Espressif device on any of the 2 available serial ports.

C:\Users\yosya\Downloads\ai-camera-firmware\burn-esp32-cam-bat>esptool.exe --chip esp32 --baud 921600 --before default_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size 4MB 0x0 “ai-camera-firmware.v1.4.3-factory.bin”
esptool.py v4.5.1
Found 2 serial ports
Serial port COM4
Connecting…
COM4 failed to connect: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool latest documentation
Serial port COM3
Connecting…
COM3 failed to connect: Failed to connect to ESP32: No serial data received.
For troubleshooting steps visit: Troubleshooting - ESP32 - — esptool latest documentation

A fatal error occurred: Could not connect to an Espressif device on any of the 2 available serial ports.

C:\Users\yosya\Downloads\ai-camera-firmware\burn-esp32-cam-bat>pause
Press any key to continue . . .

I have also tried uploading code to my Arduino but it keeps giving me text in the serial monitor from the old code I have tried holding down reset button and everything but nothing seems to work this was working perfectly fine a couple of days ago.

Thank you for your additional explanation.

Since you are now using an FT232 adapter and have already tried:

Lowering the baud rate

Swapping TXD / RXD

Adjusting the RST timing

The issue now appears to be that the ESP32 CAM is not entering download mode correctly, or there is a connection problem between the FT232 adapter and the ESP32 CAM.

Please double‑check the following wiring:

FT232 TXD → ESP32 U0R
FT232 RXD → ESP32 U0T
GND → GND
5V → 5V

Flashing procedure:
Connect IO0 to GND on the ESP32 CAM.

Press the RST button (or power cycle the ESP32 CAM).

Run the flashing command.

After flashing is complete, disconnect IO0 from GND.

Power supply:
Since the ESP32‑CAM draws higher current during flashing, we recommend powering the FT232 adapter with 5V (not 3.3V).

From your log:

Failed to connect to ESP32: No serial data received

This usually means the ESP32 did not enter the correct download mode – it is not a problem with the firmware file itself.

Please also confirm:
Does only one correct COM port appear in Windows Device Manager?

Is the FT232 driver installed properly?

After powering on the ESP32‑CAM, is the red LED solid on?

Finally, please send us a clear photo showing the current wiring between the FT232 adapter and the ESP32‑CAM, and if possible, a short video of your entire flashing procedure. This will help us identify the issue more accurately.You can also upload the video to Google Drive or OneDrive and share the link with me.

Thank you for your patience and cooperation.

2 Com appears com4 and Com 3 but Com3 seems like its built into the computer. The red Led is on. Also my arduino when I upload code it seems perfectly fine but when I go to serial monitor it shows me old text that I thought I overwritten because I uploaded new code.

like it gives me Sketch uses 1678 bytes (5%) of program storage space. Maximum is 32256 bytes.
Global variables use 218 bytes (10%) of dynamic memory, leaving 1830 bytes for local variables. Maximum is 2048 bytes.
“C:\Users\yosya\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/bin/avrdude” “-CC:\Users\yosya\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1/etc/avrdude.conf” -v -patmega328p -carduino “-PCOM4” -b115200 -D “-Uflash:w:C:\Users\yosya\AppData\Local\arduino\sketches\EEA5AAA1059759410C6BBC10A30F018F/sketch_apr19a.ino.hex:i”
Avrdude version 8.0-arduino.1
Copyright see avrdude/AUTHORS at main · avrdudes/avrdude · GitHub

System wide configuration file is C:\Users\yosya\AppData\Local\Arduino15\packages\arduino\tools\avrdude\8.0.0-arduino1\etc\avrdude.conf

Using port : COM4
Using programmer : arduino
Setting baud rate : 115200
AVR part : ATmega328P
Programming modes : SPM, ISP, HVPP, debugWIRE
Programmer type : Arduino
Description : Arduino bootloader using STK500 v1 protocol
HW Version : 3
FW Version : 4.4

AVR device initialized and ready to accept instructions
Device signature = 1E 95 0F (ATmega328P, ATA6614Q, LGT8F328P)
Reading 1678 bytes for flash from input file sketch_apr19a.ino.hex
in 1 section [0, 0x68d]: 14 pages and 114 pad bytes
Writing 1678 bytes to flash
Writing | ################################################## | 100% 0.23s
Reading | ################################################## | 100% 0.21s
Warning: flash verification mismatch
device 0x62 != input 0x0c at addr 0x0000 (error)
device 0x62 != input 0x94 at addr 0x0001 (error)
device 0x62 != input 0x35 at addr 0x0002 (error)
device 0x62 != input 0x00 at addr 0x0003 (error)
device 0x62 != input 0x0c at addr 0x0004 (error)
device 0x62 != input 0x94 at addr 0x0005 (error)
device 0x62 != input 0x5d at addr 0x0006 (error)
device 0x62 != input 0x00 at addr 0x0007 (error)
device 0x62 != input 0x0c at addr 0x0008 (error)
device 0x62 != input 0x94 at addr 0x0009 (error)
suppressing further verification errors
Error: flash verification mismatch

Avrdude done. Thank you.
Failed uploading: uploading error: exit status 1 error when i upload

Thank you for your continued efforts. I feel that our communication has become a bit confusing. Previously you were asking about ESP32‑CAM firmware flashing, and now you are encountering an UNO R3 code upload issue.

To make progress, I suggest that we focus on one issue at a time, and email (support@sunfounder.com) is a better channel for step‑by‑step troubleshooting.

Let’s concentrate on the UNO R3 upload problem first.

From the log you provided, the code did not upload successfully. The key error is:
Warning: flash verification mismatch
Error: flash verification mismatch
Failed uploading: uploading error: exit status 1

This means that after the Arduino IDE wrote the code to the board, the verification step (reading back the flashed content) found that it did not match the intended program. Therefore, the old program is still running, which is why you still see the old text in the Serial Monitor.

Additional observations:
COM4 appears to be the correct port.

The red LED being solid usually only indicates that the board is receiving power.

Please try the following steps:
In the Arduino IDE, confirm that the board selected is Arduino Uno.

Use COM4(do not use COM3).

Close the Serial Monitor before uploading.

Disconnect the ESP32‑CAM from the board before uploading (it shares the same RX/TX pins).

Try a different USB cable or a different USB port on your computer.

For detailed instructions, please refer to:

:backhand_index_pointing_right: https://docs.sunfounder.com/projects/zeus-car/en/latest/faq.html#how-to-upload-the-zeus-car-ino-code

Once we resolve the UNO R3 upload issue, we can then move on to the ESP32‑CAM firmware flashing. Tackling one problem at a time will make it much easier to identify the root cause.

Please let me know the result after trying the steps above.

I have tried all those methods Like for example the esp32 cam Was never plugged in so it couldn’t be that I have confirmed the port and the board serveral times.

Thank you for your patience, and I apologize for the confusion in our previous communications. To move forward effectively, let’s focus on one fundamental question first: Can your Arduino UNO R3 successfully upload any code at all?

Based on the log you provided on May 27, the flash verification mismatch error indicates that the code is not actually being written to the UNO.

Please follow these steps carefully and let me know the result of each step:

Step 1 – Disconnect everything
Disconnect all accessories from the UNO R3, including:ESP32‑CAM/Any expansion boards/The 7‑pin ribbon cable/Any sensors or other wiring

Leave only the USB cable connected to your computer.

Step 2 – Upload a simple test sketch
Open the Arduino IDE, then go to:File → Examples → 01.Basics → Blink,Then select the board: Arduino Uno,Select the port: COM4

**Make sure the Serial Monitor is closed before uploading.**Click the Upload button.

Step 3 – Observe the result
Does the Blink example upload successfully? (If successful, the onboard LED on the UNO will start blinking.)If it fails, please send me the complete error log.

Why this step is important
Only when this basic test succeeds can we be sure that your UNO board and computer environment are working correctly. After that, we will gradually reconnect the accessories one by one to find the real cause of the WiFi issue.

Yes I burned the bootloader by buying another Arduino. It took me a couple of tries but like magic it worked. Thanks this has taken me very long

Just to confirm – does this mean that your Uno R3 can now upload code successfully?

Yes this means the upload code is can successfuly upload now

That’s great to hear. Are you now able to configure the Zeus Car successfully and use it as intended? Or have you reached a certain stage where you need further assistance from us?

Please let us know the current status, and if you are still facing any issues, feel free to describe them. We are here to help.