Skip to main content

Talking to your ESP8266 Chip (Wired and Wireless Methods)

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 WebREPLREPL 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:



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

Popular posts from this blog

How to change Country/Region of App Store in iOS 10.0.2 on iPhone?

When you moved to any country other than your original country, you need to change the region/country settings of your iPhone/iPad so that you are able to download the apps specifically published for that country/region. 1- Open Settings App. 2- Tap on “iTunes & App Store”. 3- Tap on Apple ID: 4- Tap on “ View Apple ID ”. 5- Then sign in into your iTunes store either with your AppleID/Password or Touch ID . 6- Then, your iTunes account is opened as follows… Tap on " Country/Region" 7- Tap on “ Change Country or Region ”. 8- Select your current country or region from the list. 9- Then tap on “ Agree ” to agree with the Apple Media Services Terms and Conditions. 10- Tap again on “ Agree ” on the pop-up. 11- Now, Billing information on your account is displayed. Insert 3-digit security code at back of your credit card and tap on “ Next ” again. ...

Automatic Cover Letter Generator & Job Application Tracker & Active Contact List Manager (3 in 1)

In this post, I will mention about my current personal project that I have been using to manage and organize my job application process. Name of this project is " Automatic Cover Letter Generator & Job Application Tracker & Active Contact List Manger (3 in 1) ". Automatic Cover Letter Generator (ACLG) part automatically generates Cover Letters, Job Application Tracker (JAT) part helps me out track and organize my job applications and Active Contact List Manager (ACLM) part helps me build my own customized contact list. All of the three parts are good helpers for any job seeker.      MOTIVATION 1- Automatic Cover Letter Generator As a widely accepted analogy, a resume is like an ambassador to your potential  employer; a cover letter is like a bridge between your resume and the employer to introduce you and your resume. As a matter of fact, your cover letter is your very first contact with your potential employer. Knowing the importanc...

Star Wars ASCIImation with Python - Windows

In this post, we'll watch a Star Wars movie in ASCII format. The only thing we need for this demo is Python-installed PC and internet connection. Figure : Screenshots from Python Command line while Star Wars is being streamed All credits gained in this demo will go to " blinkenlights.nl " [2] website, which broadcasts this ASCII movie using Telnet protocol on Port 23, and Python which makes socket implementation very easy for us. No authentication is needed for this broadcast. Anyone who is able to create a TCP socket and listens  blinkenlights.nl  on port 23 would be able to get this stream and display on their Python command line. CODE My main source for Python source code is [1]. What  code below does is simply importing Python "socket" library, create a socket, use " towel.blinkenlights.nl " address variable to create connection, receive data from socket and display it. While typing (copy/paste) code, be careful about indentatio...