Ir al contenido principal

Entradas

Mostrando entradas de noviembre, 2025

Presentación carro a control remoto por bluetooth

 

Bitacora proyecto carro a control remoto por bluetooth

 

Carro en 3D y carro terminado

 Carro a control remoto terminado y su version en 3D

Codigo carro a conteol remoto por bluetooth

#include <SoftwareSerial.h> #include <Servo.h> // CONEXIONES PARA EL BLUETOOTH. int bluetoothTx = 2; int bluetoothRx = 3; SoftwareSerial bluetooth(bluetoothTx, bluetoothRx); // MOTOR 1. int Motor1A = 5; int Motor1B = 6; // MOTOR 2. int Motor2A = 9; int Motor2B = 10; void setup () { bluetooth.begin(115200); bluetooth.print("$$$"); delay(100); bluetooth.println("U,9600,N"); bluetooth.begin(9600); pinMode( Motor1A, OUTPUT ); pinMode( Motor2A, OUTPUT ); pinMode( Motor1B, OUTPUT ); pinMode( Motor2B, OUTPUT ); digitalWrite( Motor1A, LOW ); digitalWrite( Motor2A, LOW ); digitalWrite( Motor1B, LOW ); digitalWrite( Motor2B, LOW ); } int flag1 = -1; int flag2 = -1; void loop() { if(bluetooth.available()) { char toSend = (char)bluetooth.read(); if(toSend == 'S') { flag1 = 0; flag2 = 0; digitalWrite( Motor1A, LOW); analogWrite( Motor1B, LOW); digitalWrite( Motor2A, LOW), analogWrite( Motor2B, LOW); } if( toSend == 'F' || toSend == ...