ESP8266 - Getting Started & Connected.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today we're going to take a look at the esp8266 802.1 b/g/n Wi-Fi module which is available here it's several shapes and sizes some have got external antennas some have got multiple GPIO ports but the one we're going to take a look at today is the version one which is this one shown here which has two GPIO ports I've got the lua firmware installed on this one here and i'm using it as a web server in a match box powered by a small button cell battery the two LEDs you see here are connected to the two GPIO ports and first things first if we look at our Wi-Fi connections you can see that the equinoxes is being broadcast which is my device I connect to the equinoxes and then if I go to a web browser and browse to the IP address of my module which in this case is 1 9 2 1 6 8 and 4.1 it should bring up a web page which has been sent from the web server there it's got two on and off buttons which connected basically to the two LEDs and if I click on the on and off buttons I can toggle the LEDs on my little webserver on and off all in a little matchbox the first thing you'll notice is that the way the pins are laid out it's not breadboard friendly so with all the will in the world you're not going to Brad a plug it into your breadboard in any useful way whatsoever so we can either build a caddy for the module to sit into or we can use just male to female jumper cables which is what we're going to use here another thing is that the supply voltage needs to be free point free volts so we're going to use a little regulator here and to supply that voltage I've soldered some legs on our regulator so we can plug it into our breadboard and we need to provide between five and nine volts to pin three of the regulator and we need to provide a ground to pin one and we're also going to use a 22 micro farad capacitor between pins one and two which are the output pins of the regulator and that is basically the power supply and if we measure the two pins across the capacitor there we should see a reading of about 3.3 volts so if we check that 3.27 which is good enough so that's our power supply sorted next we need to plug some jumper cables onto our module itself so we're going to use a black cable connected to the bottom right pin which is the ground of the module we're going to use a red cable for the top left pin which is the power supply for the module which is 3.3 volts remember and the second pin up on the left from the bottom is the chip power down pin which also requires 3.3 volts so those two cables they're two 3.3 volts and the earth cable there that's the power that we need for the module the next two pins are the data pins looking from the bottom the top right pin is the receive data pin we're going to use a blue cable there and the bottom-left pin is the transmitted data so we're going to use a white wire for that the only other pin we're going to connect here is two GPIO 0 which the second pin down on the right now when we come to flash the firmware we're going to need to connect that to ground other than that we can leave it loose so there's the pin outs there now you can use one of these little serial you arts which quite a number of them do supply 3.3 volts but I think you'll probably find that the current just isn't good enough to power these modules so we found them quite unreliable to use but if we were going to use it we need a ground pin which goes to our ground pin of our regulator the blue wire which is received data from the module connects to transmit data from the serial UART and the white wire which is the transmitted data connects to the receive data of the UART again with the Arduino that also has a 3.3 volt supply but we have found this unreliable to power these modules so we're not going to use it we do still need to connect to ground pin which goes to the ground pin of the regulator and the blue cable which is received data goes to pin naught of the Arduino which is labeled up as to receive data slightly confusing and the white cable which is connected to the TX of our module connects to pin 1 of the Arduino which is from TX is labeled upper on the Arduino so now finally we need to just connect all our power leads onto our regulator so there's the earth from the SP module there's the red VCC power supply cable from the module there's the chip power down cable from the module and that's the ground pin from the odd we know just to make sure we've got good off everywhere and that's how we connect the USB serial port we were using one of those and that's how we connect the Arduino which we are going to be using okay first things first now we need to upload a blank sketch onto our Arduino because if it's got any software running on it already it may well interfere with our serial communication so when you first launch your Arduino some versions do automatically have the blank sketch ready for you to upload if not if you go to file examples basics and bare minimum that is your blank sketch which you need to upload so if we just check our board is set correctly and our port is set correctly for our Arduino and then we click up out and that uploads the blank sketch if you have trouble uploading disconnect the serial cables that you've got and that should solve your problem if we run the serial monitor and check the board rate is 11 5 200 which is this seems to be the board rate that all the new ones come in at if that doesn't work you can try 9 600 they're the two common ones that appear to be loaded onto the modules and behavior there we've set to carriage return now if we pair on the module we see a little blue flashing light and on our serial monitor when we power on we see a bit of preamble and then we get the word ready now we just need to check two-way communication so if we type 80 press return we get a note okay sent back which is all good if we type 80 plus GMR and press return it will return the version of the firmware which is on there already so if we now open our internet explorer window and if we do a search for node MCU flasher and the top result there is github node MCU flasher which is where we want to download the flasher from and if we download the zip which is on the link in the right hand corner there and save that this flash is pretty good it's will there are several flashes out there but this one does everything you need it to do so I recommend using this one if we open the zip file if we copy the contents of the zip file on my C Drive I've got any SP 86 six directory so if I paste it in there if we go into the directory and there's a wind 32 and a Windows 64 directory depending on what version of Windows you've got and a release subdirectory and then there's the esp8266 flasher XE if we run that and that will bring up those software if we click on the Advanced tab just to check restore default will be fine the config tab now this is where we load our firmware if we click the little cog wheel there and if we browse to the directory where we've got our firmware and there we go the AI 0.9.5 eighty firmware open that the memory offset which is the Oh X zero zero zero zero needs to be set now check that our comm ports right we need now to connect GPIO naught to ground and then power on the module and if we click flash the progress bar should start moving and on the actual module itself you'll see the blue light flashing and when it finishes we get a little green tick in the bottom left hand corner there which is all good so we now remove GPIO not from ground and if we go back to our arduino software and we run our serial monitor again and now because I've flashed the AI zero-nine-five firmware on there I know that I need to change the board rate down to 9600 so I've done that if I then power on the module little blue light as it powers up there and again bit of preamble and we get a slightly different screen but we still get the ready signal so if I just type 80 and we should get the okay so all is good so far if I type 80 plus GMR I should get the firmware version as you can see that's changed slightly different than it was before so if I want to see what mode my module is set to if I type in the box 80 plus CW mode question mark it returns there we can see it's in mode 2 which is AP mode so I want to change that in fact to a station mode so if I type 80 plus CW mode equals 1 it should turn it into a Wi-Fi station I've gotten ok so all is looking good so far and in station mode I can list the access point it can see so 80 plus C WLAP will give a list of access points there we see quite a few in my area the first number there inside the brackets is the encryption type so it's going to be either open wet wpa wpa2 etc so there'd be a number naught to form to signify that a second after the comma the second bit of data is the CID after the comma the third bit of data is the signal strength and after the comma the next bit of data is the MAC address and another comma and the final bit of data is the channel number so you can see it returns a fair bit of information now if I want to join one of the access points I can type 80 plus cwj ap equals the set in in this case it's equinox and then a comma and then the password which in this case is so secure is one two three four five six seven eight press return and after a small amount of time I should see an OK come back ok there we are so I'm now joined to the my access point so if I type 80 plus CI f sr that should return my IP address and it should return my MAC address so that's the IP and MAC address of my little module now that I've joined my AP now if I open a command prompt I should Brad a ping my little Wi-Fi module so far ping one nine two one six eight dot one dot one there we go and that is my little Wi-Fi module now if I just check the ARP table we can see one nine two one six eight dot one dot one in there with the correct MAC address okay that's about it that just shows you how to flash the 80 firmware and how to use a few of the basic 80 commands thank you for watching for more information and download links please visit our website thank you
Info
Channel: Equinoxe
Views: 436,165
Rating: undefined out of 5
Keywords: WiFi, Arduino
Id: z07zjfOHb8E
Channel Id: undefined
Length: 15min 47sec (947 seconds)
Published: Fri Jun 05 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.