and while I’m at it and it is still fresh in my mind, here’s how to install the Arduino IDE version 1.6.3 on a Raspberry Pi running Raspbian Wheezy.
follow the instructions at:
BUT:
-
STOP before ‘How to recompile’, as that requires a full distro upgrade, which will likley break your system (without spending significant amount of efforts ironing out the issues)
-
don’t forget to passify the Jessy repo in sources.list afterwards, again you don’t want to do more upgrades than you have to, especially without realising at a later date
-
note that the maintainer/package maker advise to use the 1.6.0 release, though for me I had no trouble using his master repo (or at least found workarounds that work for ME)
regarding:
- You have to start the IDE as superuser (sudo arduino)
I have no trouble, no superuser level required here. Make sure the pi (or whatever your day-to-day user is) is part of the dialout group however.
- Custom cores cannot be used unless you modify the platform.txt
not relevant for Metro (pretty sure anyhow)
- Serial ports cannot be opened
this is true, the ‘Ports’ menu seems to be greyed out 9 times out of 10. However, you can simply edit ~/.arduino15/preferences.txt and edit the line starting ‘serial.port=’ with your device address (typically /dev/ttyUSB0).
and that is it. Well, don’t use the ‘Board>Boards Manager’ entry as it wasn’t working in 1.6.3 and will trash your IDE. If you get stuck, purge ~/.arduino15/package_index.json and you should be back in business.
… and indeed, sadly version 1.6.4 is not yet available as a pre-packaged Debian and as a result the Boards Manager, in term of Metro board support there is a fair bit of fiddling to perform if you want the latest Adafruit boards to be listed - but try as G advised above first, that is using a Uno as target board, I will hopefully work, and if not instructions can be found below.
The problem is that Adafruit has not published the Metro board config to their github, so you need to get hold of their ‘board configuration’ master version 1.2.0, which is not only hard to track down, but seems not to be compatible with anything but the Arduino version 1.6.4.
Where there is a will tere is a way however, you can install what is available on their github, and hack in the Metro board config by hand. Sounds complicated, but it isn’t (if you know what you have to do):
- Go to: GitHub - adafruit/Adafruit_Arduino_Boards: Configuration and other support files to use Adafruit's boards like Trinket, Pro Trinket, Gemma, Flora, and more with the Arduino IDE 1.6.x and clone the repo or download the Zip file for it.
mkdir ~/Downloads/Adafruit_Metro
cd ~/Downloads/Adafruit_Metro
wget https://github.com/adafruit/Adafruit_Arduino_Boards/archive/master.zip
- uncompress and copy the hardware/adafruit folder into your Arduino sketchbook folder:
unzip master.zip
mkdir ~/Arduino/hardware
cp -R ./Adafruit_Arduino_Boards-master/hardware/adafruit
~/Arduino/hardware/adafruit
- add the Metro board definition from the most reason json that plugs straight into the latest Arduino IDE:
nano ~/Arduino/hardware/adafruit/avr/boards.txt
##############################################################
metro.name=Adafruit Metro
metro.upload.tool=arduino:avrdude
metro.upload.protocol=arduino
metro.upload.maximum_size=32256
metro.upload.maximum_data_size=2048
metro.upload.speed=115200
metro.bootloader.tool=arduino:avrdude
metro.bootloader.low_fuses=0xFF
metro.bootloader.high_fuses=0xDE
metro.bootloader.extended_fuses=0x05
metro.bootloader.unlock_bits=0x3F
metro.bootloader.lock_bits=0x0F
metro.bootloader.file=arduino:optiboot/optiboot_atmega328.hex
metro.build.mcu=atmega328p
metro.build.f_cpu=16000000L
metro.build.board=AVR_METRO
metro.build.core=arduino:arduino
metro.build.variant=arduino:standard
it does not matter where you place this but be sure not to break an existing board segement, and to have a separator for the new entry as per current file structure.
And that’s it, you should be able to select the Metro in the Arduino IDE and flash it.
For those who want to try to plug the entire Adafruit 1.2 board configuration files it can be downloaded here:
https://adafruit.github.io/arduino-board-index/boards/adafruit-1.2.0.tar.bz2
… but like I said the Arduino IDE didn’t agree with it so I was quite happy to leave it be and wait for the day I can just get version 1.6.4 with automatic board management!