[{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003ePersons with disabilities related to communication may utilize grid based communication systems as Alternative Augmentative Communication (AAC). One such web based and open source system is AsTeRICS Grid developed in Vienna under government funding with the goal of making this type of communication free and accessible to all. It has a wide range of features and input methods, one of which is the Huffman input method which assigns key combinations to each cell.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/001/095/original/Screenshot_2024-08-08_at_10.13.44%E2%80%AFAM.png?1723126493","metadata":{"caption":"Screenshot of the AsTeRICS grid with Huffman number inputs assigned to each cell."}},{"element_type":"text","content":"\n  \n  \n  \n        \u003cp\u003eThis got me thinking about \u003ca href=\"https://learn.adafruit.com/neokey-emoji-keyboard/overview\" target=\"_blank\"\u003eAdafruit's NeoKey Emoji Keyboard\u003c/a\u003e project and what a great fit it would be for this type of input. I managed to tweak the project's file so each key press sends the numbers 1- 4 to support navigation through the cells. Thanks to Liz Clark for the code and wonderfully helpful and easy to follow tutorial!\u003c/p\u003e\n      \n\n\n","metadata":{}},{"element_type":"code","content":"# SPDX-FileCopyrightText: 2021 Liz Clark for Adafruit Industries\n#\n# SPDX-License-Identifier: MIT\n# Modified August 7, 2024 by Loreto Dumitrescu for Huffman input\n\nimport time\nimport board\nimport busio\nfrom adafruit_neokey.neokey1x4 import NeoKey1x4\nimport usb_hid\nfrom adafruit_hid.keyboard import Keyboard\nfrom adafruit_hid.keycode import Keycode\n\n# use STEMMA I2C bus on RP2040 QT Py\ni2c_bus = busio.I2C(board.SCL1, board.SDA1)\n\n# Create a NeoKey object\nneokey = NeoKey1x4(i2c_bus, addr=0x30)\n\n#  create a keyboard object\nkeyboard = Keyboard(usb_hid.devices)\n\nprint(\"Huffman Input Device\")\n\n#  states for key presses\nkey_0_state = False\nkey_1_state = False\nkey_2_state = False\nkey_3_state = False\n\nwhile True:\n    #  switch debouncing\n    #  also turns off NeoPixel on release\n    if not neokey[0] and key_0_state:\n        key_0_state = False\n        neokey.pixels[0] = 0x0\n    if not neokey[1] and key_1_state:\n        key_1_state = False\n        neokey.pixels[1] = 0x0\n    if not neokey[2] and key_2_state:\n        key_2_state = False\n        neokey.pixels[2] = 0x0\n    if not neokey[3] and key_3_state:\n        key_3_state = False\n        neokey.pixels[3] = 0x0\n\n    #  if 1st neokey is pressed...\n    if neokey[0] and not key_0_state:\n        print(\"Button 1 pressed\")\n        #  turn on NeoPixel\n        neokey.pixels[0] = 0xFF0000\n        #  open macOS emoji menu\n        keyboard.send(Keycode.ONE)\n        #  delay for opening menu\n        time.sleep(.2)\n        key_0_state = True\n\n    #  if 2nd neokey is pressed...\n    if neokey[1] and not key_1_state:\n        print(\"Button 2 pressed\")\n        #  turn on NeoPixel\n        neokey.pixels[1] = 0xFFFF00\n        #  open macOS emoji menu\n        keyboard.send(Keycode.TWO)\n        #  delay for opening menu\n        time.sleep(.2)\n        key_1_state = True\n\n    #  if 3rd neokey is pressed...\n    if neokey[2] and not key_2_state:\n        print(\"Button 3 pressed\")\n        #  turn on NeoPixel\n        neokey.pixels[2] = 0x00FF00\n        #  open macOS emoji menu\n        keyboard.send(Keycode.THREE)\n        #  delay for opening menu\n        time.sleep(.2)\n        key_2_state = True\n\n    #  if 4th neokey is pressed...\n    if neokey[3] and not key_3_state:\n        print(\"Button 4 pressed\")\n        #  turn on NeoPixel\n        neokey.pixels[3] = 0x00FFFF\n        #  open macOS emoji menu\n        keyboard.send(Keycode.FOUR)\n        #  delay for opening menu\n        time.sleep(.2)\n        key_3_state = True","metadata":{"language":"python","linenums":false}},{"element_type":"text","content":"\n        \u003cp\u003eThis project can be a great device to support users with physical disabilities who may otherwise struggle with directly selecting cells on the grid but do have movement in their fingers. This project also requires no soldering and is beginner friendly making it possible for novice makers to support the need. Here is a quick overview video of how it all functions.\u003c/p\u003e\n      ","metadata":{}},{"element_type":"embed","content":"https://youtu.be/ccZbEn1Jcdc?si=ij-NCEIbeWoQwFnB"}]