Micropython programming in ESP8266 Modules

Before starting everything, let me show you the contents i will cover in this blog. 

1. Know about Python Programming Language :- This will cover a small introduction to the Python Programming Language, steps to intall python into to your computer and also how run the some codes.

2.Introduction to MicroPython:- Next we will look into the MicroPython which is a python for micro-controllers development and also include steps to install a MicroPython it your system

3.ESP8266 programming using MicroPython:- next step we will program an ESP8266 development board, in this example we will use NODE MCU ESP8266 Bord for doing that. 

4. Design an ESP8266 based Circuit with Python:- we will design an ESP 8266 based circuit to implement some projects


lets get started


1. Know about Python Programming Language



"Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms."

well this is the definition i got from the Python Development website. It is actually a high level programming language. You can write the program as you write English words. it is easy because it does not use much of  brackets, parenthesis means syntax is less used in Python and that makes it easy to write and understand.  
  
for example before adding two numbers in most high level language,  first we have to declare the type of the number whether it is an Integer, Float etc  like as shown below 

int a = 1;
float b= 1.5;

from this the program understands that a is an integer and b is a float . And also most of the program uses semicolons to end the line.  Now we will see how we write it in Python 

a=1
b=1.5

well in Python you don't have to say a is an integer and b is a float because it will figure it out and also you don't want to use any semicolons to end the line. It will automatically end it if you go to next line. 

How to Install Python to you Computer  


  1. Open a browser window and navigate to the Download page for Windows at python.org.
  2. Underneath the heading at the top that says Python Releases for Windows, click on the link for the Latest Python 3 Release - Python 3.x.x.You can also find Latest Python 2 Release but i recommend to use Python 3
  3. Scroll to the bottom and select either Windows x86-64 executable installer for 64-bit or Windows x86 executable installer for 32-bit.
  4. Once completed the  download,  simply run it by double-clicking on the downloaded file. A dialogue should appear as shown below. And don't forget to add Python to PATH

    now you are ready to go typing some codes and here is how its done 

    1.  open your  Command Prompt and type python and press enter and you will get a replay like one shown below .

    Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
     
    
    
    
    
    that means you are ready to go. You can also call python by just typing py on the Command Prompt

    2.  After entering into python prompt you will see >>>  arrow marks and write you first code as below 

    print("Hello, World!") 

    and press enter you will see printed as below . That means python will execute the program after writing each line and pressing the enter button

    Hello, World!

    so congratulations this is the your first python code 
    you can take some time do some excises in python code  by visiting some of the sites like https://www.w3schools.com/python/


    since the python installed on our computer, we can move to the next topic to introduce micropython

    2.Introduction to MicroPython


Comments