arduino
arduino copied to clipboard
Add ESP32 to board defs
It would be awesome to add ESP32 to the board defs for standardfirmatawifi/ bluetooth! The GPIO capability is much better than the 8266
Do you have an ESP32 board? I don't and need someone to verify the defs if I add them.
Not yet, but I will probably have one in about a week ;)
Also I'm not sure if anyone has added Arduino support for it yet. Will need to wait until it's available in the Arduino Board Manager.
Here is the Arduino core...
https://learn.sparkfun.com/tutorials/esp32-thing-hookup-guide?_ga=1.116824388.33505106.1471290985#installing-the-esp32-arduino-core
Derek Runberg Regional Education Developer Sparkfun Electronics Inc.
Boulder, CO. Cell: 971-344-2355 [email protected] http://www.sparkfun.com http://learn.sparkfun.com
On Wed, Nov 2, 2016 at 1:50 PM, Jeff Hoefs [email protected] wrote:
Also I'm not sure if anyone has added Arduino support for it yet. Will need to wait until it's available in the Arduino Board Manager.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/firmata/arduino/issues/315#issuecomment-257994689, or mute the thread https://github.com/notifications/unsubscribe-auth/AI0_VGuerB46dO7q2bnVY8Z4_thy69SHks5q6PeAgaJpZM4KnrgO .
Thanks! Hadn't realized you worked at Sparkfun.
;)
Derek Runberg Regional Education Developer Sparkfun Electronics Inc.
Boulder, CO. Cell: 971-344-2355 [email protected] http://www.sparkfun.com http://learn.sparkfun.com
On Thu, Nov 3, 2016 at 4:40 PM, Jeff Hoefs [email protected] wrote:
Thanks! Hadn't realized you worked at Sparkfun.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/firmata/arduino/issues/315#issuecomment-258306548, or mute the thread https://github.com/notifications/unsubscribe-auth/AI0_VHZ3I3gZzmIdGkxtClc2XybEMPvQks5q6nDfgaJpZM4KnrgO .
Thank for working on this.
I see that the tools install themselves into the Arduino environment by following the Sparkfun site instructions. What, if anything, else needs to be done to run WiFi Firmata on the ESP32?
A lot needs to be done. An entry for the ESP32 is needed in Boards.h. An entry must also be added to wifiConfig.h and any pins that need to be ignored must be specified. Changes may need to be made to WiFiStream.h to handle any ESP32-specific behavior that is not 100% aligned with the Arduino Wi-Fi 101 library behavior, etc.
I recently picked up an ESP32 Thing board so I'll be adding this at some point in the coming weeks.
Hi @soundanalogous anything happen on this, or anything I can do to help out with it?
I haven't had any time to work on it. Adding UART support would only take a few minutes, but adding Wi-Fi and BLE will take a lot longer. I don't even think the ESP32 Thing has an Arduino BLE library yet. It does have Wi-Fi though.
Thanks for the reply @soundanalogous
If it is literally that easy, perhaps you could add the UART support, and then others like myself can work on adding WiFi support using https://github.com/espressif/arduino-esp32/tree/master/libraries/WiFi
It does appear that there is also now BLE support as well https://github.com/espressif/arduino-esp32/tree/master/libraries/SimpleBLE
That would be great if you want to take on Wi-Fi support! I'll see if I can find time to add basic support this weekend.
I've looked at SimpleBLE, but unfortunately it's not comprehensive enough. I'm hoping ESP32 support is added to the BLEPeripheral library at some point since that already works with Firmata.
I looked into this today. It turns out to be not so simple because the arduino-esp32 library does not yet support analogWrite or the Servo library which are both expected by StandardFirmata (and variants). I don't want to add an #ifdef to StandardFirmata just for this architecture either.
I could probably add the board to ConfigurableFirmata, but a user would have to know to exclude the analogWrite and Servo features in order to avoid compiler errors.
The esp32 HAL also redefines the standard INPUT and OUTPUT constants which is annoying. It's a relatively easy fix in Firmata however.
Requiring a specific ConfigurableFirmata is not a problem for me personally, and certainly is an interim step until those other entrypoints are supported by arduino-esp. As long as it is documented, others will be able to avoid pitfalls with that.
This board is not proving to be very Firmata friendly. Turns out it spits out a large string of text on startup and upon establishing a new Serial connection:
⸮⸮⸮�⸮���⸮�⸮⸮⸮⸮⸮�⸮⸮�������������⸮���⸮��������⸮��������⸮�⸮⸮⸮�⸮⸮�⸮⸮��⸮�⸮⸮��⸮���⸮⸮�⸮�⸮⸮�⸮����⸮⸮�����⸮��⸮⸮⸮�⸮⸮⸮⸮⸮⸮⸮�⸮��⸮⸮⸮�⸮��⸮⸮⸮⸮��⸮⸮⸮⸮�⸮⸮�⸮⸮⸮⸮�⸮�⸮⸮⸮⸮�⸮��⸮���⸮⸮⸮⸮⸮⸮⸮�⸮⸮�⸮����⸮⸮��⸮�����⸮�⸮�⸮⸮�⸮⸮⸮��⸮⸮⸮⸮��⸮⸮�⸮⸮�⸮⸮�⸮⸮⸮⸮⸮⸮��⸮��⸮⸮�⸮⸮�⸮⸮��⸮⸮⸮⸮��⸮⸮�⸮⸮�⸮�⸮⸮⸮⸮�⸮ets Jun 8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:160
load:0x40078000,len:10632
load:0x40080000,len:252
entry 0x40080034
A firmata client would need to interpret and ignore this data in order for this board to work over a Serial transport. This won't affect Wi-Fi however so that is still a possible option, but overall this board seems like a poor choice for Firmata applications.
I have ConfigurableFirmata branch with ESP32 support that sorta works for Wi-Fi: https://github.com/firmata/ConfigurableFirmata/pull/71. It's far from stable however. Needs testing and I could use some help improving it... especially in figuring out a buffering scheme that will likely lead to a larger structural change in using non-Serial/USB transports with Firmata.
any progress? im thinking of picking up an esp32 soon
I would not recommend purchasing an ESP32 board specifically for use with Firmata any time soon. Buy an ESP8266 board instead.
okay, now i have to decide to get bluetooth or firmata. Anyway, thanks for your work on this awesome project.
BLE is supported for Firmata on the Arduino 101 and the RedBear BLE Nano (with some minor changes). However, that said, BLE does not work well with Firmata because Firmata is stream-based and BLE is not designed for large data transfers.
I should add that how well BLE works with Firmata really depends on your application. It actually works well if you just need data from a single sensor or need to control a single actuator. It doesn't work well for general purpose control of a microcontroller where you need to use various digital and analog signals simultaneously.
Ups, I wanted more pins and changed to esp32, but firmata is not supported... :-( Any news/infos/plans on this issue?
The biggest blocker is that the Arduino analogWrite method is not yet supported on the esp32.
I'm using ledcwrite as a workaround until we get analogwrite: https://github.com/monteslu/ble-io/blob/master/arduino/esp32/esp32.ino#L229
Might still be helpful to have the board definition so we know what pins can do what in the meantime
Thanks for that tip :-)
does anyone has a functioning fork with the ESP32 working? i don't need analogWrite so this ain't a problem for me.
@draeron you can try this branch and see my notes about it here.
thx i'll be sure to check it out.
Firmata provided in IDE 1.8.13 still seems not to be working on bpi:uno32 , any plan to solve this issue ?