Arduino: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 3: Line 3:
== 12.1.0 ==
== 12.1.0 ==


Switch to the GNOME desktop.
Switch to the GNOME desktop. This is because the application has been tested with GNOME, and not with Sugar.


=== Packages ===
=== Packages ===
Line 15: Line 15:
=== Fix Access ===
=== Fix Access ===


The IDE requires that the user be a member of the ''lock'' group. See also <trac>11972</trac>. This also restarts GNOME.
The IDE requires that the user be a member of the ''lock'' group. See also <trac>11972</trac>.

This fix also restarts GNOME, so that the membership change is effective. <!-- todo: test to see if this is actually necessary -->


In Terminal:
In Terminal:

Revision as of 23:48, 27 June 2012

Installing the Arduino IDE on OLPC OS.

12.1.0

Switch to the GNOME desktop. This is because the application has been tested with GNOME, and not with Sugar.

Packages

In Terminal:

sudo yum install -y arduino

Roughly 40 MB of packages are downloaded and installed.

Fix Access

The IDE requires that the user be a member of the lock group. See also <trac>11972</trac>.

This fix also restarts GNOME, so that the membership change is effective.

In Terminal:

sudo groupmems --group lock --add olpc && \
   sudo systemctl restart prefdm.service

Choose a larger font

The default font is small.

  • Applications -> Programming -> Arduino,
  • File -> Preferences,
  • Editor font size to 18, OK.

Testing

  • start Applications -> Programming -> Arduino,
  • connect Arduino board,
  • choose Tools -> Board entry, e.g. Arduino Uno,
  • choose Tools -> Serial Port entry, e.g. /dev/ttyACM0,
  • choose File -> Examples -> Basics -> Blink,
  • choose Upload to send the program to the Arduino board,
  • see LED flashing.

Firmata

Firmata is a generic protocol for a computer to communicate with microcontrollers. The Sugar Labs Turtle Art activity included in OLPC OS builds supports Firmata 2.1 or later, and can use an Arduino board as a general purpose analog and digital I/O interface.

The Arduino board must be programmed with StandardFirmata, using the Arduino IDE:

  • start Applications -> Programming -> Arduino,
  • connect Arduino board,
  • choose File -> Examples -> Firmata > StandardFirmata,
  • choose Upload to send the program to the Arduino board.

References