Skip to content

ikuamike/Blinking_LED_with_Micropython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Blinking LED with Micropython 💥 💡

Documenting how I was able to set up and run Micropython on NodeMCU which is a esp8266 board and blink LED.

Installation

My setup

  • Ubuntu 16.04
  • Python 3.6.2

Software needed

esptool - $ sudo pip install esptool

rshell - $ sudo pip install rshell

micropython firmare for esp8266 - download latest version here

main.py in this repo. clone this repo to get it copy the code.

How to install

first erase flash using esptool with this command

esptool.py --port /dev/ttyUSB0 erase_flash

deploy the firmware

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash --flash_size=detect 0 esp8266-20171101-v1.9.3.bin

Connecting to the board and running code

rshell -p /dev/ttyUSB0

> cp main.py /pyboard

On the nodemcu the onboard LED is on pin 2.

Now restart the board by pressing RST on the board or disconnect usb and reconnect.

LED should be blinking.

Note that on method of a Pin might turn the LED off and off might turn it on (or vice versa)

Credits

Micropython Documentation on esp8266

About

First time using Micropython I blinked an LED 💡

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages