Help with esp8266 coding l298n

I am using esp8266 and l298n motor driver to control motors over the web, Everything is working perfectly but the second motor just goes CW and goes with the speed the user writes.
Here is the coding:
S20-08-ESP8266-DC_motor_L298N_full_control.ino (4.5 KB)
robojax_speed_start_stop_control_page.h (2.0 KB)
and here is the library it should be zip:
Robojax-L298N-DC-Motor.zip (186.6 KB)
Schematics:


and here is the same schematics if you say the first one hard to read:

Please help, Thank You!

Your topic was MOVED to its current forum category which is more appropriate than the original as it has nothing to do with Installation and Troubleshooting of the IDE

Members are reluctant to download and unzip zip files because of the security risk. Also it is a pain in the a$$. Please read the forum guidelines to see how to properly post code and some information on making a good post.

Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Also, please post a schematic. Written descriptions are always more ambiguous than a drawing. Hand drawn, photographed and posted is fine. Include all pin names/numbers, components, their part numbers and/or values and power supplies.

So the problem is it does not go CCW?

Is there any loose contacts in your setup?

Does your receiver receive the CCW command?

Yes that's the problem!
What does you mean by: Is there any loose contacts in your setup?
Yes the receiver(esp8266) receives that I click CCW but it's actually still CW.

I am very sorry I didn't mean to put this category. :frowning:

Okay sir. I will remove the .zip file and make it better.

I meant in your physical connections...

Can you print or measure the status of your motor controller pins?

Yes It print's motor 2 running CCW but it's actually not

Also Please check the first post I updated alot of things and the schematics.

Why are you starting a new thread. You should at least mention the original thread >> L298n controlling only 1 motor direction esp8266 - #9 by memind

This is cross posting. Cross posting is against the forum rules. Ask a moderator to merge this thread with the other one.

I meant the status of the actual pins.

I can't measure them because I don't have The voltage sensor!

Sorry I didn't remember I already did one! How do I mention it?

Taka a led, a 220 ohm resistance and you are ready to go!

Hello, Actually You was right! Pin D2 was not turning on the led and all the other motor pins were working! D2 pin is connected to IN3 on the motor driver. Am 90% sure pin D2 is not turning on because of the programing, The reason am sure is because the esp8266 is new it's only 2 weeks old since the time I purchase!

According to your diagram d2 is not connected...

The fact that the board is 2 weeks old does not prove that the problem is in your program... you can destroy it in less than a second...

Make a sketch that only sets D2 high. Check.

If you want help with your program you should post your code according to forum instructions (first few posts of each category in the forum).

Hello, Here is a better diagram.
For some reason D2 is working!
I think the error is from the library I got this library following a video It can control motor fully as it says! the HTML webpage was fake it was just controlling start,stop and speed. But I figured a way to control everything but motor 2 is only going CW.
So please check the library and the code.
diagram:

I will not check the library. There is plenty good libraries to do what you want. Take one of those...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.