> ## Documentation Index
> Fetch the complete documentation index at: https://braille.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Switching Between English and Bangla on BrailleBridge

> Toggle BrailleBridge between English and Bangla by holding dots 4, 5, and 6 for 500 ms. The device confirms the change over USB Serial instantly.

BrailleBridge supports two full writing systems — English and Bangla (Bharati Braille standard) — on the same six-dot keyboard. You switch between them with a single held gesture, no menus, no buttons, and no cables. The Teacher Software updates every student's language indicator automatically when the device announces the change over USB Serial.

## The language toggle gesture

To switch languages, hold **dots 4, 5, and 6** together and keep them pressed for at least **500 ms**. The chord value for this combination is `0b111000` (bits 3, 4, and 5 set). As soon as the 500 ms threshold is reached and the keys are still held, the firmware flips the `isBangla` boolean, announces the new language over USB Serial, and waits for you to lift your fingers before resuming normal input:

```cpp theme={null}
// Language toggle detection in the main loop
if (currentChord == 0b111000 && elapsed >= 500 && !allReleased) {
  isBangla = !isBangla;
  Serial.println(isBangla ? "LANG:bn" : "LANG:en");
  chordActive = false;
  currentChord = 0;

  // Wait for all three keys to be released
  while (digitalRead(DOT_4) == LOW || digitalRead(DOT_5) == LOW
      || digitalRead(DOT_6) == LOW) { delay(10); }
  delay(50);
  return;
}
```

A **short press** of dots 4+5+6 (less than 500 ms) is deliberately ignored. The firmware keeps the chord pending, waiting to see whether you hold long enough for a toggle or release early for a normal character. This prevents any accidental language switch mid-word.

## Serial announcements

Every time the language changes, BrailleBridge immediately sends a one-line message over USB Serial at 115200 baud:

* **`LANG:en`** — the device has switched to English mode.
* **`LANG:bn`** — the device has switched to Bangla mode.

The Teacher Software listens for these messages in its serial read loop and automatically updates the language badge shown beside each student's name — no manual action required from the teacher. If you are building a custom integration, you can rely on these messages to keep your UI in sync with the device state.

## Why dots 4+5+6?

The three right-hand dots (`0b111000`) form a chord that does not correspond to any standard English letter, digit, or common symbol in the Bharati Braille dictionary. Choosing an unassigned chord as the toggle means you can type freely in either language without any risk of accidentally triggering a switch — even if you occasionally brush multiple keys at once. The added 500 ms hold requirement makes a double-accidental trigger effectively impossible during normal writing.

> [!NOTE]
>
> BrailleBridge always starts in **English mode** when you power on. If your session needs to begin in Bangla, perform the dots 4+5+6 toggle once after connecting. The `LANG:bn` message on USB Serial confirms you are ready to write Bangla.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.