It is good time to start IoT!
M5CAMERA is powerful device to enable your hobbby electric craft.
I made a radio controll tank that is enable to controll by iPhone with watching streaming camera image.
Hardware
Body part set that include gear and motor is purchased from TAMIYA educational kits.
In order to controll two motors, I used Grove - I2C Mini Motor Driver.
Use rechargable AAA Nickel metal hydride battery battery x 4 = 1.2x4=4.8V
as power supply for both M5CAMERA and motor driver.
Each parts are connected with grove cable.
You can check the parts connection with following movie.
Software
Controll interface on iPhone side is made by html like this.
The html file is stored in M5Camera and you can access it from iPhone.
M5Camera works as web server using MicroPython's micro-framework server, picoweb.
Connection between M5CAMERA and iPhone is over Wi-Fi.
By moving slider, javeScript in html create xmlHttpRequest and send python program the slider status.
On the same time, python program on M5CAMERA obtain the variable of slider status , and send the signal to the motor driver according to the slider status with I2C technology.
Communication between html and python is enabled by Ajax,


