Editing Arduino package
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
The {{Forge|arduino}} package is part of the [[Octave Forge]] project and provides an Octave look-alike implementation of the Arduino extension for Matlab. | The {{Forge|arduino}} package is part of the [[Octave Forge]] project and provides an Octave look-alike implementation of the Arduino extension for Matlab. | ||
= Installation = | = Installation = | ||
Line 21: | Line 7: | ||
It needs the Arduino IDE to be installed and functioning on the computer in order to program Arduino boards, however does not need it to control boards that have already been programmed. | It needs the Arduino IDE to be installed and functioning on the computer in order to program Arduino boards, however does not need it to control boards that have already been programmed. | ||
The Arduino package also requires the | The Arduino package also requires the instrument-control package to be installed. | ||
== octave installation == | == octave installation == | ||
From octave | From octave commmand line: | ||
>> pkg install -forge arduino | >> pkg install -forge arduino | ||
Line 38: | Line 24: | ||
In order to use the arduino hardware with the toolkit, it must be programmed with special firmware. | In order to use the arduino hardware with the toolkit, it must be programmed with special firmware. | ||
From octave | From octave commmand line: | ||
>> arduinosetup | >> arduinosetup | ||
Line 49: | Line 35: | ||
After successful upload the Arduino IDE should be closed. | After successful upload the Arduino IDE should be closed. | ||
== Connecting to an Arduino == | == Connecting to an Arduino == | ||
Line 105: | Line 82: | ||
The full code, with the LED controlled in a loop ti turn it on/off each second is in the following example: | The full code, with the LED controlled in a loop ti turn it on/off each second is in the following example: | ||
a = arduino; | |||
led_pin = "d13"; | led_pin = "d13"; | ||
while true | while true | ||
Line 114: | Line 91: | ||
endwhile | endwhile | ||
Documentation and reference for the Arduino | == Documentation == | ||
Documentation and reference for the Arduino toolkit is available as: | |||
* The [https://octave.sourceforge.io/arduino/package_doc/index.html Online manual] | * The [https://octave.sourceforge.io/arduino/package_doc/index.html Online manual] | ||
* The [https://octave.sourceforge.io/arduino/overview.html Function Reference] | * The [https://octave.sourceforge.io/arduino/overview.html Function Reference] | ||