A place to put your YouTube video that is ESP8266 related.

User avatar
By RaspberryPiThree
#50856 ESP8266-01. I've successfully connected my ESP-01 to L298N H-bridge motor driver and got it to rotate in clockwise and anti-clockwise directions. But now I need to learn more Lua code. I'm using GPIO0 and GPIO2 on ESP-01 which are 3 and 4 respectively. gpio.write (3,1) spins clockwise and gpio.write(4,1) spins anti-clockwise. But I need to learn how to make the motor spin only half revolution, delay for 30 seconds and spin anti-clockwise in reverse for one revolution. What would be the Lua commands to do that?
User avatar
By martinayotte
#50859 I mean where this pinout you've mentioned in post viewtopic.php?p=50828#p50828 comes from ?
This is not ESP-01 pins, this is not ESP8266 chip pins itself either ...
About Lua, I don't use that at all, so maybe you're better posting questions in Lua sub-forum.
User avatar
By icons
#52234 The pin numbers on lua are differently numbered from arduino pin numbers.

https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-nodemcu-lua

So if using lua script you have to use lua pin numbers...

As it says on the website gpio 4 & 5 could be switched so in your diagram http://www.esp8266.com/viewtopic.php?p=50828#p50828 they are switched.

So I am guessing for esp8266 01 the pin numbering would be the same although it does not have all the pins broke-out.