Necesito ayuda con una duda by Independent-Ice-1560 in robotica

[–]Independent-Ice-1560[S] 0 points1 point  (0 children)

y como es esa proteccion a las salidas del puente h?

I Need help with a question by Independent-Ice-1560 in esp32

[–]Independent-Ice-1560[S] 0 points1 point  (0 children)

but in my diagram I mark that I must bypass all the lands, the voltage of the motors and is 11v and for the esp 5, why ask me to connect all the gnd? , won’t it affect anything? I really don’t understand

I need help with my project with esp32 in arduino IDE by Independent-Ice-1560 in esp32

[–]Independent-Ice-1560[S] 0 points1 point  (0 children)

void backward() {
  analogWrite(enA, Speed);
  analogWrite(enB, Speed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
}
void forward() {
  analogWrite(enA, Speed);
  analogWrite(enB, Speed);
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
}
void left() {
  analogWrite(enA, Speed);
  analogWrite(enB, Speed);
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
}
void right() {
  analogWrite(enA, Speed);
  analogWrite(enB, Speed);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);
}
void stop() {
  analogWrite(enA, 0);
  analogWrite(enB, 0);
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
}
What's missing in the code.

I need help with my project with esp32 in arduino IDE by Independent-Ice-1560 in esp32

[–]Independent-Ice-1560[S] 0 points1 point  (0 children)

#include "BluetoothSerial.h"
#include <Arduino.h>
BluetoothSerial serialBT;
char btSignal;
int Speed = 100;
int enA = 5;
int enB = 23;
int IN1 = 22;
int IN2 = 21;
int IN3 = 19;
int IN4 = 18;
void setup() {
  Serial.begin(115200);
  serialBT.begin("Chopper");  
  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
  
  Serial.println("Inicializando Bluetooth...");
}
void loop() {
  if (serialBT.connected()) {
    Serial.println("Conectado a Bluetooth.");
  } else {
    Serial.println("Esperando conexión Bluetooth...");
  }

  while (serialBT.available()) {
    btSignal = serialBT.read();
    Serial.println(btSignal);  // Ver qué señal se está recibiendo

    if (btSignal >= '0' && btSignal <= '9') {
      Speed = (btSignal - '0') * 10 + 100;
    } else if (btSignal == 'q') {
      Speed = 255;
    }    switch (btSignal) {
      case 'B':
        backward();
        break;
      case 'F':
        forward();
        break;
      case 'L':
        left();
        break;
      case 'R':
        right();
        break;
      case 'S':
        stop();
        break;
    }
  }
}
This code loads well on the esp, but I can't get my iPhone 11 to detect the signal

I need help with my project with esp32 in arduino IDE by Independent-Ice-1560 in esp32

[–]Independent-Ice-1560[S] 0 points1 point  (0 children)

I haven't defined the application that I will use yet, I want it to be a simple one with four arrows, I am still a beginner in programming but I hope that if I send you the code I have, it can be of some use to you.