I gave up trying to fix this problem because there was another problem with Raspberry Pi’s menu entry of “Python2 (IDLE)” actually being “Python**3** (IDLE)” So I got an old version of their OS and did a trial run through which did what I needed. I hope it doesn’t develop a problem like in the 2nd EDIT. Either way, this ends here.
NOT solved because the problem has returned, so it wasn’t an installation problem.
The problem is when I upload, the button on the Teensy3.2 needs to be pressed and that doesn’t always work. I will try starting from scratch using advice given by Pert below. I will update again if I have any luck
EDIT I had trouble installing Arduino 1.8.10 using the LinuxARM 32 bits download on a Raspberry Pi 2 running a newly flashed operating system (Buster 2019-09-26 ). Three times I went through the procedure below, but had trouble uploading sketches to a Teensy 3.2 (auto mode wouldn’t work, pressing the reset button mostly worked, but the Arduino IDE would freeze or RPi2 would crash altogether) My fourth attempt was on a RPi3 and had no problems at all. I then went back and tried using the original RPi2 and at first seemed to fail, but when I came back to it the Arduino icon was just sitting there where it was supposed to be, like its attitude was, “WHAT?! I’ve been here the whole time.” I proceeded to install the Teensyduino support and all went well.
** THE SOLUTION**
I followed the installation guide, but instead of using ./install.sh I used ./arduino-linux-setup.sh pi, where pi was the user name of my login on the RPi2 (as a parameter being passed to the app/program during start up). This file was always in the extracted arduino-1.8.10 folder (along with install.sh a few other files), so I decided to see what happened and got lucky!
(I have included my entire procedure here, but mostly I’m asking about my installation of Arduino on the Raspberry Pi 2. I had this same board successfully loaded with Arduino and Teensyduino a few years ago when the IDE was first available in the ARM version and had support for Teensy boards as well. So I know the hardware set up works, but I don’t remember exactly each step I did during installation. I thought I would flash the latest Raspbian OS and repeat the install, but it didn’t go well this time. Here’s what happened…)
I flashed Raspbian Buster 2019-09-26 using Balena Etcher without error. After 1st boot setup & updates (and a few apt install: xscreensaver, speedtest-cli, tightvncserver) and a few minor tweaks (panel settings, task bar, appearance settings etc.) I downloaded the 32 bit version:
which I right-clicked, selected “Extract To…”, and put the folder at:
Opening a terminal window and navigating:
and finally entering:
I started the installation process (in basically a pristine state - no internet exposure other than the system updates, no media accessed for docs/music/photos/videos. Nothing - although I don’t know how to verify SHA-256 But I did do the entire process I describe here completely two times). Here’s what I saw:
pi@raspberrypi:~/arduino-1.8.10 $ sudo ./install.sh Adding desktop shortcut, menu item and file associations for Arduino IDE... touch: cannot touch '/root/.config/mimeapps.list': No such file or directory /usr/bin/xdg-mime: 848: /usr/bin/xdg-mime: cannot create /root/.config/mimeapps.list.new: Directory nonexistent done! pi@raspberrypi:~/arduino-1.8.10 $
Despite this less than perfect install, I was able to open the IDE which seemed to be OK. I closed the IDE and began the “Teensyduino” installation procedure, adding support for Teensy3.2, which seemed to proceed without incident. Then I loaded up the BLINK example and clicked UPLOAD. Everything seemed OK until the very end:
Opening Teensy Loader... Teensy Loader could not find the directory /tmp/arduino_build_597513 quitexit status 1 Error compiling for board Teensy 3.2 / 3.1.
(This made me worry because it was looking in the folder which was the default location given in the “Extract To…” box which was /tmp. But I thought I was choosing the final place where Arduino would reside, and the /tmp folder didn’t seem like a spot for long term storage.)
(This was considered by the IDE to be an error because it offered the button to click which would “copy errors into clipboard”)
The thing is, pressing the button on the board got the BLINK to work fine. The normal process is to press the button on the first upload, but then subsequent uploads are normally automatic (no button involved). So I changed the delay time in BLINK to see if a second upload would work:
[--------> I did not include the first part since (I think) it was the same as the first upload <--------] Opening Teensy Loader... /home/pi/arduino-1.8.10/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /tmp/arduino_build_597513/Blink.ino.elf Sketch uses 13112 bytes (5%) of program storage space. Maximum is 262144 bytes. Global variables use 6408 bytes (9%) of dynamic memory, leaving 59128 bytes for local variables. Maximum is 65536 bytes. /home/pi/arduino-1.8.10/hardware/teensy/../tools/teensy_post_compile -file=Blink.ino -path=/tmp/arduino_build_597513 -tools=/home/pi/arduino-1.8.10/hardware/teensy/../tools -board=TEENSY31 -reboot -port=/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4 -portlabel=/dev/ttyACM0 Everything -portprotocol=Teensy com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'send': was expecting ('true', 'false' or 'null') at [Source: (ProcessPipeInputStream); line: 1207, column: 6] at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804) at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:673) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidToken(UTF8StreamJsonParser.java:3526) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2621) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:826) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:723) at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2367) at cc.arduino.packages.discoverers.PluggableDiscovery.run(PluggableDiscovery.java:87) at java.lang.Thread.run(Thread.java:748) StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2621) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:826) at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:723) at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2367) at cc.arduino.packages.discoverers.PluggableDiscovery.run(PluggableDiscovery.java:87) at java.lang.Thread.run(Thread.java:748)
After the process hit a snag, I pressed the button on the board and the upload then took effect (different blinking pattern). This time the IDE did not give the option to save the errors to clipboard, so I had to manually highlight and copy to get the above message.
If I only had to press the button every time, I might not have posted this. But the problem is, that after a few times it would crash. Sometimes just the IDE, but then the whole RPi would freeze and I had to kill the power. I have the log for the Teensy Loader, but I didn’t include it here. I mostly wanted to rule out any errors I might have made with the Arduino installation before posting on the Teensy forum. Thanks for your time.
FirstUploadError-SecondUploadMessage.txt (44.3 KB)