- Notifications
You must be signed in to change notification settings - Fork3
Cloud4RPi Library and Examples for ESP8266 with MicroPython
License
cloud4rpi/cloud4rpi-esp8266-micropython
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Cloud4RPi Library and Examples forESP8266 withMicroPython
Connect your MicroPython-enabled ESP8266 to a Wi-Fi network and configure it forWebREPL. You can do it by accessing the console via the serial port and executing the following commands:
>>>fromnetworkimportWLAN>>>STA=WLAN(0);STA.active(1)>>>STA.connect('__SSID__','__PASSWORD__')>>>STA.ifconfig()# Outputs the network configuration. If it is not valid, wait and re-execute
Download theMQTT library and upload it to your ESP8266 with the name
mqtt.pyusing theWebREPL.Clone this repository or downloadcloud4rpi.py and themain.py files.
Copyyour device'sDevice Token.
Edit themain.py file. Enter your Wi-Fi network data and paste theDevice Token into the required variables.
Connect the LED to GPIO12 and a button to GPIO16. If you need to use other pins, change the corresponding variables inmain.py.
Transfer thecloud4rpi.py and editedmain.py files to your ESP8266.
Reset the ESP8266. You can use the console for this:
>>>importmachine>>>machine.reset()
Check that thedevice goes online and starts sending data.
Go to theControl Panels page and add a new control panel.
Add twoSwitch widgets and bind them to the
LEDvariable.Add a newText widget and bind it to the
Buttonvariable. Configure different colors for the "true" and "false" strings.
You can use this control panel to control the LED and see when the button is pressed.
About
Cloud4RPi Library and Examples for ESP8266 with MicroPython
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Contributors2
Uh oh!
There was an error while loading.Please reload this page.
