Robot car with ESP3...
 
Notifications
Clear all

Robot car with ESP32-CAM controlling L298N via RC receiver

28 Posts
5 Users
6 Likes
4,324 Views
Xenophon
(@xenophon)
Member
Joined: 2 years ago
Posts: 12
Topic starter  

Hi all.  Thank you for the warm welcome 🍾 

Maybe someone can give some advice.  

I am busy with the robot car project. The content I find, connects the serial output of receiver to the Arduino uno.

 

Camera Car

Fine, it works well.  I followed another guy's build, where he built a robot car with the ESP32-CAM. Works ok as it is connected with phone over wifi.  I found it is not very stable and the range is very limited.

My plan:

1. Use the ESP32-CAM to control a L298N and send only the video over wifi to phone / cloud.

2. Use RC receiver serial output (iBus) to an input (Don't know how or which one) of ESP32-CAM

3. So in some way the ESP32-CAM outputs must go to the L298N inputs.

I first have to know how digital inputs and outputs work.

The reason for me to jump to such an advanced project is to build this project to help my wife when she is alone at home.  We have very high crime rate in our area and it is the safest way for her to see what is going on outside the house, without going out (which might be very dangerous especially at night). Our CCTV does not cover all areas and might have blind spots.

Any help to advance this project and the writting of the code will be appreciated so much.

The one picture shows the RC receiver connected to Arduino Uno via serial connection. The other shows ESP32CAM connected to L298N.  I want to make this work without using Arduino Uno if possible. Also an option to control up to 10 channels with RC receiver.

FS IA6B 10 channel wiring bb

 

sample rc car hookup

 

Camera Car

 


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

Good looking plans. Keep us informed.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Xenophon
(@xenophon)
Member
Joined: 2 years ago
Posts: 12
Topic starter  

I have started looking at the code for this project.  I am sure I do not know what I am doing.  Can someone help me with this code please?

Is there a wat to see what the output pins values on the Arduino are? How to print to serial monitor.

I really do not know what I am doing and how to do it 🤣  

I have to thank dronebotworkshop.com for their contrubutions and making me scratch my head 🤣 🤣 

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon Almost everyone starts by learning how to make an led blink. From there we attempt more and more complex tasks.

How many years have you been coding?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2037
 

@xenophon 

There are online tutorials teaching Arduino C++. The output pin values at any time are always true or false (ON or OFF, 0 volt or 5 volt). You can turn them on/off with a command instead of using a finger to flick the switches. You can turn on the Serial Monitor from the Tools in the Arduino IDE menu. The Arduino can be used as a stand alone computer and you can use the IDE to write and run programs and its Monitor as an i/o device while learning Arduino C++.

To enlarge image, right click image and select Open link in new window.

 

ArduinoIDE Monitor

 


   
Ron reacted
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 
Posted by: @xenophon

Is there a wat to see what the output pins values on the Arduino are?

Yes, you can read them off the sketch ...

const unsigned int EN_A = 2;              // Motor A enable connects to pin 2
const unsigned int IN1_A = 4;             // Motor A input 1 connects to pin 4
const unsigned int IN2_A = 7;             // Motor A input 2 connects to pin 7

const unsigned int IN1_B = 8;             // Motor B enable connects to pin 8
const unsigned int IN2_B = 12;           // Motor B input 1 connects to pin 12
const unsigned int EN_B = 13;            // Motor B input 2 connects to pin 13

How to print to serial monitor.

You're already doing that ...

// Print to Serial Monitor
Serial.print("Ch1: ");
Serial.print(ch1Value);
Serial.print(" | Ch2: ");
Serial.print(ch2Value);
Serial.print(" | Ch3: ");
Serial.print(ch3Value);
Serial.print(" | Ch4: ");
Serial.print(ch4Value);
Serial.print(" | Ch5: ");
Serial.print(ch5Value);
Serial.print(" | Ch6: ");
Serial.println(ch6Value);

 

Do you have a more specific problem ?

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Xenophon
(@xenophon)
Member
Joined: 2 years ago
Posts: 12
Topic starter  

@zander 0, Zero, Nil years 😆 


   
ReplyQuote
Xenophon
(@xenophon)
Member
Joined: 2 years ago
Posts: 12
Topic starter  

@will Thank you for your help.  I got it to work with an Arduino Uno and serial connection between RC and Uno.  Next.... Mounting a ESP32 cam.  Would love to use the ESP32-CAM as the main computer, but I dont think it has a RX pin.  Still have to look at it though.

If I can get the ESP32 to work, I want to put a police siren on some how.  Still looking into MP3 player for Arduino.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2504
 

@xenophon 

If this is your first project, then you're looking at a very tough uphill battle trying to build a drivable car.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon Ok, now we know where to start. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon Actually it has a few, check the random nerd for pinouts.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Xenophon reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon Ummm, remember how much power an arduino pin puts out. Don't know, try thr esp32 site to understand the specs. Those sirens weigh a lot, take a huge amount of power so you will need a power Mosfet and a car battery to power the siren

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon Let's start with blinking a led.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Xenophon reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6662
 

@xenophon If you plan on just copying code from youtube or dbws then your lack of experience won't be such a handicap, but if you plan on creating brand new code you should probably take a C coding course and then C++ course if you plan on writing library code. Nowadays there are lot's of resources to accomplish that for free in some cases. Much more efficient than when I learned using a typewriter.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Xenophon reacted
ReplyQuote
Xenophon
(@xenophon)
Member
Joined: 2 years ago
Posts: 12
Topic starter  

@robotbuilder Thank you so much

 


   
ReplyQuote
Page 1 / 2