├── img ├── backside.jpg └── commons-console-full.jpg ├── .gitignore ├── platformio.ini ├── README.md ├── src └── main.cpp └── voice_arcade_board.svg /img/backside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/arduino-common-voice-keyboard/master/img/backside.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .pio 2 | .vscode/.browse.c_cpp.db* 3 | .vscode/c_cpp_properties.json 4 | .vscode/launch.json 5 | .vscode/ipch 6 | -------------------------------------------------------------------------------- /img/commons-console-full.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ubahnverleih/arduino-common-voice-keyboard/master/img/commons-console-full.jpg -------------------------------------------------------------------------------- /platformio.ini: -------------------------------------------------------------------------------- 1 | ;PlatformIO Project Configuration File 2 | ; 3 | ; Build options: build flags, source filter 4 | ; Upload options: custom upload port, speed and extra flags 5 | ; Library options: dependencies, extra library storages 6 | ; Advanced options: extra scripting 7 | ; 8 | ; Please visit documentation for the other options and examples 9 | ; https://docs.platformio.org/page/projectconf.html 10 | 11 | [env:sparkfun_promicro8] 12 | platform = atmelavr 13 | board = sparkfun_promicro8 14 | framework = arduino 15 | lib_deps = 16 | # Keyboard 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The idea of the project is to build a easy to use console for using [mozilla common voice](https://voice.mozilla.org/). Based on an arduino project, which emulates a keyboard for the common voice keyboard-shortcuts. So the website is completly controlled by the self made keybord. 2 | 3 | ![](./img/commons-console-full.jpg) 4 | 5 | ![](./img/backside.jpg) 6 | 7 | The current arduino project is configured for german version of the website, but can adjusted for other languages by changing the keys in `chars` and adjusting the pins `keyPins`. For non english keyboard keys use the `ü` as an example. 8 | 9 | You can find the SVG for the Lasercutter in [`voice_arcade_board.svg`](./voice_arcade_board.svg). -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | bool keyState[8]; 5 | String chars[8] = { "1", "2", "3", "4", "5", "\n", "ü", "a" }; 6 | byte keyPins[8] = { PIN2, PIN3, PIN4, PIN5, PIN6, PINB7, 8, 9 }; 7 | 8 | 9 | int lastMillis = millis(); 10 | 11 | void setup() { 12 | Serial.begin(9600); 13 | delay(1000); 14 | Serial.println("START"); 15 | delay(2*1000); 16 | Serial.println("start keyboard"); 17 | delay(1000); 18 | Keyboard.begin(); 19 | 20 | 21 | 22 | for (int i = 0; i < 8; i++){ 23 | pinMode(keyPins[i], INPUT_PULLUP); 24 | } 25 | } 26 | 27 | void loop() { 28 | for (int i = 0; i < 8; i++){ 29 | bool value = digitalRead(keyPins[i]); 30 | if (value < keyState[i]){ 31 | Serial.print(chars[i]); 32 | Serial.println(); 33 | 34 | // zeitabstand checken 35 | if ((millis() - lastMillis) > 800){ 36 | lastMillis = millis(); 37 | //fix for ü 38 | if (chars[i].compareTo("ü") == 0){ 39 | Keyboard.write(91); 40 | } else { 41 | Keyboard.write(chars[i].charAt(0)); 42 | } 43 | } 44 | } 45 | keyState[i] = value; 46 | delay(10); 47 | } 48 | } -------------------------------------------------------------------------------- /voice_arcade_board.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 23 | 38 | 40 | 51 | 53 | 54 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | --------------------------------------------------------------------------------