Software Overview  |  Sitemap  |  Downloads  |  Developers  |  Forums
Small_clear_logo_llc

Arduino Installation

To install an Arduino device into the Virtual Wiring system, cable an Arduino's USB port to the Virtual Wiring system's USB port. Then, from the Scripts/Device/Arduino directory on the Scripts page, run the Arduino Script.

Its parameters are:

  • port_location : the location of the USB port. In *nix systems, this is in the /dev directory with a name like /dev/ttyUSB0, /dev/cu.usbmodem, or /dev/ttyACM. From a terminal on your host system, type "ls -lrt /dev/*" for hints. On Windows systems, the location is COMx where "x" is a number (1,2,3, etc.).

To learn more about the USB port locations see the FAQ on port locations.

Optional parameters are:

  • analog_sample_period_ms : the period in milliseconds between one set of samples of the analog inputs and the next. The shorter the period, the faster the inputs are sampled. Generally, sampling need not be more than a few times per second (say a 300ms period), but for some applications, sampling should be shorter. For slower systems, settings of 10 times per second or faster can consume significant CPU processing power. If no analog input pins are configured, this parameter has no effect on the system.

  • i2c_read_delay_micros : the number of microseconds to delay during an I2C transaction between a bus read and a bus write. If this parameter is set to nil, the I2C will not be enabled and the Arduino I2C pins will have their default function (A4 and A5 will be analog inputs on an Uno). This parameter should be set to an integer (usually 0), if I2C operation is desired.

To successfully install an Arduino as an Arduino Device, the Arduino has to be running the Firmata program. Many Arduinos come with Firmata pre-installed. We support Arduinos running Firmata software version 2.2 or higher. If your Arduino does not come pre-programmed with Firmata code, see our How To Install Firmata page. If you are not sure what is running on your Arduino, try running the Arduino Script. If it runs cleanly, your Arduino is running Firmata.

Note: if your Script does not run cleanly, look at the Console Log. The log may have additional error messages providing clues about what is wrong. If your installation is successful, the log will tell you details about your Arduino, including what version of Firmata is running. If for any reason you are not sure what version of Firmata is running on an Arduino, install the Arduino and check the log.

Note: if you wish to run I2C devices, the Firmata software should be at version 2.3 or higher.

Example

Running the Arduino Script with the parameters listed below will add an Arduino device with the ID "arduino", an analog sampling period of 0.1 seconds, and its I2C bus enabled. The "port_location" value will vary, depending on the system.

id: "arduino"
port_location: "/dev/ttyUSB0"
analog_sample_period_ms: 100
i2c_read_delay_micros: 0

Catalina Computing, LLC.

Copyright © Catalina Computing, LLC. (2013-2018)




Page last updated: Wed Jul 29 17:17:32 2015 (UTC)