Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: digistump on December 19, 2012, 12:11:38 pm

Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 12:11:38 pm
This thread might be useful in the future so moved to support section...
Title: Getting started with your Digispark!
Post by: shawn on December 19, 2012, 12:34:35 pm
The Arduino IDE i downloaded from the link in http://digistump.com/wiki/digispark/tutorials/connecting doesn\'t prompt me to connect the digispark after uploading using the \'start\' example. I have the board set to Digispark (MIT High-Low  method) and the programmer set to Digispark.
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 05:00:20 pm
Shawn - that\'s strange - Win or Mac?
What does it say in the bottom black box with orange text after you hit upload?
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 05:21:11 pm
If this was on windows I have been able to duplicate the issue on one of my older machines (the shipping computer actually) - I\'m working on it now and will post a fix soon. Thanks for your patience!
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 06:13:17 pm
Here is the immediate fix for this windows issue:

Grab this: https://s3.amazonaws.com/digispark/avrdude.exe
Copy and overwrite the existing version in the arduino directory/hardware/tools/avr/bin/

I\'m uploading a whole new IDE download now, it will be available shortly.

This only involves windows machines.
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 06:57:40 pm
@everyone
The new version with the fix integrated is up: http://digistump.com/wiki/digispark/tutorials/connecting

If you downloaded before 7PM PST on the 19th upgrade, if you downloaded after that this bug should not be an issue.
Title: Getting started with your Digispark!
Post by: canniscam on December 19, 2012, 07:57:19 pm
Erik,

Thanks for the update .. I though I was going crazy with this one.. either that or it was was a Windows 8 error.  I was going to drive to my lab and randomly plug digisparks into machines with different versions of windows.

Thanks,
Casey
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 08:17:44 pm
we forgot to static link some libraries - that was the issue, and the arduino IDE doesn\'t pass errors through - glad it worked!
Title: Getting started with your Digispark!
Post by: dmcinnes on December 19, 2012, 10:11:51 pm
I\'m having a similar problem with the OS X client:

Binary sketch size: 818 bytes (of a 6,041 byte maximum)
Running Digispark Uploader...
Plug in device now...
dyld: Library not loaded: /opt/local/lib/libusb-0.1.4.dylib
  Referenced from: /Applications/Digispark-Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/micronucleus
  Reason: image not found
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 10:18:07 pm
dmcinnes - have you ever used Ardino on the machine with regular arduino boards?
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 10:19:57 pm
Also what version of os x?
Title: Getting started with your Digispark!
Post by: dmcinnes on December 19, 2012, 10:43:28 pm
I\'m on 10.7.5 -- I don\'t have an /opt directory, looks like you guys are dynamically loading a macports installed libusb?
I have used the Arduino software before, but the older version (1.0.1) for programming ATtiny85 chips with this library:
http://hlt.media.mit.edu/?p=1695
Title: Getting started with your Digispark!
Post by: digistump on December 19, 2012, 11:11:00 pm
you are correct it was dynamically linked - I\'m going to reboot into os x in a few and create a static linked version
I\'ll upload it here and let you know as soon as it is ready.
Title: Getting started with your Digispark!
Post by: digistump on December 20, 2012, 01:31:03 am
@dmcinnes - check out the latest build at digistump.com/wiki under connecting your digispark - let me know if it works - thanks!
Title: Getting started with your Digispark!
Post by: canniscam on December 20, 2012, 05:41:34 am
Erik,

Are you keeping a changelog on the the IDE uploads?  

Casey
Title: Getting started with your Digispark!
Post by: shawn on December 20, 2012, 05:56:38 am
Thanks for the fix, that was exactly my problem. Sorry I couldn\'t respond sooner with the fact that it was Windows. Everything works perfectly now.
Title: Getting started with your Digispark!
Post by: dmcinnes on December 20, 2012, 09:21:15 am
digistump: I\'m getting this error now:
Binary sketch size: 818 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
sh: /Applications/Digispark: No such file or directory

Title: Getting started with your Digispark!
Post by: digistump on December 20, 2012, 11:06:42 am
New build going up now - that I *hope* should finally fix this one, to be honest and it\'s probably obvious OS X is not my area of expertise, but at least I have a os x machine to replicate issues on. This issue had to do with spaces in the path, but after fixing it I discovered several more and addressed them as well.

