Arduino: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
Installing the Arduino IDE on OLPC OS.
Installing the Arduino IDE on OLPC OS.


== 13.2.0 ==
== Ingredients ==
* an XO laptop with OLPC OS [[13.2.0]] already installed,
* access to internet,


== Recipe ==
Switch to the Gnome desktop. This is because the application has been tested with Gnome, and not with Sugar.
* switch to the Gnome desktop, as the software works best in Gnome,

* start the Terminal application, and type this:
=== Packages ===
:<pre> sudo yum install -y arduino</pre>

* wait for the download to finish, it should need roughly 61 MB,
In Terminal, type this:
* start Applications -> Programming -> Arduino,

sudo yum install -y arduino

Roughly 61 MB of lists and packages are downloaded and installed.

=== Choose a larger font ===

The default font is very small on the XO laptop, to fix it:

* Applications -> Programming -> Arduino,
* File -> Preferences,
* Editor font size to 18, OK,
* Quit and restart Arduino.

== 12.1.0 ==

As above for [[#13.2.0]] but before starting Arduino you must fix a problem. 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, type this:
sudo groupmems --group lock --add olpc && \
sudo systemctl restart prefdm.service


== Testing ==
== Testing ==


* start Applications -> Programming -> Arduino,
* connect Arduino board,
* connect Arduino board,
* choose Tools -> Board entry, e.g. Arduino Uno,
* choose Tools -> Board entry, e.g. Arduino Uno,
Line 52: Line 33:
Alternatively, StandardFirmata may be uploaded without using the Arduino IDE, see [[ProtoSnap_Contributors_Guide/Upload|How to upload StandardFirmata using ino]]. The download size is much smaller (18MB), but the steps required are more complex.
Alternatively, StandardFirmata may be uploaded without using the Arduino IDE, see [[ProtoSnap_Contributors_Guide/Upload|How to upload StandardFirmata using ino]]. The download size is much smaller (18MB), but the steps required are more complex.


== Choose a larger font ==
==See also==
[[XO Stick]]


The default font is very small on the XO laptop, to fix it:
[[XOrduino]]


* Applications -> Programming -> Arduino,
[[XO_Stick/Bootloader]]
* File -> Preferences,
* Editor font size to 18, OK,
* Quit and restart Arduino.


== 12.1.0 ==
[[XOrduino/bootloader]]


Follow the [[#Ingredients|instructions above]], but before starting Arduino add the ''olpc'' user to 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 -->
[[ProtoSnap_Contributors_Guide|How to use TurtleBots with the SparkFun ProtoSnap - Pro Mini]]

In Terminal, type this:
sudo groupmems --group lock --add olpc && \
sudo systemctl restart prefdm.service

==See also==
* [[XO Stick]]
* [[XOrduino]]
* [[XO_Stick/Bootloader]]
* [[XOrduino/bootloader]]
* [[ProtoSnap_Contributors_Guide|How to use TurtleBots with the SparkFun ProtoSnap - Pro Mini]]


== References ==
== References ==

Revision as of 07:51, 19 November 2013

Installing the Arduino IDE on OLPC OS.

Ingredients

  • an XO laptop with OLPC OS 13.2.0 already installed,
  • access to internet,

Recipe

  • switch to the Gnome desktop, as the software works best in Gnome,
  • start the Terminal application, and type this:
 sudo yum install -y arduino
  • wait for the download to finish, it should need roughly 61 MB,
  • start Applications -> Programming -> Arduino,

Testing

  • 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, and can use an Arduino board as a general purpose analog and digital I/O interface.

The StandardFirmata may be uploaded to an Arduino board, 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.

Alternatively, StandardFirmata may be uploaded without using the Arduino IDE, see How to upload StandardFirmata using ino. The download size is much smaller (18MB), but the steps required are more complex.

Choose a larger font

The default font is very small on the XO laptop, to fix it:

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

12.1.0

Follow the instructions above, but before starting Arduino add the olpc user to the lock group. See also <trac>11972</trac>. This fix also restarts Gnome, so that the membership change is effective.

In Terminal, type this:

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

See also

References