Editing Arduino package

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save 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.
 
The package currently supports the following boards:
 
 
* uno
 
* nano
 
* promini
 
* promicro
 
* mega2560
 
* leonardo
 
* micro
 
* lilypad
 
* uno wifi rev2
 
* sparkfunsamd21
 
* nano every
 
  
 
= Installation =
 
= Installation =
Line 24: Line 10:
  
 
== octave installation ==
 
== octave installation ==
From octave command line:
+
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 command line:
+
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.
 
'''NOTE:''' on some versions of Ubuntu, the default installed Arduino IDE / java interface is broken so that the IDE will not detect the serial port and allow the board to be programmed. The solution is installed the Arduino ide as a flatpack, or manually. The Arduino binary must be added to the path in order to be found by arduinosetup. Alternatively, the full path/binary for the ide can be specified to arduinosetup.
 
 
 
  >> arduinosetup('arduinobinary', '/path_to_the_installed_arduino/arduino')
 
 
More specifically on MacOS:
 
 
  >> arduinosetup('arduinobinary', '/Applications/Arduino.app/Contents/MacOS/Arduino')
 
  
 
== 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:
  
   ar = arduino;
+
   a = arduino;
 
   led_pin = "d13";
 
   led_pin = "d13";
 
   while true
 
   while true
Line 113: Line 90:
 
     pause (0.5)
 
     pause (0.5)
 
   endwhile
 
   endwhile
 +
  
 
= Documentation =
 
= Documentation =
Line 121: Line 99:
  
 
* The [https://octave.sourceforge.io/arduino/overview.html Function Reference]
 
* The [https://octave.sourceforge.io/arduino/overview.html Function Reference]
 
[[Category:Octave Forge]]
 

Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: