diff --git a/README.md b/README.md index eaa88a4..2b03909 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # sylvotext-synth -A kind of input machine for collaborative writing with trees. \ No newline at end of file +A kind of input machine for collaborative writing with trees. + +This is a series of experiments with a goal of more everyday interaction with trees. + +It was written for an Olimexino-STM32 development board but it should be portable to anything arduino compatible that can do USB-HID devices.. Note, depending on your board, you might need to modify the USB-HID keyboard calls to suit. + +Some [Lab Notes](sylvotext-lab-notes1.md) + +![WIP Photo of Machine](photos/sylvotext1.jpg "WIP Image of a rustic maple 6-key chord keyboard") \ No newline at end of file diff --git a/photos/DSCF8329.JPG b/photos/DSCF8329.JPG new file mode 100644 index 0000000..a3f42f2 Binary files /dev/null and b/photos/DSCF8329.JPG differ diff --git a/photos/DSCF8330.JPG b/photos/DSCF8330.JPG new file mode 100644 index 0000000..6d68899 Binary files /dev/null and b/photos/DSCF8330.JPG differ diff --git a/photos/DSCF8331.JPG b/photos/DSCF8331.JPG new file mode 100644 index 0000000..8e8f0ae Binary files /dev/null and b/photos/DSCF8331.JPG differ diff --git a/photos/DSCF8332.JPG b/photos/DSCF8332.JPG new file mode 100644 index 0000000..67eab6b Binary files /dev/null and b/photos/DSCF8332.JPG differ diff --git a/photos/DSCF8333.JPG b/photos/DSCF8333.JPG new file mode 100644 index 0000000..53e557f Binary files /dev/null and b/photos/DSCF8333.JPG differ diff --git a/photos/DSCF8334.JPG b/photos/DSCF8334.JPG new file mode 100644 index 0000000..a3968cb Binary files /dev/null and b/photos/DSCF8334.JPG differ diff --git a/photos/DSCF8335.JPG b/photos/DSCF8335.JPG new file mode 100644 index 0000000..82db5ff Binary files /dev/null and b/photos/DSCF8335.JPG differ diff --git a/photos/DSCF8336.JPG b/photos/DSCF8336.JPG new file mode 100644 index 0000000..c46bab5 Binary files /dev/null and b/photos/DSCF8336.JPG differ diff --git a/photos/DSCF8337.JPG b/photos/DSCF8337.JPG new file mode 100644 index 0000000..1b68583 Binary files /dev/null and b/photos/DSCF8337.JPG differ diff --git a/photos/DSCF8338.JPG b/photos/DSCF8338.JPG new file mode 100644 index 0000000..d4b4d38 Binary files /dev/null and b/photos/DSCF8338.JPG differ diff --git a/photos/DSCF8350.JPG b/photos/DSCF8350.JPG new file mode 100644 index 0000000..804771f Binary files /dev/null and b/photos/DSCF8350.JPG differ diff --git a/photos/DSCF8351.JPG b/photos/DSCF8351.JPG new file mode 100644 index 0000000..266896d Binary files /dev/null and b/photos/DSCF8351.JPG differ diff --git a/photos/DSCF8352.JPG b/photos/DSCF8352.JPG new file mode 100644 index 0000000..0357be6 Binary files /dev/null and b/photos/DSCF8352.JPG differ diff --git a/photos/DSCF8375.JPG b/photos/DSCF8375.JPG new file mode 100644 index 0000000..41f2d50 Binary files /dev/null and b/photos/DSCF8375.JPG differ diff --git a/photos/DSCF8376.JPG b/photos/DSCF8376.JPG new file mode 100644 index 0000000..9416adb Binary files /dev/null and b/photos/DSCF8376.JPG differ diff --git a/photos/DSCF8377.JPG b/photos/DSCF8377.JPG new file mode 100644 index 0000000..cc18883 Binary files /dev/null and b/photos/DSCF8377.JPG differ diff --git a/photos/DSCF8378.JPG b/photos/DSCF8378.JPG new file mode 100644 index 0000000..5d1a5f3 Binary files /dev/null and b/photos/DSCF8378.JPG differ diff --git a/photos/DSCF8379.JPG b/photos/DSCF8379.JPG new file mode 100644 index 0000000..14ef737 Binary files /dev/null and b/photos/DSCF8379.JPG differ diff --git a/photos/sylvotext1.jpg b/photos/sylvotext1.jpg new file mode 100644 index 0000000..ca7f784 Binary files /dev/null and b/photos/sylvotext1.jpg differ diff --git a/stm32-firmware/stm32-braille-kb/stm32-braille-kb.ino b/stm32-firmware/stm32-braille-kb/stm32-braille-kb.ino new file mode 100644 index 0000000..e920b5f --- /dev/null +++ b/stm32-firmware/stm32-braille-kb/stm32-braille-kb.ino @@ -0,0 +1,149 @@ +#include + +int key_L1 = 4; // braille dot 1 - binary 32 +int key_L2 = 5; // dot 2 - binary 16 +int key_L3 = 6; // dot 3 - binary 8 +int key_R1 = 7; // dot 4 - binary 4 +int key_R2 = 8; // dot 5 - binary 2 +int key_R3 = 9; // dot 6 - binary 1 + +int key_SPACE = 10; +int key_SHIFT = 11; // TODO: probably should support differentiation of L/R shift + +/* + the keyMap uses a braille alphabet (6-bit values) from ASCII Braille + + // TODO: add other keyMaps for other braille or alternative + // chording/encoding systems +*/ +char keyMap[65]; +int lastKey = -1; + +USBHID HID; +HIDKeyboard Keyboard(HID); + +void setup() { + pinMode(key_L1, INPUT_PULLUP); + pinMode(key_L2, INPUT_PULLUP); + pinMode(key_L3, INPUT_PULLUP); + pinMode(key_R1, INPUT_PULLUP); + pinMode(key_R2, INPUT_PULLUP); + pinMode(key_R3, INPUT_PULLUP); + + // TODO: there is probably a more RAM-saving way to do this with #DEFINE or + // similar preprocessor magic + keyMap[0] = ' '; + keyMap[0b100] = '@'; + keyMap[0b100000] = 'a'; + keyMap[0b110000] = 'b'; + keyMap[0b100100] = 'c'; + keyMap[0b100110] = 'd'; + keyMap[0b100010] = 'e'; + keyMap[0b110100] = 'f'; + keyMap[0b110110] = 'g'; + keyMap[0b110010] = 'h'; + keyMap[0b10100] = 'i'; + keyMap[0b10110] = 'j'; + keyMap[0b101000] = 'k'; + keyMap[0b111000] = 'l'; + keyMap[0b101100] = 'm'; + keyMap[0b101110] = 'n'; + keyMap[0b101010] = 'o'; + keyMap[0b111100] = 'p'; + keyMap[0b111110] = 'q'; + keyMap[0b111010] = 'r'; + keyMap[0b11100] = 's'; + keyMap[0b11110] = 't'; + keyMap[0b101001] = 'u'; + keyMap[0b111001] = 'v'; + keyMap[0b10111] = 'w'; + keyMap[0b101101] = 'x'; + keyMap[0b101111] = 'y'; + keyMap[0b101011] = 'z'; + keyMap[0b10101] = '['; + keyMap[0b110011] = '\\'; + keyMap[0b110111] = ']'; + keyMap[0b110] = '^'; + keyMap[0b111] = '_'; + + keyMap[0b11101] = '!'; + keyMap[0b10] = '"'; + keyMap[0b1111] = '#'; + keyMap[0b110101] = '$'; + keyMap[0b100101] = '%'; + keyMap[0b111101] = '&'; + keyMap[0b1000] = '\''; + keyMap[0b111011] = '('; + keyMap[0b11111] = ')'; + keyMap[0b100001] = '*'; + keyMap[0b1101] = '+'; + keyMap[0b1] = ','; + keyMap[0b1001] = '-'; + keyMap[0b101] = '.'; + keyMap[0b1100] = '/'; + keyMap[0b1011] = '0'; + keyMap[0b10000] = '1'; + keyMap[0b11000] = '2'; + keyMap[0b10010] = '3'; + keyMap[0b10011] = '4'; + keyMap[0b10001] = '5'; + keyMap[0b11010] = '6'; + keyMap[0b11011] = '7'; + keyMap[0b11001] = '8'; + keyMap[0b1010] = '9'; + keyMap[0b100011] = ':'; + keyMap[0b11] = ';'; + keyMap[0b110001] = '<'; + keyMap[0b111111] = '='; + keyMap[0b1110] = '>'; + keyMap[0b100111] = '?'; + + + HID.begin(HID_KEYBOARD); + while (!USBComposite); + Keyboard.begin(); +} + +void loop() { + int key = -1; + + if (digitalRead(key_L1) == LOW) { + key += 32; + } + if (digitalRead(key_L2) == LOW) { + key += 16; + } + if (digitalRead(key_L3) == LOW) { + key += 8; + } + if (digitalRead(key_R1) == LOW) { + key += 4; + } + if (digitalRead(key_R2) == LOW) { + key += 2; + } + if (digitalRead(key_R3) == LOW) { + key += 1; + } + + if (digitalRead(key_SPACE) == LOW) { + key = 0; + } + + if ((key != lastKey) && (key != -1)) { + + char key_out = keyMap[key]; + + // check for shift + // TODO: either use STD::TOUPPER or make this more proper for extended chars + if (digitalRead(key_SHIFT) == LOW) { + key_out &= ~' '; + } + + // TODO: send proper keydown and keyup so key-repeat works on OS level. + Keyboard.print(key_out); + } + + lastKey = key; + delay(100); +} diff --git a/sylvotext-lab-notes1.md b/sylvotext-lab-notes1.md new file mode 100644 index 0000000..8eacbfb --- /dev/null +++ b/sylvotext-lab-notes1.md @@ -0,0 +1,7 @@ +## Lab Notes for Sylvotext KB#1 + +This is the first in a series of experiment to try to make real working machines that integrate trees into daily life. These works my seem to be speculative (and they are certainly experimental) but they are earnestly intended for real everyday use. + +It is also an attempt at what some people are calling "Perma-Computing", an approach to digital technologies inspired by de-growth, more natural temporalities as well as social and ecological justice. + +One might say that there is a sad irony that when we use digital technologies, we use objects that were made under conditions of extractivism and exploitation \ No newline at end of file