I'm trying to make a button for Breeze systems that acts as an F5 OR left mouse click. Ive tried both after agonizing over this for days. I have made many buttons for another program that simulate a space bar push. This though is killing me. Below are 2 things I've done...both result in a bunch of this ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" when I click the button:
I have my button wires to the grnd and c7 pins like i always do for the other buttone:
VERSION 1
/*
* Button.pde
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(4000);
}
void loop() {
if (digitalRead(10) == HIGH) {
}
else {
Mouse.set_buttons(1, 0, 0); // hold left button
Mouse.set_buttons(0, 0, 0); // release button after move
delay(500);
}
AND
/*
* Button.pde
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(4000);
}
void loop() {
if (digitalRead(10) == HIGH) {
delay(10);
}
else {
Keyboard.set_modifier(0);
Keyboard.set_key1(KEY_F5);
Keyboard.send_now();
releasekey();
delay(500);
}
void releasekey() {
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
}
I have my button wires to the grnd and c7 pins like i always do for the other buttone:
VERSION 1
/*
* Button.pde
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(4000);
}
void loop() {
if (digitalRead(10) == HIGH) {
}
else {
Mouse.set_buttons(1, 0, 0); // hold left button
Mouse.set_buttons(0, 0, 0); // release button after move
delay(500);
}
AND
/*
* Button.pde
*/
void setup() {
Serial.begin(9600);
pinMode(10, INPUT_PULLUP);
delay(4000);
}
void loop() {
if (digitalRead(10) == HIGH) {
delay(10);
}
else {
Keyboard.set_modifier(0);
Keyboard.set_key1(KEY_F5);
Keyboard.send_now();
releasekey();
delay(500);
}
void releasekey() {
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
}