Andree-HB
03.03.2022, 20:51
...und der nächste Streich:
https://www.pixelklecks.de/pictures/4_Switch_Buttonk.jpg
https://www.pixelklecks.de/pictures/4_Switch_Button.jpg
Dies ist eine kleine 4-Tasten USB Zusatztastatur, mit der ich in Microsoft Teams folgende Funktionen auslösen kann:
Mikrofon an/aus
Video an/aus
Bildschirmfreigabe an/aus
Screenshot (mit automatischer Speicherung)
#include "Keyboard.h"
// set pin numbers for the five buttons:
const int Button1 = 10;
const int Button2 = 16;
const int Button3 = 14;
const int Button4 = 15;
const int Button0 = 18;
void setup() { // initialize the buttons' inputs:
pinMode(Button1, INPUT_PULLUP);
pinMode(Button2, INPUT_PULLUP);
pinMode(Button3, INPUT_PULLUP);
pinMode(Button4, INPUT_PULLUP);
pinMode(Button0, OUTPUT);
digitalWrite(Button0, LOW);
Serial.begin(9600);
Keyboard.begin();
}
...das ganze per Arduino Pro Micro / Leonardo, alternativ auch Digistump Digispark Module
void loop() {
// use the pushbuttons to control the keyboard:
// Microphone
if (digitalRead(Button1) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('M');
Keyboard.releaseAll();
delay(1000);
}
// Webcam
if (digitalRead(Button2) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('O');
Keyboard.releaseAll();
delay(1000);
}
// Screenshare
if (digitalRead(Button3) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('E');
Keyboard.releaseAll();
delay(1000);
}
// Screenshot
if (digitalRead(Button4) == LOW) {
Keyboard.press(KEY_LEFT_GUI);
Keyboard.write(206);
Keyboard.releaseAll();
delay(1000);
}
}
...das ganze per Arduino Pro Micro / Leonardo, alternativ auch Digistump / Digispark Module (da braucht es einen anderen Sketch)
https://www.pixelklecks.de/pictures/4_Switch_Buttonk.jpg
https://www.pixelklecks.de/pictures/4_Switch_Button.jpg
Dies ist eine kleine 4-Tasten USB Zusatztastatur, mit der ich in Microsoft Teams folgende Funktionen auslösen kann:
Mikrofon an/aus
Video an/aus
Bildschirmfreigabe an/aus
Screenshot (mit automatischer Speicherung)
#include "Keyboard.h"
// set pin numbers for the five buttons:
const int Button1 = 10;
const int Button2 = 16;
const int Button3 = 14;
const int Button4 = 15;
const int Button0 = 18;
void setup() { // initialize the buttons' inputs:
pinMode(Button1, INPUT_PULLUP);
pinMode(Button2, INPUT_PULLUP);
pinMode(Button3, INPUT_PULLUP);
pinMode(Button4, INPUT_PULLUP);
pinMode(Button0, OUTPUT);
digitalWrite(Button0, LOW);
Serial.begin(9600);
Keyboard.begin();
}
...das ganze per Arduino Pro Micro / Leonardo, alternativ auch Digistump Digispark Module
void loop() {
// use the pushbuttons to control the keyboard:
// Microphone
if (digitalRead(Button1) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('M');
Keyboard.releaseAll();
delay(1000);
}
// Webcam
if (digitalRead(Button2) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('O');
Keyboard.releaseAll();
delay(1000);
}
// Screenshare
if (digitalRead(Button3) == LOW) {
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.press(KEY_LEFT_SHIFT);
Keyboard.write('E');
Keyboard.releaseAll();
delay(1000);
}
// Screenshot
if (digitalRead(Button4) == LOW) {
Keyboard.press(KEY_LEFT_GUI);
Keyboard.write(206);
Keyboard.releaseAll();
delay(1000);
}
}
...das ganze per Arduino Pro Micro / Leonardo, alternativ auch Digistump / Digispark Module (da braucht es einen anderen Sketch)