This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from umqtt.simple import MQTTClient | |
from machine import Pin | |
import ubinascii | |
import machine | |
import micropython | |
global switch_state | |
switch_state = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key sudo | |
apt-key add mosquitto-repo.gpg.key | |
cd /etc/apt/sources.list.d/ | |
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list | |
sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list | |
sudo apt-get update | |
sudo apt-get install mosquitto |