WTHIWYG

What the hack is what you got?

/ Jakub Kramarz

Software?

Moar software?

Libraries?

Moar libraries?

Examples...

...and a bit of live coding

  • Examlples/DigiMouse/Mouse

  • circuit
  • Examples/OneWire/Digispark_Example


#include "DigiKeyboard.h"
void setup() {
  pinMode(5, INPUT);
  pinMode(0, OUTPUT);
  digitalWrite(5, HIGH); //internal pull-up
}
void loop() {
  if(digitalRead(5) == LOW){
      DigiKeyboard.sendKeyStroke(KEY_SPACE);
      DigiKeyboard.update();
      digitalWrite(0, HIGH); //fly me to the moon!
      DigiKeyboard.delay(1000);
      digitalWrite(0, LOW);      
  }
}
                                                        


#include <DigiUSB.h>

void setup() {
  DigiUSB.begin();
}

void loop() {
    if (DigiUSB.available()) {
      char lastRead = DigiUSB.read();
      switch(lastRead){
         case '0':
           //happy
           digitalWrite(0, LOW);
           break;
         case '1':
           //sad
           digitalWrite(0, HIGH);
           break; 
      }
  }
  DigiUSB.delay(10);
}
                                            

Drivers?

  • 90-digispark.rules