Closed boonto closed 4 years ago
Similar to the festobionic implementation a different compiler is needed.
As the atmega4809 specs and libs are not part of the default avr-gcc
implementation of Ubuntu, we need the modified one from Arduino. A link to the compiler can be found here in the ArduinoIDE packages.
With these commands I added it to my path:
cd ~
wget http://downloads.arduino.cc/tools/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2
mkdir -p ~/avr-gcc
cd ~/avr-gcc
tar -xf ~/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2
rm ~/avr-gcc-7.3.0-atmel3.6.1-arduino5-x86_64-pc-linux-gnu.tar.bz2
echo "export PATH=\$PATH:\$HOME/avr-gcc/avr/bin" >> ~/.profile
Next, I uninstalled our recommended avr-gcc
to use the custom one instead.
I also added functionality to the robot.plugin.compiler.linux.dir
property which can be used to have both compilers running at the same time.
However, all of our integration tests run with the newer compiler version as well so we could replace it altogether (after more testing of course).
As the Arduino Uno Wifi Rev2 inbuilt LED is not on pin 13 but on 25 and 25 is not available on the board, I also added a new entry to the LED dropdown BUILTIN_LED
, similar to the Arduino constant used in e.g. the Blink example.
The avrdudes working with the Wifi Rev2 are also linked in the package index:
Compilers for OSX, Windows and Linux ARM 32 can also be found there.
I tested the compiler and avrdude on Windows, both worked with standard Uno, Uno Wifi Rev 2 and BOB3. Additional compiler resources are not needed.
Linux ARM compiler also seems to work, tested on a Raspberry Pi 4 and compiled for all avr-gcc robots.
Connecting via Raspberry also works.
For the IMU the additional library Arduino_LSM6DS3 is necessary.
The previously mentioned library does not include the inbuilt temperature sensor, because of that the library by SparkFun will be used instead.
In order to not pollute the other Arduinos for now the gyro and accelerometer blocks can be added to the program with CTRL-6. This will create the two program and config blocks.
works fine with latest openroberta-connector
As the Wifi Rev2 edition of Arduino seems not to work with our current Uno plugin we have to adapt a specific one for the Wifi Rev2 edition.
Add additional blocks for Wifi functionalityTemperature