Does it work with digispark? (attiny85 arduino board)

1,602 views
Skip to first unread message

CANE LUPO

unread,
Jun 17, 2016, 9:11:50 PM6/17/16
to DroidScript
Hello,

I wonder if droidscript could be interfaced with digispark (original) which happen to be this beauty:

I got this question because I don't deeply understand how USBserial control works, and I know the device uses some software (digiUSB / digiCDC) to be identified by arduino IDE. It also appears as /dev/tty/ACM0 instead of the common /dev/tty/USB0 under the device manager.

I would like to understand if (on a smaller scale) a project like the following would be feasable using digispark instead of arduino uno.

http://www.instructables.com/id/Yarcow-Yet-Another-Rover-Controlled-Over-Wifi-Make/?ALLSTEPS

CANE LUPO

unread,
Jun 17, 2016, 9:46:43 PM6/17/16
to DroidScript
I add also the following link to better clarify
https://digistump.com/wiki/digispark/tutorials/digicdc

Dave Smart

unread,
Jun 18, 2016, 6:08:47 AM6/18/16
to DroidScript
Hi Cane,

According to that link you posted the DigiSpark will appear as a standard CDC device, which means that it should work with DroidScript fine, but we may need to add the vendor ID to DroidScript and give you an alpha release.  If you plug it into windows first and look in device manager you will be able to find the vendor id and product id.

Regards
David

CANE LUPO

unread,
Jun 18, 2016, 3:10:10 PM6/18/16
to DroidScript
Hello and thanks for your fast reply.

For the first 5 seconds (read more on this here https://digistump.com/board/index.php?topic=1675.0)

VID = 0x16D0
PID = 0x0753

then

VID = 0x16C0
PID = 0x05DF

also I found the following interesting scheme

PID dec (hex) | VID dec (hex) | Description of use
==============+===============+===================
1500 (0x05dc) | 5824 (0x16c0) | For Vendor Class devices with libusb
-------------------+-------------------+--------------------------------------------
1503 (0x05df) | 5824 (0x16c0) | For generic HID class devices (which are NOT mice, keyboards or joysticks)
------------------+-------------------+--------------------------------------------
1505 (0x05e1) | 5824 (0x16c0) | For CDC-ACM class devices (modems)
-------------------+-------------------+--------------------------------------------
1508 (0x05e4) | 5824 (0x16c0) | For MIDI class devices
-------------------+-------------------+--------------------------------------------

As per my understanding of this , attiny85 doesn't come with hardware usb support (UART?) . To workaround this issue digispark got a library you must include in arduino projects

#include <DigiCDC.h>
void setup() {               
  SerialUSB.begin();
}

so VID / PID is a matter of software (libusb?) according to the following readings:

https://digistump.com/board/index.php?topic=988.0
https://digistump.com/board/index.php/topic,1458.15.html

A small relief: there is a couple of projects interfacing digispark with apache cordova, so, I really think it should be possible to make it work with droidscript too!
(example of arduino code) https://github.com/digistump/Digispark_Cordova_CDCLED/blob/master/ArduinoCode/CDC_LED/CDC_LED.ino

CANE LUPO

unread,
Jun 18, 2016, 3:19:13 PM6/18/16
to DroidScript
ps (as I am not able to edit my own posts)

it appears that digispark uses Micronucleus as a bootloader, which I think once loaded discloses its "software" VID / PID match

CANE LUPO

unread,
Jun 18, 2016, 3:33:20 PM6/18/16
to DroidScript
More info (pulled from the windows driver package) https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip

Digispark Virtual Com Port
Low-Speed CDC Transfer Interface
VID_16D0&PID_087E

Digispark Bootloader
Digispark Bootloader Install Disk
VID_16D0&PID_0753

DigiUSB
DigiUSB Install Disk
VID_16C0&PID_05DF

CANE LUPO

unread,
Jun 18, 2016, 5:17:11 PM6/18/16
to DroidScript
ok I definitely think the following one should be the right VID / PID to detect the device as a serial one

CANE LUPO

unread,
Jun 20, 2016, 4:11:50 PM6/20/16
to DroidScript
Any news about the alpha release David?

CANE LUPO

unread,
Jun 22, 2016, 10:42:00 AM6/22/16
to DroidScript
looking forward a reply (any sort of)

CANE LUPO

unread,
Jun 27, 2016, 10:18:32 AM6/27/16
to DroidScript
HELLp

CANE LUPO

unread,
Jul 9, 2016, 12:32:54 PM7/9/16
to DroidScript
Plss

Dave Smart

unread,
Jul 9, 2016, 12:59:39 PM7/9/16
to DroidScript
OK, so we are sure it is these two right?

VID = 0x16D0

PID = 0x087E


Dave Smart

unread,
Jul 9, 2016, 1:17:05 PM7/9/16
to DroidScript
Alpha version on its way to you :)

CANE LUPO

unread,
Jul 10, 2016, 11:44:30 AM7/10/16
to DroidScript
Thank you very much, looking forward this alpha.

I will then report my testings here and on digispark forums, which community is quite large indeed!
Reply all
Reply to author
Forward
0 new messages