This all tests out as working on my OS X 10.7 late 2011 Mac Mini with i7 with every test I could come up with this time.

Luckily only the uploader and avrdude-dummy-router get compiled, so once those work we should be set for cross compatability

Thanks for your patience - new build will be on the wiki in about 5 min
Title: Getting started with your Digispark!
Post by: digistump on December 20, 2012, 11:07:27 am
@Casey - see the change log topic on this forum
Title: Getting started with your Digispark!
Post by: dmcinnes on December 20, 2012, 04:52:25 pm
@digistump awesome, it works! Thanks so much! I know you\'re crazy busy with shipping
Title: Getting started with your Digispark!
Post by: Bluebie on December 20, 2012, 06:24:14 pm
Could we get some example code for how to talk to DigiUSB from the computer side? I couldn\'t find any. :)
Title: Getting started with your Digispark!
Post by: Bluebie on December 20, 2012, 11:57:53 pm
You know what? Don\'t worry about it. Here\'s a thing: http://rubygems.org/gems/digiusb

It\'s a digispark terminal gadget, for talking to DigiUSB! You\'ll need ruby 1.9.3 and libusb 1.x installed (on a mac, do it with homebrew!) then you can gem install digiusb, and you\'ll have a digiterm program you can use to basically telnet in to the spark and have a bit of a chat, rather a lot like the serial console in the arduino program, except, you know, working..

It\'s also a neat little ruby library you can use to talk to the digispark in your programs - get and put characters and strings. Neat eh? I\'ve only tested it on my mac, but it should be trivial to install on linux. For windows, I have no idea, so good luck with that!

https://github.com/Bluebie/digiusb.rb for source code and to see examples. Maybe I\'ll put some comments in the code later so it generates some real docs, but I think it\'s pretty straight forward - works a lot like a file, except you do a DigiUSB.sparks.last to grab a reference to the most recently plugged in one, instead of a File.open(...)

Don\'t know ruby? Maybe you should. It\'s a pretty keen language. ^_^
Title: Getting started with your Digispark!
Post by: Bluebie on December 20, 2012, 11:59:53 pm
P.S. it seems to anger the micronucleus gods if you have both the arduino program waiting for your digispark to get plugged in, and digiterm also waiting. Maybe they fight or something? I have no idea!
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 12:04:50 am
Awesome, thanks - it should work for windows too, just use the RubyInstaller and then install the Gem.

Here is the python that goes with the DigiBlink example - we\'ll have some binaries of it available soon: http://cl.ly/300y3k1q0e0R/DigiBlink.zip
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 12:06:57 am
While I\'m at it - here is a binary (very beta) for windows to connect a Digispark to CheerLights (cheerlights.com) - load the DigiBlink sketch onto the Digispark, plug in an RGB shield, and run this program - it will be in your tray: http://cl.ly/300y3k1q0e0R/DigiBlink.zip
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 06:46:25 am
How can I tell if the Windows driver is working correctly?
Title: Getting started with your Digispark!
Post by: JeffRand on December 21, 2012, 06:53:33 am
@Sturgeon I would say if you can successfully upload the start example, it is working correctly. Are you having any specific issues?
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 07:16:47 am
OK, I see the Windows device manager sees the digispark.  The issue is that the example does not load.  The IDE (Arduino 1.0.3) just sit there waiting to upload.  Should it be trying to connect to COM1?
Title: Getting started with your Digispark!
Post by: JeffRand on December 21, 2012, 08:28:26 am
It will say \"Digispark (TinyCore) on COM1\" in the lower right corner. But when you press the Upload button, you should see the following:

Binary sketch size: 756 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...

Edit: I thought there are a problem with the bottom Digispark, in the programmer list but it doesn\'t seem to matter which I pick now.

Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 08:59:11 am
Thanks Jeff,  That is as far as I get. I now think that Windows 7 does not recognize the spark. I get an pop-up error message \"USB Device Not Recognized\" in the bottom right and I also see the device manager say \"Unknown Device\". Moments later all the messages are gone and I do not see the Spark.   Should the Spark show in the Device manager? Or is it there as the boot loader runs?

Thanks!!
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 10:38:26 am
Sturgeon:

Things to confirm:
Digispark is selected both as Board and Programmer.

