Hardware and software files for Movuino wifi v0.99.3
Tested on ESP core v2.5.0 (please use the version of esp core so autoreset is working)
1- Install drivers for CP2104 http://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
2- Install support for ESP8266 as explained here : https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide [Use version v2.5.0 of espcore - on version > 2.5 upload fails]
3- In arduino software Choose the good board : Adafruit Feather huzzah esp8266
4- Copy and paste the content of the folder "libraries" into your arduino sketchbook library folder
- to know where is your arduino sketchbook folder Open Arduino software got to File -> Preferences -> Sketchbook location
- Libraries folder is inside the sketchbook folder
5- Install asukiaaa library (Open arduino software go to sketch -> library manager -> serch for mpu9250 and install it )
6- Install adafruit neopixel library using library manager
7- if you want to use node.js backend instal node .js and SocketIoClient arduino library (using library manager)
- blink : blink the integrated Blue LED (pin 2)
- i2cscanner : scan all i2c adresses and display when a sensor is detected
- simpleNeopixel
- MPU6050_raw
- MPU9250-asukiaaaGetData
- simpleBatteryMonitor-ADC
- udp.ino : send a ping to the udp server each time a motion > than threshold is detected (need the udp_recive.py opened on the server)
- udp_receive.py simple python server to reeive data sent by movuinos on the same network
- udp-send-broadcast.py ;: python code to send data to all movuinos connected on a network
- the server and the movuinos have to be on the same network
- you need to change in udp.ino :
ssid infos (name and password)
IP adress of the server running the python script - A node.js server can be used to receive UDP packets (in backend example -> Node.js -> Node.js receive UDP )
- Note : those examples are just data exchange using a server and client the sensor functions can be copied form the udp example
- arduino client example is in Firmware -> websockets examples -> socketio
- data can be exchange between movuinos and th server using websockets (fast and using javascript)
- you need a library to receive websockets on the node.js server; we provide examples for the 2 main libraries
- socket.io : you need to go go with terminal to the folder (websockets with socketio) then launch "npm install" to install the socket.io library and dependencies then launch the server with "node index.js"
- ws : you need to go go with terminal to the folder (websockets with ws) then launch "npm install ws" to install the ws library and dependencies then launch the server with "node server.js"