I feel like you are truly the best, I have learned everything from your videos. YOU are the person they were talking about when they said that it's the information age.
I connected my l298 to esp32 with 5v pin. BUT when I connected the motor to l298 then the reading of voltage given the motor by l298 is just 1.6v . What can I do? Plz reply me plz.🥹
Hi, i have a problem with the librery, is not working, im ussing the arduino IDE 2.3.3 and if i run the esp32 2dc motors example, without touching anything of the code, it display errors about "'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?" and 'ledcSetup' was not declared in this scope
For anyone that faces the same problem, the library is compatible until version 2.0.17, beacause espressif made changes in version 3 to the pwm functionallities. it would be cool to see this library in versions > 3 tho, it simplifies everything
Hi thank you for the video, and all works perfect with a 12v input adapter for my l298n and a microusb 5v laptop power for esp32s. However, if i pull a cable from my l298n 5V to esp32s, the esp32s works but the motor no longer spins. Can you help how i can power both with same source, do i need a bigger adaptor. Adaptor output - 12V DC Current - 2000MA Motor - 12V, 150RPM
i cannot use the code sir, have error Robojax_L298N_DC_motor.cpp:159:3: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 159 | ledcAttachPin(ENA, CHA);
Hello Ahmad thank you for the video I would like to know what should I have to do for both Motors to run simultaneously in clockwise or anti-clockwise cause I am designing a robot which will have 2 DC Motors however the robot has to move Forward , Backward, Turnleft and Turnright. I am using ESP32 and L298N
Hello, I believe I have explained every line and what they do. so I would suggest watching the video 2 or 3 times until you understand it. Just see which line in the code makes the motor to run make copy of the same line in the line below it and change the value to make the other motor rurn. or may be watch this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-wn5D7j1ybxY.html and learn which line controls a motor.
Hi Im doing Up my sons ride on car and need to run two motors off the back and one motor for steering.. I have the ESP32 and the Dual L298N Motor driver model too .. any pointers would help
Hi, this should work. just identify the pins. check or test be lifting the car and turning it ON. using whatever controller you have try going forward and se which wheels rotate. then turn left and check which motor rotate and the same for right turn. I am not sure if the car has servo to physically turns the wheel or just by controlling the each motor it rotates. My point is to see if 4 motor is used when running the car or just two sets run together. this can be checked to see if two L298N is used or 1. here an one of 4 videos on a smart car ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JDgOYKo_zQ8.html using L298N. Search my channel on more on car. Here is how to find Specific RU-vid Video in a channel bit.ly/findRU-vidVideo
@@robojax you absolute legend 🤟🏼I’ll check all the pins and make sure what’s running what .. I know I have two differently on the back but could possibly have a servo motor up front for the steering.. I’ll have to pull it off and have a look and follow your guild more .. will report back later 😀
I tried the same experiment but I cannot get both motors to run at the same time they run interchangeably: one runs and the other is not then they switch. do you know why is that?
Hi, please watch this for WiFi ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Olq8NXgNySA.html Here is how to find Specific RU-vid Video in a channel bit.ly/findRU-vidVideo
Is it possible to use 2 L298N modules to control 4 DC motors using ESP32? I tried to modify the code but i really get stuck. I want to control them by wifi. With 2 motors and you library works really good, but we always want more :) thanks in advance!
Do you have any code for this?😇. I managed to modify the .ino file, but both .h files and the cpp file are more challeging. Maybe you have some tips how to easy modify those files? I am a beginner in programming....😂
Hi, brushless motor has three wires and needs Electronic Speed Controller or ESC. that is totally different but yes it can. you just need to feed PWM signal to ESC.
I did not make the video for ESP8266. Here is the video showing how to control it over WiFi. if you learn this (ESP32) video you should be able to use it with ESP8266 from this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-gOMHU0Q8upA.html
Hello, I run your code and it says that "... Arduino/libraries/robojax_L298N-DC-Motor_library/Robojax_L298N_DC_motor.cpp:157:34: error: 'analogWrite' was not declared in this scope analogWrite(enPin, toPWM(value)); ^ exit status 1 Error compiling for board ESP32 Wrover Module." What should I do?
@@robojax you are saying the same thing for each issue, let's be honest, you don't know. With my issue, I watched your full video 10 times and didn't solve anything. Very bad library.
I am replying now after 14 hours. you could just click on our channel name "Robojax" and then search for L298N . So 14 hour waiting is very long. here is ru-vid.comsearch?query=L298N
there are millions of power supply. You can use $2V module of $500. Here is one ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-tQdUfy0uyUQ.html that works directly from AC but I have tones of videos showing to get voltage from DC
thank you has worked fine with my esp32, i would just suggest some kind of schematics showing the pin connection suggestion for a new video: have you tried to do this with the "Blynk" mobile app ? I'm trying to do this as they have a nice interface with joystick thanks !!!!
You are welcome. the wiring diagram is available at my Arduino course at Udemy.com so anyone who purchase the course, gets wiring and more. I have seen 3 or 4 more people mentioned the word "blynk" and when I checked it I did not like it . They should offer some free option for limited access for students . I am search ing for other option and until then, I will not participate with this operation. they should offer free or limited device like 5 device or 5 project . Then they should charge for commercial projects.
@@robojax yes I agree that makes sense, the free option which they offer is very limited! you won't be able to get much done. Try to email they, as a digital media 'influencer' you may be able to get some extra benefits to your followers, best regards
Hello, I've shown how to control a 360 servo in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-b_xvu6wWafA.html and you can use the same method to control DC motor. But you have to understand the this DC motor .
@@robojax Thanks, it helped me I have a question if I wanted to control 4 motors, how should I configure this line of code? or what should I do?Robojax_L298N_DC_motor robot2(IN1, IN2, ENA, CHA, IN3, IN4, ENB, CHB);
watch the video carefully in the code section. I mentioned "we create object" called motor. then you create another object called motorB. So the object motor will be for motor1 and motor2 but motorB will be for motor 3 and 4. Or watch my other videos so you learn the meaning of object . See all my videos on L298N ru-vid.comsearch?query=L298N
@@robojax hmm but I wanted to make it on my own with pwm and control 2 motors. Is there any possibility maybe you look up my code and tell me what I did wrong?
Hello Ahmed, great video you have there! But can i ask a question. Why do i get this error whenever i tried compiling the codes? Hope u can help, thanks! no matching function for call to 'Robojax_L298N_DC_motor::Robojax_L298N_DC_motor(int, int, int, int, int, int, int, int)'
It means you did not watch the video fully and skipped. I have mentioned and shown to install library. So follow the instruction and install the library.
@@robojax i watched and rewatched your video for countless time. Already install the library from the zip files as u did. Did exactly the same. But still getting the same error. My friends who used this library last year also have the same problem this year, last time it was fine. Mind to tell us where we did wrong?
@@robojax Arduino: 1.8.10 (Mac OS X), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None" /Users/pneal/esp32/libraries/robojax_L298N-DC-Motor_library/Robojax_L298N_DC_motor.cpp: In member function 'void Robojax_L298N_DC_motor::rotate(int, int, int)': /Users/pneal/esp32/libraries/robojax_L298N-DC-Motor_library/Robojax_L298N_DC_motor.cpp:157:34: error: 'analogWrite' was not declared in this scope analogWrite(enPin, toPWM(value)); ^ Multiple libraries were found for "Robojax_L298N_DC_motor.h" Used: /Users/pneal/esp32/libraries/robojax_L298N-DC-Motor_library exit status 1 Error compiling for board ESP32 Dev Module. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
Hi Ahmed, I tried your tutorial on my esp wroom 32. But after compiling, I got this message " Leaving, Hard resetting with RTS pin". And I'm stuck there. Do you have an idea? Thank you in advance
which link? have you watched the video? int the first 40 seconds I said "you can get the code by clicking on the link below the video in the description". Please watch it fully without skipping, you will have no questions left. I have not wasted time. it is about learning.
Thank you Ahmad for a very nice video. I am very excited to get started on this project but I'm having issues. Please help me find out what I am doing wrong. After using the Board Manager to install files for the ESP32, I downloaded the Library you provided a link to, "Robojax_ESP8266_DC_motor_speed.zip". After adding/installing the library, I closed the Arduino IDE, restarted it and found there were 2 issues: 1) After looking through File>Examples, these were no examples listed as Robojax (i.e. no Robojax ESP L298N DC Motor or anything Robojax). 2) I did go ahead and open the sketch that was in the Library file you provided. I attempted to compile it and got the error message, "Robojax_ESP_L298N_DC_motor.h: No such file or directory". Thank you in advance for pointing me in the right direction.
You are welcome. Thank you for letting me know. I had updated the library and forgot to update this page. Now you can download and try it. Thank you for not skipping the ads and keep watching it. This will help me a lot.
@@robojax Thanks for the updated info. I will give it a try. On a related note, based on everything I have read, I am surprised the L298N works with the ESP32. It is my understanding that the L298N requires a 5 volt signal on the logic inputs while the ESP32's output is 3.3V. Would it be more reliable to use a logic level shifter to take the 3.3V up to 5V? Just curious. Thanks again for the tutorial!
I gave the updated code a try and it works great! Thanks again Ahmad for an awesome project and video! I hope you continue to post amazing projects like this!👍👍
Welcome from Brazil. Sorry I did not understand. you want to have both servo motor and dc motor? this is very unusual. I have so many servo related videos. if you watch them, you can combine both together. ***** Free Arduino Course worth $200**** Arduino Step by Step Course (over 100 lectures) Starts here robojax.com/L/?id=338
You should get them same rom if enough power is supplied to the motor. Check thr motor w voltage while running and if it is too low it means your power supply can’t supply enough power (cut) power supply to the motors. Use different power supply