Arduino IDE on Pi for FW updates?

I'd like to be able to do FW upgrades to my printer direct from my Pi3 running Octoprint. I have the desktop installed and only use it when I need access to the 'net or whatever and don't run it while I'm running a print job.

Currently, I'm having to haul my notebook out to my shop and do upgrades with that. I'd like to "centralize" that process by getting the Arduino IDE running on the Pi. I've spent pretty much the entire day trying to make this work and am 'stuck'.

I've tried both the sudo apt-get install arduino bit and actually got the IDE running, but ran into gcc/g++ errors, even though both of those packages were installed and 4 major revisions higher than the IDE was telling me I needed.

I nuked that install, purged all the files and then tried downloading the latest ARM tarball from arduino.cc. Got that decompressed and installed but it doesn't start. I get an hourglass on the desktop for about 10 seconds and then nothing.

I uninstalled that, purged files and did a full update and upgrade on the Pi. Installed the Arduino IDE again via apt-get and actually got it to almost work. I thought I was on the right track and went to import the sanguino libraries.

Unlike the Windows version, there's no Library Manager, but there is an Import Library option that looks for a .ZIP file as it's source. I happened to have a .ZIP file of the libraries I wanted and browsed to that file. Got an hourglass for a few seconds, no errors so I though it imported successfully. Nope. No Sanguino entries when I try to change the Board type.

Read an article that said you need to create a hardware directory under your sketchbook directory and copy library files there and restart the IDE. Nope, still no Sanguino boards. Argh....

Has anybody figured this out?

So I've been able to get this to work by running the following:

sudo apt-get update
sudo apt-get install avrdude

Then install the Firmware Updater plugin, and configure the settings for your board (gear icon in settings).

image

I think the only issue you may run into is if you have a touch screen. For those you have to unplug the touchscreen prior to flashing since it's connection interferes with the programmer or something along those lines.

1 Like

I got really close in the wee hours this morning (0330 or so) Nuked all the Arduino stuff again, downloaded the 32-bit ARM version again from the Arduino site, got it installed and working, actually got the libraries to be recognized and set all my parameters. I also noticed that now there's a library manager option, but it won't connect to the .JSON file to get the list. Funny, but I can browse to it just fine. Another issue to address.. Ugh

I opened the .INO file (which took like 4 minutes) and then tried a test compile. App seemed to lock up so I figured since it was close to 4am, I'd head off to bed and let it grind. Checked it when I got up and the IDE isn't responding at all. Task manager showed it at 0% CPU so I killed the process and came in here to check for responses. :slight_smile:

I'll give your method a go a little later.

Thx!

Started over from a new install of everything because the system was unreliable and would just stop responding. Got the latest Octoprint.IMG file, got that installed and updated, got the desktop running and dove in to the Arduino IDE. Tried the sudo apt-get install avrdude bit, but that failed with some message about some symbolic links not being created so I went the manual route and DL'd the 32-bit ARM package from Arduino.cc.

Got that installed and running, but am getting an error when trying to use the library manager. "Error downloading https://downloads.arduino.cc/libraries/library_index.json". I can reach the libraries using a browser so it's not a networking issue.

Looking in the log window, it appears to be some type of certificate error. This is all with Arduino-1.8.11. I did read an article on another forum that hinted at using 1.8.10, but I don't recall the specific reasons. (again, wee hours type of thing)

Close.. so close.

Did you sudo apt-get update before trying install?

Yessir. That and did sudo get-apt upgrade too.

Installed the ARM Linux version of 1.8.12 today. Library manager works like a charm now. If I could only find the Sanguino board library I'd be golden.

1 Like

Ahh, derp moment on my part. Couldn't find the library in the Boards Manager and completely forgot I had to add the URL to the list before it would appear.

Thx! 1st compile and test upload in a few minutes.

[Edit] Voila! Compiled and uploaded. Waiting for the bed and nozzle to heat up so I can set my Z offset, manual level and ABL probe run.