Skip to content

Microbit: Morse Code Typewriter

finger tapping a pad that activates a dot on the L E D matrix on a Microbit.

The Microbit board is a compact, feature-filled microcontroller designed for learning and prototyping projects. It features an ARM Cortex-M0 processor, a built-in 5x5 LED display, buttons, sensors, and wireless communication capabilities such as Bluetooth and radio. The board is user-friendly, making it an ideal choice for beginners and educators. The updated version of the board added additional features such as an onboard speaker and the ability to support Bluetooth Human Interface Devices (HID) using the visual block-based editor MakeCode.

The Problem

Using these features, the Microbit can serve as a wonderful platform for creating and prototyping custom assistive technology to support people with physical disabilities who struggle with navigating traditional keyboards for typing due to weakness or coordination difficulties. Current assistive technologies utilize switches which are custom buttons plugged into devices called switch interfaces via audio jack cables. The switch interfaces then send a signal to the computer or mobile device's operating system or software to activate a keystroke or command. Users relying on switch access then utilize a system called scanning to navigate through segments of the screen or an onscreen keyboard until the desired item is highlighted, and then press their switch to activate that item. Below is an animation illustrating this process using a single switch, which is slow and labor-intensive.

--- title: Single or Double Switch Access Use --- flowchart LR accTitle: A flow chart of a user pressing a switch to activate a computer or mobile device accDescr{ A flow chart starting with the user and a labeled arrow of Activate pointing to one or two switches. Both switches lead to a node labeled switch interface which then leads to two node options of computer or mobile device. The arrow to the nodes is labeled by a label of keypress with a keyboard icon. } A[fa:fa-user User] -->|Activate| B(fa:fa-circle Switch) A -.-> |Activate| F(fa:fa-circle Switch) B --> |fa:fa-toggle-on| C[[fa:fa-box Switch Interface]] F -.-> |fa:fa-toggle-on| C C -->|fa:fa-keyboard keypress| D[fa:fa-laptop Computer] C -->|fa:fa-keyboard keypress| E[fa:fa-mobile Mobile Device]
animation demonstrating the process of block scanning through an onscreen keyboard to type the word Hi using a single switch

An alternative method of increasing the rate of keyboarding using either a single or double switch involves the introduction of the long-lost Morse Code. Morse Code is a system of communication developed in the 1830s and 1840s by Samuel Morse and Alfred Vail. It uses a combination of dots and dashes to represent letters and numbers. Each letter of the alphabet and each number has a unique combination of dots and dashes, which are transmitted as audio or visual signals. Morse Code was widely used in the early years of telegraphy and is still occasionally used today, particularly in amateur radio communication. It is known for its simplicity and efficiency in conveying messages over long distances using minimal resources.

A Solution

Over the summer of 2023, through an open discussion on the Microbit Slack workspace, the idea of developing a Morse Code extension for the block-based editor was raised as an engaging educational activity. In collaboration with local user @grandpaBond and Bill Siever, the Makecode Morse Code extension was created. When paired with the already existing Bluetooth HID extension also developed by Bill, the Microbit can be utilized as a wireless Morse Code typewriter! Bill has developed robust documentation and examples for this extension on his GitHub repository. Please consider supporting his hard work through his sponsor page on Github.

With a bit of know-how, custom interfaces can be created to meet a user's ability through connections to the Microbit's pins without the need to solder making this project incredibly friendly to novice caretakers. Updating the timing and other code parameters can also be fairly user-friendly given the visual programming language being used and the ability to modify and send code through a standard browser without the need to install additional software.

As an example, prototype solutions were generated for users who have access to a single switch or two switches for keyboarding. The Microbit is connected to the device using standard Bluetooth pairing. Once paired, the Microbit sends letters, numbers, and other editing keystrokes based on the switch that was activated to the paired device.

Single Switch Use

animation showing a text editor window and a Microbit device over the window. A finger is tapping the pad to insert dots and dashes on the Microbit to send letters that form the word hello on the text editor window.

This project uses a 3D-printed case and the capacitive touch capabilities of the Microbit V2. Using capacitive touch benefits users who may not have the strength to activate a mechanical switch. Only a gentle tap of the pad for the set timing length is needed to activate the dot or dash sequences. Below you will find the overview, needed files and build instructions. The Google Slides are available here for remix.

