Platforms

Artoo has a extensible system for connecting to hardware devices.

Digispark


Repository Issues

The Digispark is an Attiny85 based microcontroller development board similar to the Arduino line, only cheaper, smaller, and a bit less powerful. With a whole host of shields to extend its functionality and the ability to use the familiar Arduino IDE the Digispark is a great way to jump into electronics, or perfect for when an Arduino is too big or too much.

+ info about the Digispark platform click here

How To Install

Install the Artoo module providing Digispark support through RubyGems:

$ gem install artoo-digispark

How To Use

This small program lets you toggle an LED on and off.

require 'artoo'

connection :digispark, :adaptor => :littlewire, :vendor => 0x1781, :product => 0x0c9f

device :board, :driver => :device_info
device :led, :driver => :led, :pin => 1

work do
  puts "Firmware name: #{board.firmware_name}"
  puts "Firmware version: #{board.version}"

  every 1.second do
    led.toggle
  end
end

How To Connect

It is very easy to setup and connect to the Digispark using Artoo CLI commands.

Connecting to the Digispark (Kickstarter Campaign).

ATTiny-based USB development board is very easy using Artoo.

First we need to install the Littlewire protocol to communicate with the digispark. Artoo includes CLI commands to make the process of uploading Littlewire to the Digispark as simple as possible. After littlewire has been uploaded you can connect and communicate using Artoo.

OSX

The main steps are:

  • Install the artoo-digispark gem
  • Upload the Littlewire protocol to the digispark
  • Connect to the device via Artoo

DO NOT plug in the Digispark to your computer's USB port until prompted.

Install the artoo-digispark gem:

$ gem install artoo-digispark

After installing the artoo-digispark gem, run the following Gort command to upload littlewire to the digispark. Plug it to a USB port when prompted:

$ gort littlewire upload

Once plugged in, use the gort scan usb command to verify your connection info:

$ gort scan usb

Now use the ID info returned to find the product and vendor ID's required to establish a connection with the Digispark in your Artoo code.

That is it, you are set to start running Artoo digispark examples.

Ubuntu

The main steps are:

  • Install the artoo-digispark gem
  • Add a udev rule to allow access to the Digispark device (Do not worry about this, the gort littlewire upload command does it for you if none is detected)
  • Upload the Littlewire protocol to the digispark
  • Connect to the device via Artoo

DO NOT plug in the Digispark to your computer's USB port until prompted.

Install the artoo-digispark gem:

$ gem install artoo-digispark

After installing the artoo-digispark gem run the following command to upload littlewire to the digispark.

Do NOT plug it to a USB port until prompted.

You might be asked to enter your sudo password, since uploading littlewire to the digispark requires some new udev rules. You can check and review them in /etc/udev/rules.d/49-micronucleus.rules after running the gort littlewire upload command.

$ gort littlewire upload

Once plugged in, use the gort scan usb command to verify your connection info:

$ gort scan usb

Now use the ID info returned to find the product and vendor ID's required to establish a connection with the Digispark in your Artoo code.

That is it, you are set to start running Artoo digispark examples.

Thanks to @bluebie for the help with udev rules used when uploading littlewire to the digispark!

https://github.com/Bluebie/micronucleus-t85/wiki/Ubuntu-Linux

Windows

We are currently working with the Celluloid team to add Windows support. Please check back soon!

Available drivers for the digispark platform are listed below, the drivers contain detailed documentation and examples of what kind physical computing (using artoo and ruby) you could be doing:

GPIO Drivers

I2C Drivers