Pi Zero & Arduino SDK - is it possible


#1

I’ve asked this question on two other forums so far (Raspberry Pi and Arduino forums) but can’t find an answer.

Basically I have a Pimoroni ESP IoT pHAT and a Pi Zero which happily work together but I’d like to use Arduino SDK IDE for programming the ESP on the pHAT.

To do this though, I need the latest Arduino SDK which has an option to “Add additional boards…” that allows me to add a library supporting different ESP modules. I can simply use “sudo apt-get install arduino” on the Pi Zero to get an old version (v1.0.5) of Arduino SDK but that doesn’t have an easy option to add the ESP boards.

Any attempt to install the latest (v1.6.9) version however, draws a blank. I’ve tried the Linux 32 bit version (does nothing) and the ARM version (I get the Arduino / Genuino splash screen then it does nothing).

Has anyone tried this and got it working?

Cheers,
Brian


#2

The short answer is yes, if you compile it from source. I would definitely not do that on a Pi zero though, that would take forever, but I’ve done it a while back on a Pi2 (it still took forever but manageable).

It’s not a simple process, as in, you may run into compiling issues and if like me you struggle to interpret these errors (mostly to do with missing headers i.e development libs, but not always so) you’re in for a arduous, if rewarding in term of learning, task. Some call that frustration and find it too much hassle, depends on your character.

A more convenient way, but I haven’t tried it might be to use an ARMv7 build on a Pi3, program the ESP, then transfer it to the Zero. I’m not sure one such package exists though, but I’ve successfully done that in the past with other packages.

I guess I’m intrigued enough by the question to have a look for myself though, as it happens I’m working on some tutorials for the ESP IoT pHAT, though Arduino+ESP sounds like something that is so easily done using another platform than the Pi that is sounds more like a challenge than something of practical value. YMMV.


#3

The pre-compiled ARM Arduino IDE beta works for me on a Pi3. I’d be surprised if it supported the armv6 sported by the zero, but if you get as far as a splash screen then it might be and it’s more (unsurprisingly) a question of overhead.

That’s the good news… the ESP8266 board definition installation did not work for me but lending the process a hand allowed me to pass that hurdle. I’m in the process of attempting to flash the ESP IoT board but it looks hopeful to me, if, as advertised, pretty experimental.


#4

Thanks for the comments - unfortunately I don’t have a Pi3 and the object of the exercise is really to get it on the Pi Zero in order to make an all-in-one hardware/software dev environment.

I’ve never tried compiling the Arduino SDK from source but if it’s possible on the Pi Zero (albeit taking forever as you say) I’d happily leave it running non-stop.

I’m supposed to be doing an informal demonstration of the ESP at next months Raspberry Jam if I can and hoped I could put some stuff together using Arduino sketches. If it’s too much hassle I’ll resort to NodeMCU / ESPlorer and Lua.

Cheers,
Brian


#5

It’s not so much a question of the compilation process taking overly long out and of itself (though it will still take longer on a zero than a Pi3 for sure), but more that it’s unlikely going to work first time.

Case in point I just tried on a zero and it took under an hour, but the build does not start up. I’m sure I could poke around and eventually it might work, but I’m not sure I can see the benefit of that.

I’m not entirely sure what you mean by all-in-one development environment… besides the minimal extra footprint a Pi3 will do the job as well. But I get your point having none at hand it’s not an option for you.

Still, if you’d like to give it a go on the zero, but be prepared to do extra work, the following is a streamlined overview of the process, and assuming all goes well, that’s all there is to it:


#6

I know how you feel, had to build OpenCV on a Raspberry Pi 1 - 10 hours total compilation time and took 5 attempts -_-


#7

[quote=“RogueM, post:5, topic:2533, full:true”]It’s not so much a question of the compilation process taking overly long out and of itself (though it will still take longer on a zero than a Pi3 for sure), but more that it’s unlikely going to work first time.[/quote]Yes, I’d figured you meant the time involved in getting a successful (i.e, functional) build.

[quote]I’m not entirely sure what you mean by all-in-one development environment… besides the minimal extra footprint a Pi3 will do the job as well. But I get your point having none at hand it’s not an option for you.[/quote]The ‘all-in-one’ is as much a physical reference as anything - the combination of the Zero and the ESP pHAT is compact and sufficient for testing individual sensors in a neat way - my current setup involves 4 interlocking breadboards which are chock full of circuits and sensors and it’s getting a bit like a bowl of spaghetti. A Pi 3 would be a bit of a luxury purely for this purpose and would knock out most of a month’s budget set out for project components. ;)

[quote]Still, if you’d like to give it a go on the zero, but be prepared to do extra work, the following is a streamlined overview of the process, and assuming all goes well, that’s all there is to it:


[/quote]I’ll certainly give a try - thanks for the link.

Cheers,
Brian