Posts

Showing posts from December, 2018

Node-Red and MQTT on Raspberry Pi

Image
Node-Red MQTT on Raspberry Pi Node Red A visual tool for wiring the IoT. Gateway to The IoT. Rapidly developing popular platform device data information. To install Node-Red > bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered) > node-red-start After this you can access the node-red dashboard from url http://<raspberrypi ip addr>:1880 Auto Start on Reboot > sudo systemctl enable nodered.service Install MQTT Broker > npm install node-red-contrib-mqtt-broker Reference [1] Install Node-Red  [2] Install node-red-contrb-mqtt-broker [3] First time mqtt-broker MQTT Publish Getting started install MQTT client > sudo pip install paho-mqtt Note: GPIO. Stands for " General Purpose Input/Output ."  MQTT stands for "Message Queue Telemetry Transport"

M5Stack ESP32

Image
1. use uPyCraft https://randomnerdtutorials.com/install-upycraft-ide-windows-pc-instructions/ 2. Tools > Burn Firmware -  m5stack-20180516-v0.4.0.bin Connect to Putty 1. Open Putty 2. Select 'Serial' Connection 3. Port: COM7, Speed 115200 4. exec(open('./main.py').read(),globals()) M5Cloud How to make it connect to wifi 1. Burn with M5Cloud firmware https://github.com/m5stack/M5Cloud/tree/master/firmwares 2. Connect to wifi using  http://192.168.4.1/ 3. Add device via  http://io.m5stack.com M5 UI-Flow 1 Instruction https://medium.com/mmp-li/m5stack-with-ui-flow-b6d1a37385b0  1.1 How to burn firmware  https://docs.makerfactory.io/m5stack/related-documents/burn-firmware/  1.2 M5Burner  https://github.com/m5stack/M5Stack-Firmware Arduino 1 Install Arduino IDE - [1] arduino ide - [2] arduino on vscode 2. Install ESP32 board on Arduino IDE https://randomnerdtutorials.com/installing-the-esp32-board-...

Setup Raspberry PI

1. install raspberrian image into micro sd card Note: I used '2018-11-13-raspbian-stretch.img' via balenaEtcher 2. In case you don't have external keyboard but you have mouse. It needs to set wifi ssid/password via config file.     - Create file 'wpa_supplicant.conf' and add text as following into the file and save it to microsdcard country=US ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={  ssid="wifissid"  scan_ssid=1  psk="wifipassword"  key_mgmt=WPA-PSK } 3. Turn on ssh via create ssh file or use raspberry destop > preference config 4. If you need to write down a python code related bluetooth. You need to install bluepy > sudo apt-get install python-pip libglib2.0-dev > sudo pip install bluepy > sudo hcitool lescan  //get mac address Reference [0] How to install raspberry [1] Install Bluepy [2] Raspberry Document [3] Startup Bluetooth on Raspberry PI