New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESP32 to board defs #315

Open
d1runberg opened this Issue Nov 2, 2016 · 26 comments

Comments

Projects
None yet
6 participants
@d1runberg

d1runberg commented Nov 2, 2016

It would be awesome to add ESP32 to the board defs for standardfirmatawifi/ bluetooth! The GPIO capability is much better than the 8266

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Nov 2, 2016

Member

Do you have an ESP32 board? I don't and need someone to verify the defs if I add them.

Member

soundanalogous commented Nov 2, 2016

Do you have an ESP32 board? I don't and need someone to verify the defs if I add them.

@d1runberg

This comment has been minimized.

Show comment
Hide comment
@d1runberg

d1runberg Nov 2, 2016

Not yet, but I will probably have one in about a week ;)

d1runberg commented Nov 2, 2016

Not yet, but I will probably have one in about a week ;)

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Nov 2, 2016

Member

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.

Member

soundanalogous commented Nov 2, 2016

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.

@d1runberg

This comment has been minimized.

Show comment
Hide comment
@d1runberg

d1runberg Nov 3, 2016

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
derek.runberg@sparkfun.com
http://www.sparkfun.com
http://learn.sparkfun.com

On Wed, Nov 2, 2016 at 1:50 PM, Jeff Hoefs notifications@github.com 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
#315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI0_VGuerB46dO7q2bnVY8Z4_thy69SHks5q6PeAgaJpZM4KnrgO
.

d1runberg commented Nov 3, 2016

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
derek.runberg@sparkfun.com
http://www.sparkfun.com
http://learn.sparkfun.com

On Wed, Nov 2, 2016 at 1:50 PM, Jeff Hoefs notifications@github.com 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
#315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI0_VGuerB46dO7q2bnVY8Z4_thy69SHks5q6PeAgaJpZM4KnrgO
.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Nov 3, 2016

Member

Thanks! Hadn't realized you worked at Sparkfun.

Member

soundanalogous commented Nov 3, 2016

Thanks! Hadn't realized you worked at Sparkfun.

@d1runberg

This comment has been minimized.

Show comment
Hide comment
@d1runberg

d1runberg Nov 3, 2016

;)

Derek Runberg
Regional Education Developer
Sparkfun Electronics Inc.

Boulder, CO.
Cell: 971-344-2355
derek.runberg@sparkfun.com
http://www.sparkfun.com
http://learn.sparkfun.com

On Thu, Nov 3, 2016 at 4:40 PM, Jeff Hoefs notifications@github.com 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
#315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI0_VHZ3I3gZzmIdGkxtClc2XybEMPvQks5q6nDfgaJpZM4KnrgO
.

d1runberg commented Nov 3, 2016

;)

Derek Runberg
Regional Education Developer
Sparkfun Electronics Inc.

Boulder, CO.
Cell: 971-344-2355
derek.runberg@sparkfun.com
http://www.sparkfun.com
http://learn.sparkfun.com

On Thu, Nov 3, 2016 at 4:40 PM, Jeff Hoefs notifications@github.com 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
#315 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AI0_VHZ3I3gZzmIdGkxtClc2XybEMPvQks5q6nDfgaJpZM4KnrgO
.

@deadprogram

This comment has been minimized.

Show comment
Hide comment
@deadprogram

deadprogram Jan 13, 2017

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?

deadprogram commented Jan 13, 2017

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?

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Jan 13, 2017

Member

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.

Member

soundanalogous commented Jan 13, 2017

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.

@deadprogram

This comment has been minimized.

Show comment
Hide comment
@deadprogram

deadprogram May 17, 2017

Hi @soundanalogous anything happen on this, or anything I can do to help out with it?

deadprogram commented May 17, 2017

Hi @soundanalogous anything happen on this, or anything I can do to help out with it?

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 17, 2017

Member

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.

Member

soundanalogous commented May 17, 2017

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.

@deadprogram

This comment has been minimized.

Show comment
Hide comment
@deadprogram

deadprogram May 17, 2017

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

deadprogram commented May 17, 2017

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

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 17, 2017

Member

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.

Member

soundanalogous commented May 17, 2017

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.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 20, 2017

Member

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.

Member

soundanalogous commented May 20, 2017

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.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 20, 2017

Member

The esp32 HAL also redefines the standard INPUT and OUTPUT constants which is annoying. It's a relatively easy fix in Firmata however.

Member

soundanalogous commented May 20, 2017

The esp32 HAL also redefines the standard INPUT and OUTPUT constants which is annoying. It's a relatively easy fix in Firmata however.

@deadprogram

This comment has been minimized.

Show comment
Hide comment
@deadprogram

deadprogram May 21, 2017

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.

deadprogram commented May 21, 2017

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.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 22, 2017

Member

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.

Member

soundanalogous commented May 22, 2017

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.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous May 29, 2017

Member

I have ConfigurableFirmata branch with ESP32 support that sorta works for Wi-Fi: firmata/ConfigurableFirmata#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.

Member

soundanalogous commented May 29, 2017

I have ConfigurableFirmata branch with ESP32 support that sorta works for Wi-Fi: firmata/ConfigurableFirmata#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.

@Wqrld

This comment has been minimized.

Show comment
Hide comment
@Wqrld

Wqrld Jul 18, 2017

any progress? im thinking of picking up an esp32 soon

Wqrld commented Jul 18, 2017

any progress? im thinking of picking up an esp32 soon

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Jul 18, 2017

Member

I would not recommend purchasing an ESP32 board specifically for use with Firmata any time soon. Buy an ESP8266 board instead.

Member

soundanalogous commented Jul 18, 2017

I would not recommend purchasing an ESP32 board specifically for use with Firmata any time soon. Buy an ESP8266 board instead.

@Wqrld

This comment has been minimized.

Show comment
Hide comment
@Wqrld

Wqrld Jul 18, 2017

okay, now i have to decide to get bluetooth or firmata. Anyway, thanks for your work on this awesome project.

Wqrld commented Jul 18, 2017

okay, now i have to decide to get bluetooth or firmata. Anyway, thanks for your work on this awesome project.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Jul 18, 2017

Member

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.

Member

soundanalogous commented Jul 18, 2017

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.

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Jul 18, 2017

Member

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.

Member

soundanalogous commented Jul 18, 2017

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.

@ttww

This comment has been minimized.

Show comment
Hide comment
@ttww

ttww Jan 5, 2018

Ups, I wanted more pins and changed to esp32, but firmata is not supported... :-(
Any news/infos/plans on this issue?

ttww commented Jan 5, 2018

Ups, I wanted more pins and changed to esp32, but firmata is not supported... :-(
Any news/infos/plans on this issue?

@soundanalogous

This comment has been minimized.

Show comment
Hide comment
@soundanalogous

soundanalogous Jan 5, 2018

Member

The biggest blocker is that the Arduino analogWrite method is not yet supported on the esp32.

Member

soundanalogous commented Jan 5, 2018

The biggest blocker is that the Arduino analogWrite method is not yet supported on the esp32.

@monteslu

This comment has been minimized.

Show comment
Hide comment
@monteslu

monteslu Jan 5, 2018

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

monteslu commented Jan 5, 2018

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

@ttww

This comment has been minimized.

Show comment
Hide comment
@ttww

ttww Jan 5, 2018

Thanks for that tip :-)

ttww commented Jan 5, 2018

Thanks for that tip :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment