Lua on the ESP8266 - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you this is a computer including Wi-Fi and I was super excited to find out that you can run Lua scripts on it let's go to the workbench I'll show you how to do it first of all of course you'll need the esp8266 module in this case the ESP one you need a breadboard and a 3.3 volt power supply I have the 3.3 volt on the upper rail this is a usb-to-serial at that the 3.3 volt levels and of course you need a bunch of jumper wires here's a quick overview of the pin out of the module so I'll show you how to connect all the wires from the bottom side all the drawings are always from the top side I'll show you how to do it from the bottom side and we'll start with a ground wire I always take a black one for that and it goes into the upper left corner next up there's a positive wire and the lower right corner I'll take a red one for that then I go for the receive and transmit pair I'll take a gray wire in the upper right corner and a white wire in the lower left I left those two joined next one does this CH PD wire that always needs to go to the positive 3.3 volt rail and this GPIO a zero squealy floating unless we need to upgrade the firmware so I'll plug my serial to USB converter into the breadboard connect positive wire and CH PD wire to the positive rail in the ground rail and next thing you must never forget is to join the common ground of your module with your USB to serial converter otherwise you won't have a common ground reference and transmit and receive pair keep in mind that one ends transmit pin is the other ends receive pin so you have to connect the txt to our XD and vice versa yep power light comes on looking good right now in my computer this module comes up as com4 yep here we go that the film where I flush to the system in my previous video to going to film the upgrade road mode we have to pull GPIO 0 to ground and need the to flash you are on it of course we need the mode MCU firmware which we download from github I went for the for the latest release that was available I suppose that there'll be a newer one now yep that's right we'll just download that and using the MCU flasher software we can upload that to our module and just like in the previous video it won't work work right away again you'll have to power cycle the module once or twice so it goes into firmware upgrade mode I'll do that right now and click download again and there we go I had to speed a little it takes about a minute or two the module never leaves update mode just power cycle that again and of course disconnect GPIO 0 so it will leave update mode so what we have no uh-huh well looks like Lua can't open any door dual that would be the the code that starts up automatically to see that it does do anything at all I simply connect passive infrared sensor the thing runs on 5 volts I have the 5 volts on the lower rail here on my breadboard and before you start yelling at me and you can't do that you'll fry your inputs no it really runs on 3.3 volts and actually you could short out the voltage regulator and it it would run on 3.3 volts natively so it won't blow the inputs because the output of the sensor really is 3.3 volts and I can read those the GPIO status from a terminal program you'll you'll see that in a second type print gpio re3 and it'll give the the pin status and if i activate the alarm I get a I get a one here okay cool so this thing obviously works and in the next part of my tutorial you might have guessed words going to I'll show you how to make a simple web enabled particular with a lure script and just very few lines of PHP code on the Raspberry Pi or any other lamp server for that matter
Info
Channel: AReResearch
Views: 87,464
Rating: undefined out of 5
Keywords: ESP-1, IoT, Lua (Programming Language), ESP8266, tutorial, ESP-01
Id: _GSYZ1e14nc
Channel Id: undefined
Length: 7min 12sec (432 seconds)
Published: Sun Feb 08 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.