Author Topic: No Digispark Programmer  (Read 7417 times)

mohir

  • Newbie
  • *
  • Posts: 8
No Digispark Programmer
« on: December 16, 2016, 04:41:56 am »
Hello,
I am trying to install a digispark Tinny85 on my computer,
i am using Windows 10, Arduino IDE 1.6.12.
Drivers were installed successfully,
also installed the board,
but when i try to upload a program to it as instructed (Tinny disconnected)
i don't get a message to connect it but an error message that there was an error why uploading the sketch.
I don't have for some reason a digispark programmer on the list

Your help would be greatly appreciated.
Mohir


PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #1 on: December 16, 2016, 10:11:47 pm »
Is the Digispark selected as the active board for compiling / programming under Tools -> Board? You won't see it listed under Tools -> Programmer.

Are you able to post a screenshot of the error, or copy the text of the error message when it appears so we have a better idea as to the exact errror?

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #2 on: December 18, 2016, 09:43:30 am »
Yes, the board is selected. Attaching the screenshot.
Thank you

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #3 on: December 19, 2016, 02:35:21 am »
Ok, I think I might know what the problem is now. I first through maybe you had an over-eager antivirus scanner which had deleted the micronucleus uploader executable, but that would give you a completely different error message.

Are you clicking "Upload Using Programmer" rather than just "Upload" (or check you don't have the shift key stuck down on your keyboard when clicking the icon on the toolbar as holding shift when clicking upload changes it to upload using programmer)? As I get the exact error message when I click on that... which is correct, as you don't use a programmer with the digisparks... they have a psuedo-bootloader much like the run-of-the-mill Arduino Uno, Arduino Mega, Teensy, etc. All you do is upload to them, and then plug then in when prompted by the Arduino IDE. You'll then get a message like the screenshot attached.
« Last Edit: December 19, 2016, 02:38:46 am by PeterF »

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #4 on: December 20, 2016, 01:24:23 pm »
Thank you for your reply,
No i do not using "Upload Using Programmer" and my shift key is fine.
what i don't understand is that in the tutorial (http://digistump.com/wiki/digispark/tutorials/connecting)
once they write:
The Tools→Programmer selection does not matter
and later:
Did you set your board AND programmer to Digispark in the Arduino IDE?
and i saw in a video there is a programmer, which i don't have....
so i am still in the dark here


PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #5 on: December 21, 2016, 04:05:58 am »
So have you specifically clicked on Sketch -> Upload, and does it display that same error message? If so, I can't reproduce that behaviour... only when i click on Upload With Programmer, or when I shift+click on the upload icon (which also says Upload With Programmer rather that just Upload).

No. I only set the Board. There is no need for a programmer with the Digisparks. However, if you are working with Attiny MCUs, or Atmega MCUs, or you have a misbehaving Digispark, it is possible to use a ICSP programmer, but that is NOT normal practise for the Digispark.

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #6 on: December 21, 2016, 05:16:01 am »
Yes, it is only Upload......
Thanks for trying....

Really need help here...

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #7 on: December 21, 2016, 08:47:49 pm »
Only other thing I can suggest although it seems like a long shot is there was a known issue with v1.6.10 of the Arduino IDE, which is supposedly fixed, but may still be present in some fashion on v1.6.12? Basically, if you open a sketch by double clicking on it, versus opening the Arduino IDE and then loading the sketch, uploads would fail with that exact same error message.  At point, if it still isn't working, I'd be tempted to go to Tools -> Boards -> Boards Manager and remove and then re-install the "Digistump AVR Boards" package just in case there is something corrupt in the install (you'll have to reselect the Digispark as the active board after doing that). Otherwise, hopefully someone else will have some ideas as to what could be wrong.
« Last Edit: December 21, 2016, 08:50:06 pm by PeterF »

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #8 on: December 25, 2016, 06:01:04 am »
Tried to uninstall and re-install and it didn't help...
also opening the sketch from the IDE..... :(

thanks again for trying to help,
and hopefully some solution will pop up

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #9 on: December 26, 2016, 05:27:09 pm »
No problem. :)

Only other thing I can think to try, which may shed some light into what is happening is to go to File -> Preferences and turn on the verbose upload messages...

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #10 on: December 31, 2016, 07:33:21 am »
Maybe indeed you found something as now the error message is:
Arduino: 1.6.12 (Windows 10), Board: "Digispark (Default - 16.5mhz)"

Sketch uses 700 bytes (11%) of program storage space. Maximum is 6,012 bytes.
Global variables use 9 bytes of dynamic memory.
C:\Users\Michael\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4/launcher -cdigispark --timeout 60 -Uflash:w:C:\Users\Michael\AppData\Local\Temp\arduino_build_839454/Tinny85-test1.ino.hex:i
An error occurred while uploading the sketch
Board at COM10 is not available

hope you can make some sense out of it :)
Thanks again and a happy new year

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #11 on: December 31, 2016, 07:27:24 pm »
Happy new year to you also...  :D

Hm... that still makes me think there is something wrong with the Arduino IDE somewhere... The error isn't due to the launcher or micronucleus being missing, as you'd get completely different error messages then.

Try running a command prompt, and once you'd run another compile, try running the line (which you should be able to copy and paste ) that looks like

Code: [Select]
C:\Users\Michael\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4/launcher -cdigispark --timeout 60 -Uflash:w:C:\Users\Michael\AppData\Local\Temp\arduino_build_839454/Tinny85-test1.ino.hex:i
from the command prompt instead. You'll need the line that the Arduino IDE gives, as the "arduino_build_839454" bit should change every time you reload the Arduino IDE / sketch. Then we might be able to work out if it's the Arduino IDE not co-operating, or something else...?

This is what I got when doing an upload via the Arduino IDE

Code: [Select]
Arduino: 1.6.12 (Windows 10), Board: "Digispark (Default - 16.5mhz)"

Sketch uses 700 bytes (11%) of program storage space. Maximum is 6,012 bytes.
Global variables use 9 bytes of dynamic memory.
C:\Users\Peter\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4/launcher -cdigispark --timeout 60 -Uflash:w:C:\Users\Peter\AppData\Local\Temp\arduino_build_843986/Tinny85-test1.ino.hex:i
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.3
> Device signature: 0x1e930b
> Available space for user applications: 6522 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 102  page size: 64
> Erase function sleep duration: 714ms
parsing: 50% complete
> Erasing the memory ...
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload ...
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app ...
running: 100% complete
>> Micronucleus done. Thank you!

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #12 on: January 04, 2017, 06:01:11 am »
When i run it from command line as you suggest,
no error message, and no any other message
just returns to the prompt.
but i found a directory in the local/temp/arduinobuilt.........

PeterF

  • Hero Member
  • *****
  • Posts: 881
Re: No Digispark Programmer
« Reply #13 on: January 04, 2017, 04:22:54 pm »
Have a look in the "C:\Users\Michael\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4/" folder... are launcher and micronucleus both present there (plus a bunch of other files)? Maybe try navigating to that folder in the command prompt (cd "C:\Users\Michael\AppData\Local\Arduino15\packages\digistump\tools\micronucleus\2.0a4/") and then running launcher and micronucleus and seeing what happens?

mohir

  • Newbie
  • *
  • Posts: 8
Re: No Digispark Programmer
« Reply #14 on: January 07, 2017, 05:31:41 am »
The folder look fine,
but i tried to run the install.exe again got some kind of an error,
attaching the screenshot
maybe this is the problem?