2 Hardware setup

In order to use the arduino hardware with the toolkit, it must be programmed with special firmware.

2.1 Programming the Arduino

To program the hardware, using a default configuration, run the arduinosetup command:

arduinosetup

A temporary Arduino project will be created, with the Arduino toolkit files copied to it and the Arduino IDE will open.

Set the board type and port correctly for the connected Arduino and press the upload button on the IDE.

The sources will be compiled and then uploaded to the connected arduino board.

After successful upload the Arduino IDE should be closed.

NOTE

The arduino programming is not compatible with the Matlab arduino library, so must be programmed by the Octave Arduino toolkit to communicate to the arduino, even if it was previously used to work with Matlab.

NOTE

The toolkit requires the Arduino IDE in order to program the Arduino device.

The binary can set using the ’arduinobinary’ property when running setup.

For arduino IDEs before version 2, if the toolkit can not find the IDE, run the IDE manually, close it and retry programming the Arduino. Otherwise, use the ’arduino’ binary property.

2.2 Known Arduino Board Types

The board type must be known in order to successfully detect and connect to the Arduino board after programming.

Currently, known boards are:

  • Arduino Due
  • Arduino UNO
  • Arduino Mega 2560
  • Arduino Nano
  • Arduino Nano Every
  • Arduino Nano 33 BLE
  • Arduino Nano RP2040 Connect
  • Arduino Pro/Pro Mini
  • Arduino Pro Micro
  • Arduino Leonardo
  • Arduino Micro
  • Arduino MKR1000
  • Arduino MKRZero
  • Sparkfun SAMD21
  • Arduino Lilypad
  • Arduino UNO WiFi rev2

    NOTE

    The Arduino servo library code may require modifications to eliminate conflicts between servos and the tone library

  • Raspberry Pi Pico
  • EPS32 Dev

Additional boards can be added easily, however require minor code changes.


Next: Connecting to an arduino, Previous: Installing and loading, Up: Introduction   [Contents][Index]