MrYsLab / pymata-aio

This is the second generation PyMata client.
https://github.com/MrYsLab/pymata-aio/wiki
GNU Affero General Public License v3.0
155 stars 51 forks source link

Is WeMos / Esp8266 boards supported? #98

Closed hyansuper closed 5 years ago

hyansuper commented 5 years ago

Hello, I got a WeMos D1 board, it has a Esp8266 chip, so it would be more convenient with wifi and without usb line. In the arduino IDE, I set Tool > Boards > "WeMo D1 R1" or "Esp8266 generic device" and compile the FirmataPlus.ino, the error output:

Build options changed, rebuilding all
Multiple libraries were found for "Servo.h"
In file included from /tmp/arduino_modified_sketch_995868/FirmataPlus.ino:46:0:
 Used: /home/hyan/.arduino15/packages/esp8266/hardware/esp8266/2.5.2/libraries/Servo
/home/hyan/Arduino/libraries/NewPing/NewPing.h:113:20: fatal error: avr/io.h: No such file or directory
 Not used: /home/hyan/Arduino/libraries/Servo
 #include <avr/io.h>

                    ^
compilation terminated.
 Not used: /home/hyan/arduino-1.8.9/libraries/Servo
exit status 1
Error compiling for board Generic ESP8266 Module.

Is my board supported? I see here in the board.h seems to support Esp8266.

If I select Nano board, I compiles with no error.

MrYsLab commented 5 years ago

I installed the 8266 libraries using the instructions in this guide and StandardFirmata compiles. FirmataPlus does not compile because it assumes the board is using an AVR processor.

I have never tried using the ESP8266 with Firmata. Instead, I am using Python Banyan.

There is a demo for the ESP8266 with a GUI interface to drive the demo. The demo communicates with the ESP8266 over WiFi.

Here are screenshots for a Web demo and one for a tkinter demo: esp_web_page tk_inter_demo