Digistump Forums

The Digispark => Digispark (Original) Support => Topic started by: joshmarinacci on November 19, 2012, 08:17:14 am

Title: device settings for alternative IDE
Post by: joshmarinacci on November 19, 2012, 08:17:14 am
I'm working on an alternative IDE for Arduino that will be prettier and easier to use.

https://github.com/joshmarinacci/arduinox

I'd like to support the Digispark when it ships.  Could anyone tell me the exact boards.txt settings I'll need?
Title: device settings for alternative IDE
Post by: Bluebie on November 22, 2012, 10:59:05 pm
Best to wait until the digispark arduino library is open source. They\'ll be shipping in a week or two if all goes to plan, so that\'ll be quite soon. :)

I don\'t think digispark works with avrdude, so you\'ll likely need to bundle in another upload tool to support digispark. Aside from that, it\'s just a regular attiny85, so you can look to existing tiny85 arduino projects for information on that. One thing which isn\'t known yet is the precise clock speed, so prepare to handle some last minute adjustments there. It\'ll probably be 16.5mhz - it definitely will be that for any projects which use V-USB to talk to the host computer.
Title: device settings for alternative IDE
Post by: digistump on November 26, 2012, 11:17:23 am
Josh - great project! Bluebie is right - we don\'t use AVRDUDE, so you\'ll need to use our custom uploader to get the code on - we\'ll be releasing that soon.

For the boards file we are shipping with settings to use both the Tiny core project as well as the MIT High Tech version - if you can\'t wait you can grab the boards.txt from them.

Speed is 16.5mhz

Keep us updated and post here or send me an email at ekettenburg at digistump dot com if you have any questions for adding support!
Title: device settings for alternative IDE
Post by: digistump on November 30, 2012, 12:39:02 pm
Josh - here are the files you\'d likely want: https://github.com/digistump/DigisparkArduinoIntegration

those are just drafts at this point, but getting close to final
Title: device settings for alternative IDE
Post by: Bluebie on December 11, 2012, 06:17:01 pm
@digistump That\'s so cool! Playing with it now! The keyboard thing is awesome. It\'d be extra special if there was a nice way to ask it to just type out a string. Here\'s the start of one:

void type(char* string) {
  byte idx = 0;
  while (string[idx] != 0) {
    byte chr = string[idx];
    byte key = KEY_SPACE;
    byte mod = 0;
   
    if (chr == \'0\') {
      key = KEY_0;
    } else if (chr >= \'1\' && chr <= \'9\') {
      key = KEY_1 + (chr - \'1\');
    } else if (chr >= \'a\' && chr <= \'z\') {
      key = KEY_A + (chr - \'a\');
    } else if (chr >= \'A\' && chr <= \'Z\') {
      key = KEY_A + (chr - \'A\');
      mod = MOD_SHIFT_LEFT;
    } else if (chr == \' \') {
      key = KEY_SPACE;
    } else if (chr == \'\\n\') {
      key = KEY_ENTER;
    }
   
    DigiKeyboard.sendKeyStroke(key, mod);
   
    idx++;
  }
}