<div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>I was doing a project with both the ESP32 and ESp8266 recently (also from Linux). With the ESP32, using ESP_IDF worked great, but like you, after hours of fluffing around with toolchains for the ESP8266, I gave up and went for the Arduino IDE approach. Note that using the arduino IDE does not preclude you from using expresiff's SDK directly.In my project I needed access to some of the low level radio API, so I had to:</div><div><br></div><div><div><font face="monospace, monospace">extern "C" {</font></div><div><font face="monospace, monospace">  #include <user_interface.h></font></div><div><font face="monospace, monospace">}</font></div></div><div><br></div><div>You can find all the headers under ~/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/tools/sdk/include</div><div><br></div><div>The arduino IDE does do some weird stuff, particularly to files ending with ".ino". So if you're hitting strange errors on code you know is valid (of if you just want to avoid the issue entirely), don't put any code in the ".ino" file. Rather, put all your #includes in the ".ino" (you have to have all your #includes inside the .ino file for some reason), but have all your actual code in another, ".cpp", file.</div><div><br></div><div>The other option, if you don't need low level access to the API , and don't care too much about power efficiency too much, is to flash it with micropython, and then you can:</div><div> 1) write all your code in python, which is much easier</div><div> 2) don't have to bother with a toolchain at all, because all you do is upload your files to the board as .py files via UART.</div><div>If you take this approach, you can just download a prebuilt image from <a href="https://micropython.org">https://micropython.org</a> - easy as cake.</div><div><br></div><div><br></div><div>Geoff</div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 9, 2019 at 6:35 AM Andy Gardner <<a href="mailto:ceo@andygardner.com">ceo@andygardner.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
On 9/01/19 3:41 PM, Dave Bracken wrote:<br>
> Andy,<br>
> Was there a particular reason you ruled out the NodeMCU plugin for the Arduino IDE?  If you haven't looked at it, it might get you started more quickly.  From what you told me, the Arduino IDE should be able to do most of the things you need but I appreciate there's a lot of possible solutions out there and if you have a preference for developing on a Linux platform, that adds other angles.<br>
<br>
Definitely has to be on Linux.<br>
<br>
  A quick proof of concept could be to follow the destructions on <a href="https://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/" rel="noreferrer" target="_blank">https://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/</a> as the example code that gets downloaded will get it connected to your wifi and a web interface for blinky etc.<br>
<br>
Thanks I take a look at that. The final target is a bare bones esp8266 with a si4703 FM Tuner module, 2 x 18650 LiIon 2 x charge controller and 2 x 5v solar panel, in a box with whip antenna. Able to be sent to friends with zero skills to auto link into their wireless network and then be mounted up a pole and left there until something kills it.<br>
<br>
Unit will sleep mostly, wake up and check signal levels etc on all FM broadcast channels and if something has changed, fire up the wireless link and make contact with the mothership via MQTT, then go back to sleep.<br>
<br>
I've got the mothership up and running - Mosquitto + <a href="https://github.com/curzon01/mqtt2sql" rel="noreferrer" target="_blank">https://github.com/curzon01/mqtt2sql</a> + Apache ModPERL<br>
<br>
> Please feel free to call in if I can be of help writing some code.<br>
<br>
That would be great. My brain only has space inside for one programming language and that's PERL. I've done some fairly artistic stuff with PERL over the years but this C stuff is a little beyond me.<br>
<br>
Cheers,<br>
<br>
Andy<br>
<br>
> <br>
> Dave<br>
<br>
<br>
_______________________________________________<br>
Chchrobotics mailing list <a href="mailto:Chchrobotics@lists.ourshack.com" target="_blank">Chchrobotics@lists.ourshack.com</a><br>
<a href="https://lists.ourshack.com/mailman/listinfo/chchrobotics" rel="noreferrer" target="_blank">https://lists.ourshack.com/mailman/listinfo/chchrobotics</a><br>
Mail Archives: <a href="http://lists.ourshack.com/pipermail/chchrobotics/" rel="noreferrer" target="_blank">http://lists.ourshack.com/pipermail/chchrobotics/</a><br>
Meetings usually 3rd Monday each month. See <a href="http://kiwibots.org" rel="noreferrer" target="_blank">http://kiwibots.org</a> for venue, directions and dates.<br>
When replying, please edit your Subject line to reflect new subjects.</blockquote></div>