Newb in over his head w/ esp8266, basic and L298N / DC Motor
Posted: Mon Apr 16, 2018 2:05 pm
I've been trying to automate my blinds, and found some code that I was able to tweek and make it work with servo's, a ESP8266 board, and a default.bas program. The problem is, the servo didn't have enough torque, so I bought some DC motors, and some L298N boards.
It appears as if I can't use the PWM wire on the DC motors via the L298N board, and I need 2 more connections that both say "enable motor A".
The L298N board I am using is this one: https://www.amazon.com/DAOKI-Controller ... ords=l298n
What I am trying to figure out, is how to wire it to the ESP8266 board, and how to convert the following code to tell it to run 5 seconds in one direction for close, and one that does 5 seconds in the other direction for open.
Can anyone help?
Thanks!!
if servoVar = close then
print "its close"
io(servo,4,10)
else
if servoVar = open then
print "its open"
io(servo,4,160)
else
if servoVar = shade then
print "its shade"
io(servo,4,170)
else
print "wrong"
endif
endif
endif
It appears as if I can't use the PWM wire on the DC motors via the L298N board, and I need 2 more connections that both say "enable motor A".
The L298N board I am using is this one: https://www.amazon.com/DAOKI-Controller ... ords=l298n
What I am trying to figure out, is how to wire it to the ESP8266 board, and how to convert the following code to tell it to run 5 seconds in one direction for close, and one that does 5 seconds in the other direction for open.
Can anyone help?
Thanks!!
if servoVar = close then
print "its close"
io(servo,4,10)
else
if servoVar = open then
print "its open"
io(servo,4,160)
else
if servoVar = shade then
print "its shade"
io(servo,4,170)
else
print "wrong"
endif
endif
endif