You\'ve run the InstallDriver.exe file in the Windows Driver folder and this brought up a dialog that at the end told you the Digispark Bootloader was ready to use. See the attachment for what this should look like.

You are connecting the Digispark directly to the USB port - after it prompts you to \"Plug in device now...\"

If you are using a cable, try plugging directly in. If you are using a hub, try plugging directly in. If you are plugging directly in try it with a hub if you have one.

The DIgispark likely own\'t show in device manager since it is only active for 5 seconds, but you can try opening device manager and plugging it in while watching to see if it shows up.

The message you are getting about USB Device Not Recognized suggests that the Digispark may be having issues connecting to your computer or your computer recognizing it, this suggests a bad cable, a bad hub, an unusually low USB port voltage, etc - try the suggestions about ports and cables above.


Let me know if any of this helps. Do you have more than one Digispark? If so, try with a couple as there is always the possibly of the rare faulty Digispark.


Thanks!
Erik
Title: Getting started with your Digispark!
Post by: LenLarson on December 21, 2012, 10:42:55 am
Ok, I downloaded the IDE on my Mac OSX 10.8.2
After I expand it using the Archive utility I get a 200MB Arduino IDE file, but when I click on it I get this error: “Digispark Ready - Arduino 1.03” is damaged and can’t be opened. You should move it to the Trash.
Any ideas?
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 10:49:34 am
LenLarson - I\'d give the download another shot - I\'ll hop over to OS X now and double check that it\'s good.
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 11:00:11 am
Len - just switched over to OSX did a fresh download from the link on the wiki, unzipped and it worked. - Please try downloading again and let me know if it works.
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 11:10:40 am
Erik:

Things confirmed:
1) Digispark is selected to Board(Tiny Core) and Programmer.
2) InstallDriver.exe installed with no errors.
3) Connect to USB 2.0 port (Windows response \"device not recognized\"  ) / Connected to USB keyboard hub  (no response from windows) / Connected to USB 3 (no response from windows)
4) I tried a second Digispark and got the same results.

I\'m going to try an older PC with USB 1.0.

Thanks!
Joe
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 11:22:18 am
@Joe

Laptop or Desktop?
It works for me on USB 2.0 ports - works on my 3.0 ports too on one computer but not the other, generally incompatibility with hardware has to do with a cheapo, not quite to spec, usb controller - but so far I have only seen that in cheapo hubs (though most cheap hubs work just fine).

If you have a hub I\'d try that, and trying on other machines is certainly a good idea. If we can establish that it works for you on something, then we can take it from there and see if we can\'t get it to work on your main machine.

Thanks,
Erik
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 11:23:48 am
I missed that you did try it on a hub -- perhaps my luck with hubs has been that they are either powered or on a very short cord....
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 12:02:57 pm
Erik,

The Desktop I\'m using is a Dell XPS 8300 with one or two Intel i7-2600 CPU\'s at 3.40Ghz.  All the equipment accessory (keybaord/mouse/hub) is from Dell.  

I\'ll keep you posted !!

Thanks,

Joe
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 02:23:47 pm
Erik,

Using a Dell OPTIPLEX 745 I got the following errors.  Progress!!! Any Clue?

Thanks again,
Joe

LOG

Binary sketch size: 756 bytes (of a 6,010 byte maximum)
Running Digispark Uploader...
Plug in device now...
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 20% complete
connecting: 23% complete
connecting: 27% complete
connecting: 30% complete
connecting: 34% complete
connecting: 40% complete
> Device looks like ATtiny85!
> Available space for user application: 6010 bytes
> Suggested sleep time between sending pages: 8ms
> Whole page count: 94
> Erase function sleep duration: 752ms
parsing: 40% complete
parsing: 60% complete
> Erasing the memory ...
erasing: 60% complete
.
.
.
erasing: 79% complete
>> Eep! Connection to device lost during erase! Not to worry
>> This happens on some computers - reconnecting...
>> Reconnected! Continuing upload sequence...
erasing: 80% complete
> Starting to upload ...
writing: 80% complete
.
.
.
writing: 82% complete
>> Abort mission! An error has occured ...
>> Please unplug the device and restart the program.
Title: Getting started with your Digispark!
Post by: Bluebie on December 21, 2012, 02:28:15 pm
Do you always get an error exactly like this one, or does it sometimes work and sometimes not? When it fails does it always fail at 82% complete?
Title: Getting started with your Digispark!
Post by: Bluebie on December 21, 2012, 02:30:25 pm
Also are you running Windows, Linux, or OS X on your optiplex? What is the CPU speed?
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 02:49:22 pm
Hi There,
I\'m running Windows 8 on the  Dell OPTIPLEX 745.  

