In this recipe, we will learn how to control the ESP8266 pins with MicroPython. To do that we will come up with a setup where we will be switching the state of an LED connected to an ESP8266 board GPIO pin. This will help you understand how to control digital outputs using MicroPython.
You will need the following things to accomplish the setup:
USB cable
220 Ω resistor (https://www.sparkfun.com/products/10969)
Begin by mounting the LED onto the breadboard. Connect one end of the 220 Ω resistor to the positive leg of the LED (the positive leg of an LED is usually the taller one of the two legs). Connect the other end of the resistor to pin 5 of the ESP8266 board. Then connect the negative leg of the LED to the GND pin of the ESP8266 board. The connection is as shown in the following diagram:
Once the setup is complete, connect the ESP8266 board to your computer via a USB cable...