In my previous post, I mentioned how to setup our chip ESP8266 NodeMCU.
As a convention throughout the industry, we should have our chip printed "Hello World!" for us.
Firmware had already been installed on our chip. So, the only thing we need is to talk to our chip via Serial Communication Protocols.
I'll categorize communication protocols in two groups: REPL and WebREPL. REPL stands for Read Evaluate Print Loop.
In the REPL section, I'll be talking about PuTTY and TeraTerm and in WebREPL section I'll be talking about only WebREPL sw.
1- Wired REPL Methods
i) PuTTY:
ii) TeraTerm:
2- Wireless REPL Methods:
i) WebREPL:
Using any of the REPL options above (PuTTY or TeraTerm), first we need to install weprepl library onto chip.
import webrepl_setup
Follow the instructions and reboot device afterwards.
Connect your PC to ESP8266 Wifi Access point with the password you've just defined in above steps just like you connect to any Wifi access point. Now you are connected to the Wifi of your Chip. Cool!
Now, open local or online WebRepl:
Connect to default IP: ws://192.168.4.1:8266/
Type your password when prompted...There we go.
As a convention throughout the industry, we should have our chip printed "Hello World!" for us.
Firmware had already been installed on our chip. So, the only thing we need is to talk to our chip via Serial Communication Protocols.
I'll categorize communication protocols in two groups: REPL and WebREPL. REPL stands for Read Evaluate Print Loop.
In the REPL section, I'll be talking about PuTTY and TeraTerm and in WebREPL section I'll be talking about only WebREPL sw.
1- Wired REPL Methods
i) PuTTY:
Figure: A new Serial Session is opened thru PuTTY.
Figure: Python Scrips (Hello World)
ii) TeraTerm:
Figure: TeraTerm Serial Connection Settings
Figure: Python Scrips (Hello World)
2- Wireless REPL Methods:
i) WebREPL:
Using any of the REPL options above (PuTTY or TeraTerm), first we need to install weprepl library onto chip.
import webrepl_setup
Follow the instructions and reboot device afterwards.
Figure: Importing webrepl library using a PuTTY session
Connect your PC to ESP8266 Wifi Access point with the password you've just defined in above steps just like you connect to any Wifi access point. Now you are connected to the Wifi of your Chip. Cool!
Figure: Connection to Wifi Access of ESP8266 Chip
Now, open local or online WebRepl:
- Online: http://micropython.org/webrepl/
- Local: https://github.com/micropython/webrepl Download from here and double click on "webrepl.html"
Connect to default IP: ws://192.168.4.1:8266/
Type your password when prompted...There we go.
Figure: MicroPython scripts using local WebREPL
Figure: MicroPython scripts using online WebREPL
To summarize, both wired and wireless communication methods with our chip is mentioned in this post. You are totally free to choose whichever is most convenient for you.
Happy MicroCoding !
Comments
Post a Comment