Author Topic: "official" ESP8266 Arduino Core support  (Read 2752 times)

boneskull

  • Newbie
  • *
  • Posts: 5
"official" ESP8266 Arduino Core support
« on: January 26, 2018, 01:27:12 pm »
In version 2.4.0 of the Arduino Core for ESP8266 (https://github.com/esp8266/Arduino), my PR for DigiStump Oak support landed.

You can now use Oak (without the Particle nonsense) directly in the Arduino IDE or PlatformIO just like any other ESP8266.

A couple caveats being that:

  • You need to use a USB-to-UART adapter to talk to it.  FT232RL, CP2102, PL2303HX, CH340G, etc.  TX->RX, RX->TX, GND->GND
  • You may need to power the Oak via the USB port instead of from the USB-to-UART adapter.
  • Keep the baud speed to 115200; if one adapter doesn't work, try a different one.
  • P2 must be low (wired to GND) at powerup for the Oak to go into flashing mode, and then power cycled (without P2 to GND) to run your firmware thereafter
  • I have a bugfix (https://github.com/esp8266/Arduino/pull/4222) that's been merged, but not yet released at the time of this writing

See attached image for location in Arduino IDE's "Boards" menu.

Good luck.  Please file any issues you might have with the Oak support in the issue tracker: https://github.com/esp8266/Arduino/issues

Chris

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: "official" ESP8266 Arduino Core support
« Reply #1 on: January 29, 2018, 03:17:37 pm »
Great work on that Chris, and thanks for getting the Oak variant included in the ESP8266 Arduino package as native! :D

I've submitted some patches to that which have been merged but also not released yet (board.txt definition using non-existent reset method, documentation updates, etc), which would obviously not have been possible without that patch.

I've finally moved one node over to the 2.4.0 ESP8266 core with no issues, but have yet to try with another... it's currently running 2.3.0 (just means I have to use the ESP8266 native GPIO numbers, not the Oaks) as when I tried the 2.4.0 pre-release it kept locking up... probably something in the adafruit TFT library that didn't sit right.... so will be interesting to see how that goes.

Z69

  • Newbie
  • *
  • Posts: 28
Re: "official" ESP8266 Arduino Core support
« Reply #2 on: February 26, 2018, 02:58:48 am »
Hi PeterF

I have been using - https://www.letscontrolit.com/wiki/index.php/ESPEasy for a while now on my Oak with Zero crashes.
They use 2.3.0 and it works like a charm.
I have been using the latest release of Ver.2 here - https://github.com/letscontrolit/ESPEasy/releases without any issues.

Z69

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: "official" ESP8266 Arduino Core support
« Reply #3 on: February 28, 2018, 04:55:27 pm »
Fantastic to hear!

I've head mention of ESPEasy on and off, so it's great to hear from a user that it's another viable option. Just never got to playing around with myself... don't have all the other automation stuff running atm.

Yeah, I've had no issues with the official Arduino ESP8266 core v2.3.0, it was just the R1 or R2 of 2.4.0, but hopefully, that was a bug that has gone away now, or is a bug in my code due to some change in the libraries or codebase... have yet to run up the TFT display unit with 2.4.0... it'll happen... someday ;)

willgonz

  • Newbie
  • *
  • Posts: 2
Re: "official" ESP8266 Arduino Core support
« Reply #4 on: May 01, 2018, 03:33:23 pm »
So if I do this, will I be able to do over the air updates or do I always have to do it over Arduinos and the USB-to-UART adapter?

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: "official" ESP8266 Arduino Core support
« Reply #5 on: May 05, 2018, 03:28:16 am »
You can do OTA updates with the Arduino ESP8266 core, as long as you include the required library and initialise OTA support in your sketch.

http://arduino-esp8266.readthedocs.io/en/latest/ota_updates/readme.html

rocksolidsr

  • Newbie
  • *
  • Posts: 5
Re: "official" ESP8266 Arduino Core support
« Reply #6 on: July 20, 2018, 08:26:54 am »
would it be possible to use another Arduino to flash the oak with code so that it could then be updated OTA with the Arduino ESP8266 core via this method?
http://digistump.com/wiki/oak/tutorials/serial_through_arduino

What would the port setting be? The USB port of the connected Arduino?

Would the settings in the attached image still be good?

What about the erase flash setting, should that just be set to "sketch", "sketch +wifi settings", or "all flash"

Trying to avoid buying a USB to UART adapter if I can just use an Arduino as that.

Thanks,

« Last Edit: July 20, 2018, 08:28:53 am by rocksolidsr »

PeterF

  • Hero Member
  • *****
  • Posts: 883
Re: "official" ESP8266 Arduino Core support
« Reply #7 on: July 27, 2018, 03:05:46 pm »
rocksolidsr : I don't see why not - If you have an Arduino that has a removable IC you can pull the IC so you can use the onboard USB-serial adapter to program the Oak. And if it doesn't have a removable IC, you may be able to simply wire it so it is held in a reset state so it doesn't interfere in the update process by responding to something it shouldn't.

Serial port setting would be that of the Arduino. The erase flash setting must be reasonably new, haven't updated the ESP8266 core in a while so haven't seen it before. [Edit: Or I simply hadn't seen it... just loaded the Arduino IDE to check it and that option was there. :-O ] For the first flash, I'd probably erase everything, as the initial OTA enabled sketch you load can be written in a way that it configure the wifi settings itself.

Consider getting a USB to UART adapter anyway - they're cheap as chips, and make life a lot easier down the path as you can just plug in and see any debug messages you have running. Most CH340 adapters are both 3.3v and 5v ready, and are compatible with pretty much any OS.
« Last Edit: July 27, 2018, 03:28:43 pm by PeterF »