Home

Awesome

Artoo Adaptor For Digispark

This repository contains the Artoo (http://artoo.io/) adaptor for the Digispark (http://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board) ATTiny-based USB development board with the Little Wire (http://littlewire.cc/) protocol firmware installed.

Artoo is a open source micro-framework for robotics using Ruby.

For more information abut Artoo, check out our repo at https://github.com/hybridgroup/artoo

Code Climate Build Status

This gem makes extensive use of the littlewire.rb gem (https://github.com/Bluebie/littlewire.rb) thanks to @Bluebie

Installing

gem install artoo-digispark

Using

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

Devices supported

The following hardware devices have driver support, via the artoo-gpio gem:

The following hardware devices have driver support, via the artoo-i2c gem:

Connecting to Digispark

Connecting to the Digispark (http://www.kickstarter.com/projects/digistump/digispark-the-tiny-arduino-enabled-usb-dev-board) ATTiny-based USB development board is very easy using Artoo, first we need to install the littlewire (http://littlewire.cc/) 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:

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, plug it to a USB port when prompted:

$ artoo littlewire upload

Once plugged in, use the artoo connect scan command with the -t usb option to verify your connection info:

$ artoo connect scan -t 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:

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, plug it to a USB port when 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 artoo littlewire upload command):

$ artoo littlewire upload

Once plugged in, use the artoo connect scan command with the -t usb option to verify your connection info:

$ artoo connect scan -t 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!

Documentation

Check out our documentation for lots of information about how to use Artoo.

IRC

Need more help? Just want to say "Hello"? Come visit us on IRC freenode #artoo

Contributing

(c) 2012-2014 The Hybrid Group