Author Topic: Digispark USB comunikation ,which Library,port?  (Read 3551 times)

wernerr

  • Newbie
  • *
  • Posts: 1
Digispark USB comunikation ,which Library,port?
« on: July 06, 2017, 11:49:24 am »
Hello all,
 im a total beginner with arduino,
i use the digispark board from digistump Atiny85 (default 16,5mhz), i got the IDE to work, except the serial monitor,
i can AD-sample, write to eeprom, etc but the USB comunication doesnt work
my question now:
to comunicate with the pc, i can use the same connector which i use to programm, wright? i dont need a second serial com.
i tryed the basic DigitalReadSerial  example code from arduino IDE, but the board doesnt send, i used a usb- monitor programm to check.
And i tested the Usb data lines on the programming connector they are allways same state.
do i have to load a library?
thanks for your help.
« Last Edit: July 06, 2017, 03:22:52 pm by wernerr »

Holes Flow

  • Newbie
  • *
  • Posts: 4
Re: Digispark USB comunikation ,which Library,port?
« Reply #1 on: July 18, 2017, 04:30:29 pm »
wernerr,

You probably haven't used the ATTiny MCUs before. Unlike their "Mega" big brothers, these don't have default Serial class available. Serial.println() is not a command. Digispark is just a ATTiny85, like you said in your post, and the Digispark board doesn't change that. I've done a bit with just the ATTiny85/84 and others, and can tell you the board you are using is for the most part, the chip with it's 8 pins nicely broken out (plus a voltage regulator and a few tiny goodies to make the USB interface work).

The programs you write for the Digispark will actually run fine on a 'bare' ATTiny85 with no changes. After you get a few of the Digisparks under your belt/hat, you can easily use them in chorus with other chips, and once you get your serial comms working the way you like, you can even make the chips talk to each other, which is handy in cases where you want to extend the I/O and/or logic, but keep things 'tiny'...

http://www.instructables.com/id/Attiny-serial-monitor-using-arduino-walkthrough/ <--- This link, and a lot of others I've seen, might be just what you're looking for.
http://www.ernstc.dk/arduino/tinycom.html <--- This link shows over 5 ways to do it.

HTH!

pat
:)