Author Topic: DigiBlink example - how to talk to it?  (Read 5942 times)

EmbeddedMan

  • Newbie
  • *
  • Posts: 1
DigiBlink example - how to talk to it?
« on: December 21, 2012, 08:20:46 am »
Got my DSs in the mail yesterday, and I absolutely LOVE them. Wow. So many cool things can be done with this tiny board. First things first though - I complied and downloaded the DigiBlink example, but how do I talk to it on the PC side? Is there a PC app for it? It enumerates as a generic HID device, correct?

*Brian
« Last Edit: December 21, 2012, 08:20:46 am by EmbeddedMan »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
DigiBlink example - how to talk to it?
« Reply #1 on: December 21, 2012, 10:40:33 am »
Some official command line programs will be out for it soon - in the mean time:

Here is some python to control it: http://cl.ly/300y3k1q0e0R/DigiBlink.zip

Here is an app that connects it to the cheerlights.com project: http://cl.ly/1S0x3q2H1B0X/DigiBilnk-CheerLights.zip

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
DigiBlink example - how to talk to it?
« Reply #2 on: December 21, 2012, 02:36:33 pm »
If you\'re a ruby programmer, or interested in learning, you might like to try out the digiusb rubygem: http://rubygems.org/gems/digiusb - it also installs a command line program called \'digiterm\' which works a bit like the serial console in arduino, displaying any strings the digispark writes out and letting you type messages back to it

metoo

  • Newbie
  • *
  • Posts: 1
DigiBlink example - how to talk to it?
« Reply #3 on: January 15, 2013, 12:49:14 pm »
Just got my digisparks. AWESOME!!! Anyways I\'m trying to get this DigiBlink example to work. I have downloaded the DigiBlink.zip, installed python, and ran it. To my un-surprise it didn\'t work. I\'m chalking this up to me being a c# developer and never having used python. I\'m getting two errors a general syntax error and a \'usb\' module not found error. I have a feeling my problem lies in where I am running the DigiRGB.py script from.  Also I am running this on windows. So if anyone could help this python noob I would greatly appreciate it.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
DigiBlink example - how to talk to it?
« Reply #4 on: January 15, 2013, 01:34:05 pm »
metoo - try the DigiBlink program in the main Digispark Arduino IDE download, it is in the Digispark - Example Programs folder.

RussNelson

  • Newbie
  • *
  • Posts: 23
DigiBlink example - how to talk to it?
« Reply #5 on: January 15, 2013, 04:01:50 pm »
I got this to work under Ubuntu. The program compiled just fine once I got the development environment fixed. Then, to get the Python program working, I had to install PyUSB version 1.0 (using Python\'s setup.py -- the python-usb package in Ubuntu is 0.4)
sudo apt-get install libusb
git clone https://github.com/walac/pyusb.git
cd pyusb; sudo python setup.py install
The code still needs webcolors, and it seems not to be an Ubuntu package, so:
sudo easy_install webcolors
And finally, you\'ll need to create a 90-digispark.rules which looks like this:
SUBSYSTEMS==\"usb\", ATTRS{idVendor}==\"16c0\", ATTRS{idProduct}==\"05df\", GROUP=\"adm\"
and put it into /etc/udev/rules.d (as root, of course). You should be in the \'adm\' group already on a single-user Ubuntu machine, but check that using groups.
« Last Edit: January 15, 2013, 04:03:24 pm by RussNelson »