Back to engineering archive

Record 021 / Firmware and control

Text to Braille and speech controller

Firmware that receives text over USB Serial or serial Bluetooth, speaks it and then updates a five-cell tactile display through SPI shift registers.

Development work
Braille interfaceSpeech outputPeripheral controlBluetoothUARTSPI

Firmware flow

Processing one line through speech and tactile output

Selected firmware routine for a buffered text line; the diagram follows the order of calls in flushAndProcess().

A nonempty line is logged, spoken and then passed to the tactile scrolling routine. The firmware acknowledges the tagged input port before clearing the buffer and its source tag.

The calls run speech before tactile output. Physical actuation and accessibility performance were not tested.

Read the implementation

Selected firmware excerpt. The diagram explains the code; it is not a hardware test.

Selected implementation

void flushAndProcess() {
  if (!line.length()) return;

  PC.print(F("\n[Speak+Braille] "));
  PC.println(line);

  // Speak then display
  speakLine(line);
  showScrolling(line);

  // ACK back to source
  if (lineSrc == SRC_BT) { BT.print(F("ACK ")); BT.println(line); }
  else { PC.print(F("ACK ")); PC.println(line); }

  line = "";
  lineSrc = SRC_NONE;
}
ResultReturn without output
ActionPrint the input diagnostic
ActionSpeak the lineThe speech routine tries its whole-line dictionary, then falls back to letters.
ActionDisplay the line in tactile pagesThe call follows speech and uses five-character pages.
ActionAcknowledge the tagged input sourceBluetooth-tagged input receives its ACK on Serial1; other input receives it on USB Serial.
ResultClear the line and source tag

Technical notes

Speech before tactile output

The line-processing routine calls speech first, then the tactile scrolling routine. Speech checks the entire trimmed line against a fixed dictionary; unmatched text falls back to spoken letters and pauses.

Five cells from four output bytes

The tactile path maps characters to six-dot patterns and pages the text in groups of five. Four buffered bytes are sent through SPI to chained 74HC595 shift registers, with the latch controlling when the output changes.

Buffered serial input

USB Serial and serial Bluetooth feed one shared text buffer. A newline or an idle interval triggers processing, after which the routine acknowledges the tagged input source and clears the buffer. Source inspection establishes the software sequence; physical tactile actuation and accessibility performance were not tested.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project