Good news, the second Digispark uploads with no issue every time.  The first Digispark,  uploaded only once after 7 attempts.  The errors are always the same.  Do I have one bad Digispark?

Joe  
Title: Getting started with your Digispark!
Post by: Bluebie on December 21, 2012, 03:19:36 pm
Okay, it\'s a voltage conversion problem. This is a fairly common problem with V-USB designs using zenner diodes to limit their voltage levels.

@digistump The nightmare begins? :P

Sounds like maybe something\'s not soldered on well enough (one of the three resistors, or one of the two zenner diodes connecting to the D+ and D- middle two wires on the usb connector). If they\'re soldered on well and it still doesn\'t work, perhaps one of the resistors or zenner diodes is outside the tolerances required by your usb ports.

I\'ll leave it to @digistump to figure out how to fix this. If you\'re bored and have some little blue or white LEDs laying around you could try connecting them between each of the two middle USB wires and ground on the USB connector (not the headers on the digispark) without any resistors. They\'ll light up and blink a bunch on USB activity and might help keep voltages within spec, but they could just as easily make things even less reliable. V-USB stuff is a pain to get right.
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 05:38:13 pm
Hello Bluebie,  

I\'m back from dinner.  Anyway, the second Digispark has no issues!!!   I\'m going to wait for @digistamp before I start hacking at the first unit.

Thanks!!  
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 06:10:55 pm
@Sturgeon - how about we send you a replacement and a prepaid envelope to send us the faulty one back? Send me an email at ekettenburg at digistump dot com

Since it is the first reported fault I\'d like to check it and make sure that it truly is faulty.

With 40k of them being produced we expect some to be faulty and our factory will replace any we return, not really worth it once we pay postage but we want to make sure the ones being made right now are done right.

@Bluebie is correct that V-USB devices are a bit delicate, but we\'ve made Digisparks with very precise components - 1% resistors, only one brand of zener diode - so we feel they should work on 90%+ of machines and in our experience so far, a properly built one works on every test machine we have. That said, sometimes these components are out of tolerance and the factory only checks 10% of incoming components - so it is entirely possible that a bad component or solder joint caused it. Our test jigs used at the factory check for mistakes but they wouldn\'t necessarily catch something just out of tolerance.

One other questions- did the second one work on the XPS too? If so then I\'d bet good money the first one just has a faulty part on it.
Title: Getting started with your Digispark!
Post by: digistump on December 21, 2012, 06:12:18 pm
Oh if it wasn\'t clear - I dont\' want to check it because I doubt your diagnosis in anyway - I just want to check to see if it is faulty or if there is something going wrong at the factory.

Also if it wasn\'t clear, I\'ll send you a new one as soon as I get an email from you - not after you send the old one back.
Title: Getting started with your Digispark!
Post by: Sturgeon on December 21, 2012, 07:12:36 pm
Erik,

I truthfully did not check every USB port on the XPS with the second Digispark.  I only checked the ports on the front of the XPS and it did not work.  Next Wednesday I\'ll check the rear USB ports.  

That said, on the OPTIPLEX 745,  the second Digispark DOES NOT WORK on the port on the front of the OPTIPLEX 745.  The front USB ports are on a daughter card.  The second Digispark will only work with the ports on the back (USB PORTS ON THE MOTHER BOARD).  

Hope this helps and thanks,

Joe
Title: Getting started with your Digispark!
Post by: LenLarson on December 22, 2012, 11:21:24 am
OK, my problem turned out to be a permissions error. I went into System Prefs and set it  to allow code from anyone not just from the App store and known developers.
I started up the IDE and got it to the point where it asks me to plug in the Digispark, so I should be ready. I\'m watching for the mailman as I type!
Title: Getting started with your Digispark!
Post by: digistump on December 22, 2012, 09:18:42 pm
@Sturgeon - sounds like Dell cheaped out on the front ports, most likely by using very high gauge wire to connect them or something like that.

