Author Topic: Using 2 Libaries in 1 DigiSpark  (Read 477 times)

May

  • Newbie
  • *
  • Posts: 1
Using 2 Libaries in 1 DigiSpark
« on: March 21, 2019, 05:10:45 pm »
So i want to have my position mover of my mouse and there should be at the start an F5 press.
So i want to do add "#include "DigiKeyboard.h" without getting an error while uploading it.


Code: [Select]
#include "DigiMouse.h"


void setup() {
  // put your setup code here, to run once:
  pinMode(0, OUTPUT); //LED on Model B
  pinMode(1, OUTPUT); //LED on Model A 
  DigiMouse.begin(); //start or reenumerate USB
}

void loop() {
  DigiMouse.update(); // DigiMouse.update() at least every 50ms
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(500);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(500);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(500);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(500);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(500);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(300);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(15);
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(500);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(300);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
  DigiMouse.moveY(-65);
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100); 
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.setButtons(1); //left click
  DigiMouse.delay(100);
  DigiMouse.setButtons(0); //unclick all
  DigiMouse.delay(100);
 
}