Setting up Your Machine

The code generation is handled completely within the Wolfram System. However, to compile and download the code it invokes an external toolchain.

First load the package.

Load the package.

If you are working with a microcontroller on an Arduino board, MicrocontrollerEmbedCode looks for the Arduino IDE. To see if the compiler and other programs can be successfully invoked run a test to blink the LED on the board. For example, if you have an Arduino Uno run the following code after modifying the last argument to match the connection port of your machine.

Blink the LED on the Arduino Uno.

If the LED is blinking every second then the Arduino toolchain is being correctly invoked. If not, it must be explicitly specified.

Specify the path to the compiler.

If an avr-gcc toolchain has been installed elsewhere, that can be used as well.

Use a different avr-gcc compiler.
Explicitly specify the compiler's name.

The path "/usr/local/bin" is in the system path.

If it is in the system path, the path need not be explicitly given.

Use the avr-gcc compiler that is in the system path.