@Len - sounds good, I didn\'t even think of that since I probably set that option when I first got my mac. I\'ll add it to the Mac install guide, thanks for reporting back!
Title: Getting started with your Digispark!
Post by: ramos96 on December 26, 2012, 08:09:44 am
Just to help verify, tested successfully on a MacPro (retina display) and inside of a VMWare Windows 7 Ultimate 32bit image.

Neither OS would see the digispark on a direct insertion into the USB ports, a USB hub (non-powered) was necessary.

Humbly,
Roo
Title: Getting started with your Digispark!
Post by: jimkirk on December 26, 2012, 08:56:29 am
Another MacBookPro with retina display owner here.  Doesn\'t see the Digispark unless I use a cheap non-powered USB hub.  I don\'t think it\'s even USB 2, just \"full bandwidth\" USB 1)  (It also caused my notebook to freeze up for several seconds every minute or so until I restarted it.  Using the hub seems to have fixed that as well.)
Title: Getting started with your Digispark!
Post by: digistump on December 26, 2012, 03:46:40 pm
@ramos96 and @jimkirk - I have to admit I did not test on a retina macbookpro (though we tested on other MBPs) - we\'ll try to figure out this issue for future versions, I\'m glad you were both able to get it to work though!
Title: Getting started with your Digispark!
Post by: Bluebie on December 27, 2012, 04:36:30 pm
Probably worth investigating signing the digispark upload binaries (fake avrdude and micronucleus) with one of the supposedly free mac developer certificates
Title: Getting started with your Digispark!
Post by: Hatchman on December 29, 2012, 02:27:12 pm
Retina Macbook pro user here - same issues as others before me. digispark is not recognized by computer during upload - it asks me to connect and the digispark seems to run the default code it shipped with. Tried multiple digs - I have 3 to no avail. I dont have a hub - cleaned out junk parts I never thought I would need recently. Going to try my luck on a dusty old EEEpc netbook just for this haha
Title: Getting started with your Digispark!
Post by: digistump on December 29, 2012, 06:50:31 pm
@Hatchman - this seems to be an issue with all Retina MBPs, I apologize that we were not aware of it previously - a hub or another machine is the best bet, we\'ll work on compatibility with Retina MBPs for the next revision.
Title: Getting started with your Digispark!
Post by: Bluebie on December 30, 2012, 02:30:59 am
... you know the retina macbook pro has USB 3 ports? USB 3 on macs is a fairly new development. That might have something to do with it?
Title: Getting started with your Digispark!
Post by: buffington on December 30, 2012, 07:10:21 pm
My retina MBP seems to have similar issues as reported by others. When using a Cinema Display\'s USB ports there are no issues. But using the USB 3 ports causes the machine (or at least mouse and keyboard input) to freeze up until the Digispark is unplugged.

It only seems to happen when you\'ve just done an upload. If, after uploading, you unplug the Digispark and plug it back in, the hangups don\'t occur.
Title: Getting started with your Digispark!
Post by: digistump on December 30, 2012, 07:23:00 pm
@buffington that\'s interesting, it seems for most people they won\'t even register or upload.

For all Retina MBP issues I\'ve started a dedicated thread: http://digistump.com/board/index.php?p=/discussion/118/retina-mbp-issues

@bluebie - I think you are right, I see references to other devices not being as backward compatible as they should be and I\'m also wondering if the plug differences and the Digispark\'s not quite spec plug has something to do with it, I have a computer with a few USB 3.0 ports on it and will do some testing ASAP.
Title: Getting started with your Digispark!
Post by: Bluebie on December 31, 2012, 07:54:41 am
I\'ve experienced hiccups when the digispark (at least, my clones..) is connected via USB and is using the USB wires to do non-usb stuff, driving LEDs and things like that. Unusual electrical activity on one of the USB ports on my macbook air (regular 2.0 ports) seemed to shock the hub managing that port and the trackpad and keyboard and cause it to freeze for a little while. Usually it\'d all come good after a second or so of clicking the trackpad in.

When not using the digispark\'s usb wires or using them for usb things I didn\'t really get the freezing issue IIRC.
Title: Getting started with your Digispark!
Post by: digistump on January 05, 2013, 12:42:02 am
Folks - this info is largely outdated and new issues should be created under Digispark Support section - any non-outdated info from this should now be in the wiki as well - so I\'m closing this thread for neatness.