--- title: Single Switch Microbit Morse Code Typewriter --- flowchart LR accTitle: A flow chart of a user pressing a switch to Microbit sending a keystroke to a computer or mobile device accDescr{ A flow chart starting with the user and a labeled arrow of Activate pointing to one switch. The switch leads to a node labeled microbit with the label dot and dash which then leads to two node options of computer or mobile device. The arrow to the nodes is labeled by a label of keypress with a keyboard icon. } A[fa:fa-user User] -->|Activate| B(fa:fa-circle-dot Switch) B --> C[[fa:fa-box Microbit]] C -.->|fa:fa-keyboard keypress| D[fa:fa-computer Computer] C -.->|fa:fa-keyboard keypress| E[fa:fa-mobile Mobile Device]

Double Switch Use

 an animation showing a text editor window with an overlay of a desk camera showing a device with two buttons pressing in sequence to create a series of dots and dashes on the Microbit. The sequences create the word hey on the text editor window.

The double switch project also utilizes a 3D printed case to house the Microbit and two mechanical switches. The design embeds two of Makers Making Change's Light Touch Switches into the case. This particular solution removes the timing requirement to generate letters given one switch sends a dot and the other a dash. Below you will find the overview, needed files and build instructions. The Google Slides are available here for remix.

--- title: Double Switch Microbit Morse Code Typewriter --- flowchart LR accTitle: A flow chart of a user pressing two switches to send letters to a computer or mobile device accDescr{ A flow chart starting with the user and a labeled arrow of Activate pointing to two switches. Both switches lead to a node labeled microbit which then leads to two node options of computer or mobile device. The arrow to the nodes is labeled by a label of keypress with a keyboard icon. } A[fa:fa-user User] -->|Activate| B(fa:fa-circle Switch) A --> |Activate| F(fa:fa-circle Switch) B --> |Dot| C[[fa:fa-box Microbit]] F --> |Dash| C C -.->|fa:fa-keyboard keypress| D[fa:fa-computer Computer] C -.->|fa:fa-keyboard keypress| E[fa:fa-mobile Mobile Device]

MakerEd Application

For computer science and engineering educators, connecting constructivist learning to real-world needs is key. Developing microcontroller-based assistive technology interfaces can not only support the disability community but also help students understand the process of how to look for needs around them and truly implement #TechForGood. Some of these benefits include:

  1. Hands-on Practical Experience: Engaging in a project that involves the design and development of a custom assistive technology solution using a microcontroller allows students to apply the theoretical knowledge they have learned in a practical and meaningful way. It gives them the opportunity to work on a real-world problem and see the direct impact of their work.
  2. Problem-Solving Skills: Creating a custom assistive technology solution requires students to analyze the needs and challenges faced by individuals with disabilities. This process develops their problem-solving skills as they brainstorm and implement innovative ideas to address those needs. They learn to think critically and find creative solutions to complex problems.
  3. Interdisciplinary Learning: Developing a microcontroller-based assistive technology project involves various disciplines, including computer science, engineering, electronics, and human-centered design. Students gain a holistic understanding of how these disciplines interact and collaborate to create a meaningful solution. It promotes interdisciplinary learning and encourages students to explore various fields of study.
  4. Collaboration and Communication: Working on a project of this nature often requires collaboration with individuals from different backgrounds, including disabled individuals, caregivers, and professionals in the field. Students learn how to effectively communicate and collaborate with diverse stakeholders, understanding their needs and incorporating their feedback into the project. This fosters teamwork and improves their interpersonal skills.
  5. Ethical and Social Considerations: Creating assistive technology solutions raises important ethical and social considerations. Students learn about accessibility, inclusivity, and the impact of technology on individuals with disabilities. They develop a deeper understanding of the social implications of their work and the responsibility they have as future computer scientists and engineers to create technology that serves all members of society.
  6. Technical Skills Enhancement: Through the process of designing and implementing the custom assistive technology project, students enhance their technical skills in areas such as programming, circuit design, sensors, wireless communication, and user interface development. They gain hands-on experience with microcontrollers and learn how to adapt and modify existing technology to meet specific needs.

Iterations

If you built this project or created your own iterations, please consider posting them in the comments section below for others to learn.