Froth, and this site, are pre-alpha. This site is largely OSAI-generated documentation from the Froth repo.

Tutorials are for doing one thing end to end. The guide explains the mental model; the reference gives exact behavior. These pages start with a visible goal and stay close to the target.

Start with Blink an LED if you are new to the hardware path. Use Interactive Workflow when you want the edit-loop shape.

The input tutorials split the old button and sensor material into current surfaces:

Use Build a Calculator for a local state exercise, Build a Small Game when you have a Froth Machine nearby, and the Advent of Code pages when you want algorithmic practice without pretending the language is Python.

  1. Blink an LED Connect to a board, configure the LED pin, define a blink word, change it live, and save the image.
  2. Interactive Workflow Use the prompt or editor as a live loop against the device-owned image.
  3. Read a Button Read a digital input, turn it into a boolean, and use it to control visible state.
  4. Read a Sensor Read ADC values, scale them, and turn analog input into board behavior.
  5. Read Inputs Read joystick and knob inputs on the Froth Machine, then map them to display state.
  6. Build a Calculator Build a small local calculator with named operations, memory, and recoverable state.
  7. Fade an LED Use the ESP32 LEDC surface to fade an LED with a named, current-Froth wrapper.
  8. Build a Small Game Turn display, input, and live redefinition into a tiny catch-the-dot game.
  9. Drive a Servo Generate hobby-servo pulses with LEDC and wrap the low-level timing in readable Froth words.
  10. Advent of Code: Safe Dial Solve a small rotation puzzle with current Froth names, Cells, and explicit state.
  11. Advent of Code: Grid Scan Scan a tiny grid with flattened Cells, explicit bounds checks, and neighbor-count helpers.