# Jumperless V5 - Complete Documentation > This file contains the full text of all Jumperless V5 documentation, > intended for use by LLMs and AI assistants. > > Source: https://docs.jumperless.org > Generated from MkDocs source files. --- # Home --- ## What is it? Jumperless V5 lets you prototype like a nerdy wizard who can see electricity and conjure jumpers with a magic wand. It’s an Integrated Development Environment (IDE) for hardware, with an analog-by-nature RP2350B dev board, a drawer full of wires, and a workbench full of test equipment (including a power supply, a multimeter, an oscilloscope, and a function generator) all crammed inside a breadboard. You can connect any point to any other using software-defined jumpers, so the four individually programmable ±8 V power supplies; ten GPIO; and seven measurement channels for voltage, current, and resistance can all be connected anywhere on the breadboard or the Arduino Nano header. RGB LEDs under each hole turn the breadboard itself into a display that provides real-time information about whatever’s happening in your circuit. It's not just about being too lazy to plug in some jumpers. With software controlled wiring, the circuit *itself* is now [***scriptable***](08-micropython.md), which opens up a world of infinite crazy new things you could never do on a regular breadboard. Have a script try out every combination of parts until it does what you want (*à la* [evolvable hardware](https://evolvablehardware.org/)), automatically switch around audio effects on the fly, characterize some unknown chip with the part numbers sanded off, or don't bother with any of that and just [play Doom on it](https://www.youtube.com/watch?v=xWYWruUO0F4). But more likely, you'll be using it to get circuits from your brain into hardware with so little friction it feels like you're just thinking them into existence. So yeah, wizard shit. These are the docs where you will learn how to wield your new powers --- ## If you don't already have one ### [Get the new Jumperless V5 rev 7](https://shop.jumperless.org/products/jumperless-v5-rev-7) Or if you want to save some money and get a refurbished one, ### [Jumperless V5 offcuts](https://shop.jumperless.org/products/jumperless-v5) ### [Get a Jumperless V5 on Crowd Supply](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5) ### [Preorder the ALASKAN BULL WORM! PSRAM Mod Kit](https://shop.jumperless.org/products/alaskan-bull-worm-jumperless-v5-psram-mod-kit) --- ## Getting Started [Image: guide-42] ## Documentation Sections - **[Getting Started](01-getting-started.md)** - What's in the box, the probe, the click wheel, power, measuring, and slots, with follow-along steps - **[The App](03-app.md)** - For talking to your Jumperless, importing from Wokwi, and flashing Arduino sketches - **[OLED](04-oled.md)** - Add a better display - **[Arduino](05-arduino.md)** - UART passthrough and automatic flashing - **[Configuration](06-config.md)** - Persistent settings - **[GPIO](05.7-gpio.md)** - Direction, pulls, PWM, and a binary counter from the board - **[Automation & LLM Tools](07.5-automation.md)** - Drive it from scripts, an MCP server, or an agent skill - **[File Manager](08-file-manager.md)** - Filesystem access, YAML slot file editing, and text editor - **[MicroPython](08-micropython.md)** - Use the onboard MicroPython interpreter - **[Examples](08.5-examples.md)** - The scripts and guided projects that come loaded on the board - **[MicroPython API Reference](09.5-micropythonAPIreference.md)** - All the Jumperless-specific hardware calls - **[Parts Tester](05.5-parts.md)** - Tell it what chips are in the board and it wires and labels them - **[Debugging](07-debugging.md)** - Crossbar, bridge, and net list views - **[Odds and Ends](09.8-odds-and-ends.md)** - Stuff I couldn't think of a good category for - **[3D Printable Stand](10-3d-stand.md)** - Print your own stand - **[Glossary](99-glossary.md)** - Key terms including slots, nodes, bridges, and the W command --- ## Find Me On The Internet --- See what Zack Freedman had to say about it: Apparently he didn't find this site, which makes sense, he was an early backer and at the time, the QR code on the box didn't take you here. --- Watch [Alex Glow](https://alexglow.com/) and [David Groom](https://exposed.ishotjr.com/) screw around with their Jumperlesses for a few hours: This also serves as a cautionary tale for what happens if you don't skim these docs first (which is a completely valid approach, you do you.) --- Me talking to [Ian Buckley](https://www.linkedin.com/in/ianmbuckley/) about Jumperless V5: The hardware was so rudimentary at this point that I would barely even call the thing I was showing there a "V5", it was revision 1 and a *lot* has been done since then. --- Chillin' with [Alex Lynd](https://alexlynd.com/) We're talking about an even earlier set of prototypes, this was shot at both Teardown 2024 and Hackaday Supercon 2024 so it's rev 1 and 2 shown here. --- The OG Jumperless video: Most of the stuff here is relevant as a subset of what Jumperless V5 does. --- [Image: dymo-6s] --- **For AI/LLM tools:** This documentation is available as [llms.txt](/llms.txt) (index) and [llms-full.txt](/llms-full.txt) (complete text) for easy ingestion. --- --- # Getting Started [Image: guide-42] This page walks you through the first hour with a Jumperless V5. Each section ends with a little `Try it` box you can follow along with on the board. If you'd rather just poke at it and come back when something confuses you, that works too. ---- ## What's in the box [Image: the box: the probe, the Jumperless, the SBC adapter and the FPC adapter] - The Jumperless. The breadboard with the RP2350 and 12 crossbar switches underneath it. - The probe. Plugs into the socket on the right side of the board. It has a `Select` / `Measure` switch and two buttons, `Connect` (front) and `Remove` (rear). - The SBC adapter. It plugs into the Nano header and turns it into a Raspberry Pi's 40 pin header (both adapters are in the [Adapter Boards](09.8-odds-and-ends.md#adapter-boards) section of Odds and Ends). - The FPC adapter and a ribbon cable. It brings the DACs, ADCs, GPIO and the UART out to pin headers so you can clip a scope or meter to them, plus 2 Qwiic ports and a spot for a Bus Pirate. It's optional, you don't need it for anything on this page. - A sheet of stick-on rubber feet. These are for the [3D printed stand](10-3d-stand.md), which isn't in the box because it doesn't fit. Two things that are *not* in the box but you'll probably want: a [stand](10-3d-stand.md) and an [OLED](04-oled.md). The OLED copies everything the breadboard LEDs say into actual text, and a few interactions are easier with one. On rev 7 boards it plugs straight into the pin headers on the Jumperless, on rev 5 boards (Crowd Supply and Mouser) it goes on the SBC adapter. ---- ## Plug it in Plug in the USB-C and it will do a startup animation on the LEDs. That's it, it's on. It also shows up on your computer as four serial ports. The first one is the main terminal, where the menu shows up when you type `m` and where most of the typed commands on this site go. You don't *need* the terminal for anything on this page, but it's useful to have open because everything the board prints on the LEDs gets printed there too. The easiest way to open it is [the App](03-app.md), but any serial terminal works. When it boots it loads the last `slot` you were using, so your circuit is still there after a power cycle. ??? tip "Try it" 1. Plug in the Jumperless and watch the startup animation. 2. Open the first serial port in [the App](03-app.md) or a terminal. 3. Type `m` to print the menu, or `?` to see the firmware version. ---- ## The probe Keep the switch on the probe set to `Select`. That's the normal probing mode. [Image: ProbeSelect] `Measure` turns the probe into a voltmeter: the `logo` goes purple, and touching any `row` reads its voltage on the OLED and in the terminal. It uses a temporary ADC connection that never gets saved, so you can poke around without changing your circuit. **The probe is read by a resistive voltage divider**, so putting your fingers on the pads (or the back sides of the 4 risers that connect the `probe sense` boards to the main board) will give you weird readings. If taps land on the wrong row, run `Calibration` > `Probe Pads` from the click wheel menu and follow the prompts (the [Calibration](05.8-calibration.md) page walks through it, and everything else in that menu). ---- ## Connecting rows Click the `Connect` button on the probe. [Image: connectButton] The `logo` turns blue and the probe LEDs change. [Image: connect] Now tap two `row`s and they get connected. Connections are made in pairs (a `bridge`, see the [glossary](99-glossary.md)). When you've tapped the first `row`, the `logo` and the `Connect` text on the probe brighten to show you're `holding` it, and the next thing you tap connects to it. A wire shows up on the LEDs between them. Anything can be an end of a bridge: breadboard rows, the rails (`+` and `-` pads at the ends of the rail strips), the Nano header pins, and the [special functions](#special-functions) pads by the logo. - Click `Connect` while `holding` a row to drop it and start over. - Click `Connect` while not `holding` anything to leave `Connect` mode and go back to `idle` (rainbow `logo`, all 3 probe LEDs on). - Made a connection you didn't mean to? **Double-tap `Remove`** to undo it. See [Undo / Redo](#undo-redo). ??? tip "Try it" 1. Click `Connect`. The logo turns blue. 2. Tap `row 1`, then `row 5`. A wire appears between them. 3. Tap `row 5` again, then the `-` pad on the bottom rail. Now rows 1 and 5 are both on `GND`, and the whole `net` shares one color. 4. Click `Connect` again to get back to idle. ### Connecting with just the click wheel You can also make connections without touching the probe to the board: `Click` > `Connect` > `Add` (or `Remove`), or just turn the wheel while you're already in `Connect` mode. Turning the wheel scrolls a cursor through every `node` (rows, Nano pins, rails, DACs, ADCs, GPIO, UART, current sense), `click` selects the one it's on, `hold` exits. The cursor hides itself after 5 seconds without a turn. ---- ## Removing rows Click the `Remove` button. [Image: removeButton] The `logo` goes red. [Image: remove] Now tap a `row` (or swipe along a few) and it gets disconnected. It only removes that `node` and what's connected directly to it, not everything on the `net`. So tapping a `row 25` that's on `GND` doesn't clear everything on `GND`, but tapping the `-` rail pad does. The special function pads work the same way in `Remove` mode: tap the pad, pick the function, and it's gone. Click `Remove` again to leave. ??? tip "Try it" 1. Click `Remove`. The logo turns red. 2. Tap `row 1`. The wire to row 5 disappears, and row 5 is still on `GND`. 3. Tap the `-` pad on the bottom rail. Row 5 comes off `GND` too. 4. Click `Remove` to get back to idle. ---- ## Undo / Redo Every change to your circuit gets recorded, and there are two ways back through it. **Double-tap `Remove` to undo, double-tap `Connect` to redo.** The `logo` flashes yellow and the OLED shows what got reverted. **To walk back further,** `click` the wheel, find `History`, and `click` in. Now turning the wheel scrubs through every change, two detents a step: clockwise steps back in time, counterclockwise steps forward. The breadboard updates live as you go so you can see each state, and the OLED shows where you are (`3/12`) and what that change was. `Click` the wheel (or press `Connect`) to keep where you stopped, `hold` (or press `Remove`) to go back to where you started. In the terminal, `^` is undo and `&` is redo. The history is saved with your slots, so it's still there after a power cycle. Undo only ever touches the live circuit. ??? tip "Try it" 1. Connect `row 10` to `row 15`, then `row 15` to `row 20`. 2. Double-tap `Remove`. The last wire disappears. 3. Double-tap `Connect`. It comes back. 4. `Click` the wheel, scroll to `History`, `click`, and turn the wheel back and forth. `Hold` to leave it where it was. ---- ## The click wheel [Image: wheel copy] There are two kinds of presses: `click` (short) and `hold` (long). In general a `click` is `yes` / `go in`, and a `hold` is `no` / `back` / `get me out of here`. When I say `click`, it's more of a diagonal push toward the center of the board ([these encoders](https://lcsc.com/product-detail/Rotary-Encoders_Mitsumi-Electric-SIQ-02FVS3_C2925423.html) were meant to poke out a little from the side of a tablet). `Click` to open the menu, turn to scroll, `click` to go into a submenu, `hold` to back out one level. The menu draws on the breadboard LEDs, and it's copied to the terminal and the [OLED](04-oled.md) if you have one. If the text on the LEDs is hard to read, turn up the brightness: `Display Options` > `Bright` > `Menu`, scroll to a level you like, and `click`. ??? tip "Try it" 1. `Click` the wheel. The menu shows up on the LEDs (and the terminal). 2. Turn it to scroll through `Rails`, `Connect`, `Parts`, `GPIO`, `Output`, `Show`, `Apps` and the rest. 3. Scroll to `Display Options` > `Bright` > `Menu` and pick a brightness. `Click` to set it. 4. `Hold` a couple of times to get all the way out. ---- ## Power: rails and DACs There are four adjustable voltage sources: the `top rail`, the `bottom rail`, `DAC 0`, and `DAC 1`. All of them go from -8 V to +8 V. **Rails** are the easiest. `Click` the wheel, pick `Rails`, then `Top`, `Bottom`, or `Both`. Turn the wheel to pick a voltage, `click` to set it, `hold` to cancel. The rail strips light up with the voltage (red for positive, blue for negative), and the `+` pads on the ends of the rails are now that voltage. The `-` pads are always `GND`. **DACs** are the same idea but they're `node`s you connect to a row rather than a whole strip: `Output` > `Voltage` > `DAC 0` / `DAC 1`, pick the voltage, then pick a row. You can also tap the `DAC` pad by the logo while probing (see [special functions](#special-functions)). By default `DAC 0` is busy powering the probe, so `DAC 1` is the one to reach for. **Shortcut:** in idle mode, tap a rail `+` pad to highlight it, then `click` the wheel to adjust that voltage right there. Same for a `DAC`, once it's connected to something. This shortcut is on by default only when an OLED is connected, because the OLED's `adjust?` hint is what makes it discoverable. To have it always on, put this in your [config](06-config.md): Type it into the terminal, backtick and all (the backtick is the config command): ```jython `[clickwheel] rail_click_adjust = always; ``` Rail and DAC voltages are saved with the `slot`, so each circuit keeps its own power settings. ??? tip "Try it" 1. `Click` the wheel, pick `Rails` > `Top`, turn until it says `3.3`, and `click`. The top rail strip lights up. 2. Click `Connect`, tap the top rail `+` pad, then `row 10`. Row 10 is now at 3.3 V. 3. Flip the probe switch to `Measure` and touch row 10. The OLED / terminal reads about 3.3 V. Flip it back to `Select`. ---- ## Special functions The three pads next to the logo, `DAC`, `GPIO`, and `ADC`, are how you connect the internal stuff to your circuit. Tap one while probing and a chooser shows up on the breadboard LEDs (and the terminal / OLED), pick what you want, then tap the row to connect it to. If you were already `holding` a row, it connects there. [Image: gpioTapped] Think of them as `node`s that are in a folder, so there didn't need to be a dedicated pad for each one. ```jython DAC Pad └─ 0 1 [Tap the pads below the selection] └─ -8V !:.:! +8V [Tap the bottom pads or turn the clickwheel to pick a voltage] > [click Connect to confirm] └─ [Tap a row to connect it to] ``` ```jython GPIO Pad └─ ⁱ1⁰ ⁱ2⁰ ⁱ3⁰ ⁱ4⁰ ₁5₀ ₁6₀ ₁7₀ ₁8₀ [Tap a number: left side for input, right side for output] └─ [Tap a row to connect it to] ``` ```jython ADC Pad └─ 0 1 2 3 4 P [Tap an ADC, 0-3 are the general purpose ±8 V ones] └─ [Tap a row to connect it to, and its voltage shows on the LEDs] ``` The four `user pads` (the two little guys and the two buildings) are shortcuts to a fixed set: `top guy` is `UART Tx`, `bottom guy` is `UART Rx`, and the two `buildings` are the current sense inputs `I+` and `I-` (the `buildings` don't always register a tap, so get to `I+` / `I-` with the click wheel instead, see [Measuring](#measuring-things)). You can reassign them in the [config](06-config.md) under `[logo_pads]`. [Image: userPads] ??? tip "Try it" 1. Click `Connect`, then tap the `GPIO` pad by the logo. 2. Tap the right side of the `1` (output). Then tap `row 20`. `GPIO 1` is now driving row 20. 3. Click `Connect` to go back to idle, and tap row 20 to highlight it. Now click `Connect` and watch the row toggle between high and low. 4. Everything here is a normal connection, so `Remove` mode and undo work on it the same way. ---- ## Measuring things A few ways to see what your circuit is doing: - **Just tap it.** Leave the switch on `Select` and tap a connected row, or scroll to it with the click wheel, and the OLED and terminal show the voltage on that net and the current flowing through that connection (the biggest one, if the net has a few wires). The board is measuring voltage and current on every net in the background, so there's nothing to set up. - **The probe's `Measure` switch.** Touch a row, read the voltage. Nothing gets saved. - **The `ADC` pad.** Connect an ADC to a row and it stays there, showing the voltage on that row's LEDs and, if you highlight it, on the OLED / terminal. The ADCs read -8 V to +8 V. - **The `Show` menu.** `Show` > `Voltage` / `Digital` / `Current` picks a measurement and a row to put it on from the wheel instead of the probe. - **Current sense.** In `Connect` mode, turn the wheel counterclockwise past `row 1`. A couple of detents and it wraps onto `Current`, the OLED reads `Current -` and the breadboard spells it out with `I-` lit. One more detent counterclockwise is `I+` (if you overshoot into `UART`, one detent clockwise comes back). `Click` within 5 seconds of the last turn, then tap the row it goes on. With `I+` and `I-` on two different `net`s, a virtual wire with "marching ants" should show the current flowing between them. Or `Show` > `Current` from the menu, which asks for `Pos`, its row, `Neg`, its row (rows and Nano pins only, it can't reach the rail pads). (The background scan puts ants on any wire with current flowing too, the `net_currents` key in the [config](06-config.md) turns it off, and the `current_flow` key set to `electron` makes them march the other way, the numbers stay conventional.) !!! note "Idle mode currents are an estimate" They're read using the crossbar's own resistance as the shunt (about 40Ω per crosspoint) and one ADC is multiplexed across every net, so connecting current sense manually with `I+` / `I-` is a bit more accurate. Your browser does not support the video tag. !!! warning "`I+` and `I-` are shorted together internally" They're the two ends of a 2 Ω shunt resistor. You measure current in series so this is expected, but it's easy to forget. Treat this like your multimeter yelling at you when the probes are in the current holes and it's set to volts. ??? tip "Try it" 1. Set the top rail to 3.3 V (`Rails` > `Top`, see [Power](#power-rails-and-dacs)), then put an LED and a resistor (anything 220 Ω to 1 kΩ) in series between `row 10` and `row 12`, LED long leg toward row 10. 2. With the probe off the board, click `Connect`, tap the top rail `+`, then `row 10`. Turn the wheel counterclockwise past `row 1` until the OLED reads `Current -`, one more detent to `Current +`, `click`, and tap `row 12`. The cursor jumps back to `row 15` after that, so turn counterclockwise again until it reads `Current -`, `click`, and tap the `-` rail pad. 3. The LED lights, and the ants march from `I+` to `I-`. The OLED shows the current as soon as `I+` and `I-` are connected (the net is called `I Sense`), and tapping row 12 in idle mode shows it on the terminal too. ---- ## Idle mode Most of the time the probe isn't in a mode (rainbow `logo`), and there's a lot you can do from here: [Image: idle] - **Tap a row to highlight its `net`.** The row you tapped gets a slightly different animation from the rest of the net. - **Turn the click wheel** to walk the highlight along the rows, as if you tapped each one. - **`Connect`** puts you in `Connect` mode already `holding` the row you tapped, and drops you back to idle once you've connected it to something. (If you got to the row by turning the wheel instead of tapping it, you start out holding nothing.) - **`Remove`** flashes a warning on the highlighted net; press it again within a second or so and you're in `Remove` mode with that `node` already picked. - The highlighted net's voltage and current print on the OLED and the terminal, whatever is on it. A `GPIO` input or an `ADC` on the net shows its reading too. - If it has a **`GPIO` output** on it, `Connect` toggles it high / low. - If it's a **rail or a DAC**, `click` the wheel to [adjust the voltage](#power-rails-and-dacs). - If it's a **`GPIO`**, a quick `click` opens that pin's options. See [GPIO](05.7-gpio.md). - If it's a pin of a **placed part**, the OLED shows the part and pin name. See [Parts](05.5-parts.md). ??? tip "Try it" 1. Tap any connected row. Its whole net lights up. [Image: a highlighted net on rows 40, 50 and 58] 2. Turn the wheel a few detents each way. The highlight walks along the rows. 3. Press `Connect`, tap another row, and you're back in idle with a new wire. ---- ## Slots There are 8 `slot`s (0-7), and each one is a saved circuit: connections, rail and DAC voltages, GPIO setup, colors. Everything you do with the probe saves into the active slot automatically, so you don't have to save anything. Switching slots switches the whole circuit. - `Click` > `Slots` > `Load` picks a slot to switch to. - `Slots` > `Save to` copies the current circuit into another slot. - `Slots` > `Clear` empties a slot. - In the terminal, ` `Slots` > `Save to` > `1`. 2. `Slots` > `Load` > `2`. Empty board (or whatever was in slot 2). 3. `Slots` > `Load` > `1`. Your circuit is back. ---- ## From the terminal Everything above can also be done by typing. Open the first serial port ([the App](03-app.md) does this for you) and type `m` to print the menu. A few to know: ```jython m show the menu again n show the net list (what's connected to what) + 1-5,10-gnd add connections - 1-5 remove a connection x clear all connections < next slot (or <3 for slot 3) p MicroPython REPL / file manager (or /python_scripts/examples/gpio_basics.py to run a script) U show up as a USB drive ``` `p` and `/` take over the terminal, `Ctrl+Q` gets you back out of both. A script you run leaves whatever it connected on the board, `x` clears it. Case doesn't matter in the connection lists (`10-gnd` and `10-GND` are the same thing), and if you send it something that would obviously cause problems, like `TOP_RAIL-GND`, it'll just ignore it and move on. There's more on the netlist format in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/jumperless-probelessly). Type `help` or `[command]?` for the onboard docs on any of them, and `e` to show more of the menu. ??? tip "Try it" 1. Type `+ 1-5` and watch the wire appear on the board. 2. Type `n` to see it in the net list. 3. Type `- 1-5` to remove it. [Image: rows 1 and 5 connected, row 10 on GND, as the board draws it] ---- ## Where to go next - **[Examples](08.5-examples.md)** - the MicroPython scripts and guided projects already on the board. A good next step is the 555 LED flasher project, which shows you where each part of a real circuit goes. - **[The App](03-app.md)** - the terminal, Wokwi import, and Arduino flashing from one place. - **[OLED](04-oled.md)** - add a screen. Cheap, and it makes a lot of this easier. - **[Arduino Stuff](05-arduino.md)** - drop a Nano in the header, flash it through the Jumperless, and let it send commands back. - **[Parts](05.5-parts.md)** - tell the Jumperless what chips are in the board and it wires and labels them for you. - **[GPIO](05.7-gpio.md)** - direction, pulls, PWM, and a binary counter, all from the board. - **[MicroPython](08-micropython.md)** - script the circuit itself. [JumperIDE](https://ide.jumperless.org/) is the easiest way in. - **[Config File](06-config.md)** - every setting, including the ones mentioned on this page. - **[Debug Views](07-debugging.md)** - the net list, bridge array, and crossbar views for when something isn't doing what you expect. - **[Automation & LLM Tools](07.5-automation.md)** - drive the board from scripts, an MCP server, or an agent skill. - **[Glossary](99-glossary.md)** - what I mean by `net`, `node`, `row`, `bridge`, and `slot`. And if you get stuck, ask in the [Discord](https://discord.gg/bvacV7r3FP). Seriously, even the dumb questions help me figure out what to put here. --- # The App ## Installation guide ### The Jumperless App is now on PyPi! The easiest way to get started is an isolated tool install: ```bash uv tool install jumperless # or: pipx install jumperless ``` Plain `pip install jumperless` works too, it just only updates the copy in that Python. Then run it with: ```bash jumperless ``` To upgrade, use the command that matches the install you have: ```bash uv tool upgrade jumperless pipx upgrade jumperless pip install --upgrade jumperless ``` If the version still looks old, `which jumperless` will tell you which install you're actually running. The app repo is at [https://github.com/Architeuthis-Flux/Jumperless-App](https://github.com/Architeuthis-Flux/Jumperless-App) ### Alternative: Download Pre-built Binaries #### Find the latest release [https://github.com/Architeuthis-Flux/JumperlessV5/releases/latest](https://github.com/Architeuthis-Flux/JumperlessV5/releases/latest) The link above will magically lead you to the latest version, and will look something like `https://github.com/Architeuthis-Flux/JumperlessV5/releases/tag/5.7.11.0` **At the bottom under Assets, download the Jumperless App for your OS** ### Windows - `Jumperless-Windows-x64.exe` ### macOS - `Jumperless-macOS.dmg` (universal, signed and notarized) ### Linux - `Jumperless-Linux-x86_64.AppImage` (if you're not sure which flavor of Linux, use this one) - `Jumperless-Linux-x64.tar.gz` as a fallback if the AppImage won't run ### Launcher - `Jumperless-Launcher-Windows.zip`, `Jumperless-Launcher-macOS.zip`, `Jumperless-Launcher-Linux.zip` (see Launch Scripts below) ### Python 1. download `JumperlessWokwiBridge.py` and `requirements.txt` 2. open your favorite terminal, navigate to the folder where you downloaded the two files above. 3. `pip install -r requirements.txt` # run this command to install the needed Python libraries 4. `python3 JumperlessWokwiBridge.py` # open the app, will update firmware if there's a newer version --- Now that I've lifted my self-imposed ban on VT100 commands (for compatibility and me-spending-too-much-time-on-them reasons, but, YOLO), we've got colors now! But that's like the *least* cool thing the new app can do, here's a list of what's new: ## What It Does - **Firmware updating** should be pretty reliable when there's a new version (falls back to instructions for how to do it manually) - **Command history and tab completion**, up arrows will go through past commands and are persistent after closing - **Properly detects** which port is the main Jumperless Serial and which is routable UART - **Arduino flashing from [Wokwi](https://wokwi.com/)** works once again and is a lot more solid - It installs [arduino-cli](https://github.com/arduino/arduino-cli) on first startup and uses it pull in libraries, compile, and flash an arduino Nano in the header - When a flash starts, the Jumperless itself connects the UART to the Nano's D0/D1 if they aren't already connected. That happens for any flasher (the app, Arduino IDE, arduino-cli) because the board just watches for the DTR reset pulse, and it's the `[serial_1] autoconnect_flashing` config setting, on by default. The connections are left in place afterwards, use `a` if you want them gone - [avrdude](https://github.com/avrdudes/avrdude) output is shown in real time (you'd be amazed how difficult this was) - **Direct Wokwi circuit import** - Copy diagram.json from Wokwi and import it with the `W` command (see below) - **No longer a janky pile of garbage** ## Local Arduino Sketch Support **You can set a `slot` to point to a local Arduino sketch.ino file and it will flash if it detects a change** - If you don't like using Arduino IDE or Wokwi and prefer using `vim` or `emacs` or whatever, now you can let the app handle the flashing stuff and just edit an .ino file. - In the app, type `menu` then `slots` and instead of entering a link to a Wokwi project, just give it a path to a file (this will be saved so you can unassign it and pick it later by name) - (This one is so fucking sick) ## Launch Scripts - The launcher bundles (`Jumperless-Launcher-Windows/macOS/Linux.zip`) are a tiny clickable app that installs or updates the `jumperless` PyPI package with uv and then runs it in the system default terminal (Terminal.app on macOS, Windows Terminal or cmd on Windows, gnome-terminal/konsole/xfce4-terminal/xterm on Linux) - It doesn't kill or close other instances that happen to be open - To run it in your favorite terminal emulator instead ([tabby](https://tabby.sh/), iTerm2, whatever), just open that terminal and type `jumperless` (or `python3 JumperlessWokwiBridge.py` if you downloaded the script) - Linux people are no longer red-headed stepchildren, there's a single-file AppImage now for you nerds, with a tar.gz as a fallback --- ## Importing Circuits from Wokwi You can design circuits in the [Wokwi online simulator](https://wokwi.com) and import them directly to your Jumperless with the `W` command, or use the Jumperless App and it'll pull it from your project automatically and live update. This has been around since the OG Jumperless, there's a demo in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/jumperless-probelessly). ### Direct Link Import You can now just dump a Wokwi link into the app at any time and it'll work: ``` Menu ~~~~~ x = clear all connections + = add connections - = remove connections https://wokwi.com/projects/424432011346848769 Enter a name for this new project: cool project zone ✓ Saved 'cool project zone' to project library ✓ 'cool project zone' assigned to active slot 0 URL: https://wokwi.com/projects/424432011346848769 The project will start updating automatically ``` ### How to manually Import from Wokwi 1. **Design your circuit** on [wokwi.com](https://wokwi.com) 2. **Click on the `diagram.json` tab** in the Wokwi editor 3. **Copy all the JSON content** (Ctrl+A, Ctrl+C or Cmd+A, Cmd+C) 4. **In Jumperless, type `W`** and press Enter 5. **Paste the JSON** (Ctrl+V or right-click → Paste) 6. The parser automatically detects when the JSON is complete and imports it! ### Supported Wokwi Components - **Half breadboard** - Wokwi's breadboard maps directly to Jumperless rows. Top rows 1-30 are rows 1-30, bottom rows 1-30 are rows 31-60. The column letter is ignored, all five holes in a row are one node anyway. The top `+` rail maps to `TOP_RAIL`, the bottom `+` rail to `BOTTOM_RAIL`, and both `-` rails to `GND` - **Arduino Nano** - D0-D13 and A0-A7 map to the Nano header nodes. GND maps to the `GND` net, 5V (or VCC) to `TOP_RAIL`, and 3V3 to `BOTTOM_RAIL`, so wires to those pins do make real connections. RESET, AREF, VIN and RX/TX are ignored - **Logic Analyzer** - Channels map to GPIO: D0-7 → GPIO 1-8 - **Wire colors** - Wokwi wire colors preserved - **Rail voltages** - Detected from text labels in Wokwi - **VCC and GND Nodes** - VCC maps to `TOP_RAIL`, GND maps to `GND` [Image: LogicAnalyzerMappingV5] **Note:** The app still works with the OG Jumperless and those original mappings remain the same. ### Wire Color Mapping **Wire colors will match the ones you set in Wokwi!** The new Wokwi parser sends the entire `diagram.json` from Wokwi and parses it on the Jumperless, which means color information gets preserved. [Image: wokwiColor-2] [Image: wokwiColor-1] All Wokwi wire colors are preserved and displayed on the breadboard LEDs: `red`, `orange`, `yellow`, `green`, `blue`, `violet`, `purple`, `magenta`, `pink`, `cyan`, `white`, `gray`, `grey`, `black`, `brown`, `limegreen`, `gold` A couple of them land on the same LED color: `gold` looks the same as `orange`, and `pink` the same as `magenta`. A color name that isn't in the list shows up as a dim white. **Note:** Black wires let the Jumperless auto-assign a color. If you leave all the wires green (the default in Wokwi) or make a wire black, it'll just auto assign colors. **About color assignment:** There is some weirdness because colors in Wokwi are applied to `bridges` (a pair of `nodes`) while color in the Jumperless gets assigned to `nets` (a collection of connected `nodes`). So if you have a bunch of things electrically connected together with different wire colors, it'll use the first colored wire it finds in that net and drop the rest. ### Rail Voltage Detection Add a text label in your Wokwi diagram to specify rail voltages: ``` top rail 5.5V bottom rail 3.5V ``` The Jumperless parser will automatically detect these values and set the rails accordingly It's not picky about the format, `TOP RAIL = 5V`, `top_rail: 4.5V`, `toprail 3v3`, `bot rail 2.5V` and `BOTTOM_RAIL = -5V` all work, and negative voltages are fine. A label like `VCC = 5V` sets the top rail if there's no top rail label. ### Command Variants ``` W # Paste JSON, save to active slot W 5 # Paste JSON, save to slot 5 W /file.json # Load from file, save to active slot W /file.json 5 # Load from file, save to slot 5 ``` ### After Import Use `<` to cycle through slots to activate your imported circuit, or `<5` to jump straight to slot 5. An import into the active slot is applied to the hardware immediately, an import into another slot just sits in that slot's file until you select it. ## Terminal Compatibility Or you can use any terminal emulator you like, [iTerm2](https://iterm2.com/), [xTerm](https://invisible-island.net/xterm/), [Tabby](https://github.com/Eugeny/tabby), [Arduino IDE](https://www.arduino.cc/en/software/)'s Serial Monitor, whatever. The TUI is all handled from the Jumperless itself so it just needs something to print text. --- # OLED Support First, get yourself one of these bad boys (literally any of these are fine.) [[Image: oled Medium]](https://www.amazon.com/dp/B0CDWQ2RWY/) https://www.amazon.com/MakerFocus-Display-SSD1306-3-3V-5V-Arduino/dp/B079BN2J8V [Image: batchone-11] Ignore the really cool LEDs. ## Installation They should friction fit into the SBC/SMD/OLED board included with your Jumperless V5. That's how rev 5 boards (the Crowd Supply and Mouser ones) do it, and the OLED talks to GPIO 7 and 8 through the crossbar to rows `D2` and `D3`. Rev 7 boards have dedicated OLED headers on the internal I2C bus instead, so the firmware finds the display by itself at boot and no rows or routable GPIO get used up. If you have one of those, the `Connection`, `Lock Connection` and GPIO stuff below doesn't apply to you. ??? note "Where the OLED goes" Rev 7 boards have 2 OLED headers (4 pins each), one at each end of the Nano header between the two rows. Either one works, they're on the same bus. On the `D12` end it lies across the Nano header: [Image: an OLED in the header at the D12 end of the Nano header, lying across it] On the `VIN` end it sticks out past the edge next to the USB-C: [Image: an OLED in the header at the VIN end of the Nano header, sticking out past the edge by the USB-C] On rev 5 boards it goes in the 4 pin column at the bottom left of the SBC/SMD/OLED board (the [SBC adapter](09.8-odds-and-ends.md#sbc-adapter)), with that in the Nano header: [Image: the SBC adapter with the OLED spot marked] [Image: the SBC adapter with an OLED plugged into it] This should copy basically any text printed on the breadboard, some people have trouble reading text on the breadboard LEDs, which is why I added all this. ## Connection To connect the data lines to the Jumperless' GPIO 7 and 8, just use the menu option `.` (that's a period). Press it again to disconnect and free up GPIO 7 and 8, or use `.1` and `.0` to force it on or off. If no display answers, the routing stays put and the firmware keeps checking for one every few seconds. In the click menu the same things live under `OLED`: `Connect`, `Connect On Boot`, `Lock Connect` and `Show in Term`. `Show in Term` (or the `k` command, or `` `[top_oled] show_in_terminal = port_1;``, which also takes `off`, `port_3`, `port_5`, `port_7` and `uart`) mirrors whatever's on the OLED into your terminal. `t` opens an OLED terminal where anything you type goes straight to the display. ## Auto-Connect on Boot The OLED gets connected on startup by default. If you'd rather it didn't, paste this into the main menu: Type it into the terminal, backtick and all (the backtick is the config command): ``` `[top_oled] connect_on_boot = 0; ``` The full list of `[top_oled]` keys with their current values is on the [config page](06-config.md). ## Lock Connection Locking the connection to the OLED ensures that it stays connected even when you enter a complete `node` list. So if you're using Wokwi or manually adding connections in a file, you don't need to add `GPIO_7 - D2` and `GPIO_8 - D3` to keep the I2C connected to the OLED. ``` `[top_oled] lock_connection = 1; ``` This only matters when the OLED is on the crossbar (the `gpio_7_8` or `custom` connection types) - the hardwired RP6/RP7 and internal I2C connections have no routing to lose. ## Custom Startup Message You can customize what appears on the OLED when your Jumperless boots up. There are two options: text messages or custom bitmap images. ### Text Message Set a custom text message to display on the OLED at startup (max 32 characters): ```jython `[top_oled] startup_message = Your Message Here; ``` This shows up instead of the Jumperless logo on boot, in big text. Once you start using the board, the usual idle logo comes back. ### Bitmap Image Display a custom bitmap image at startup by just giving it a path on the filesystem. ```jython `[top_oled] startup_message = /images/mylogo.bin; ``` **Requirements:** - Image must be a bitmap file (`.bin` format), either with the 4-byte header (recommended) or raw at 512, 1024, 256 or 496 bytes - Recommended size: 128×32 pixels (standard OLED size) - Use the built-in [Bitmap Editor](#bitmap-editor) to create or edit images - Store images in the `/images/` directory on the Jumperless filesystem ## Display Dimensions If you have a different sized OLED (like 128x64), you can set the dimensions: ```jython `[top_oled] width = 128; `[top_oled] height = 64; `[top_oled] rotation = 0; ``` `rotation` goes 0 to 3 in 90 degree steps. If your display sits at some other I2C address, set `` `[top_oled] i2c_address = 0x3C;`` to whatever it actually is. The click menu can do the size too: `OLED` > `Display Size` > `Width` or `Height`, with `32`, `64`, `128`, `256` and `Custom`. ## Advanced GPIO Configuration You don't set the GPIO and row keys by hand - pick a connection type and the firmware fills them all in for you. The exception is the `custom` type, which uses whatever you put in `` `[top_oled] sda_pin = 26;`` and `` `[top_oled] scl_pin = 27;``. Those two are refused on the internal I2C bus, which is hardwired to GPIO 4 and 5. ## Connection type There are four of them. `gpio_7_8` runs the OLED through the crossbar to rows `D2` and `D3` (the rev 5 default), `rp6_rp7` uses the hardwired GPIO 6 and 7, `i2c0` (also spelled `internal`) uses the internal I2C bus on GPIO 4 and 5 that rev 7 boards have their OLED headers on, and `custom` uses the `sda_pin`/`scl_pin` you set yourself. ```jython `[top_oled] connection_type = rp6_rp7; ``` The `O` command cycles through GPIO 7/8, RP6/RP7 and internal I2C0, or you can jump straight to one with `O0` through `O3` or a name like `O i2c0`. In the click menu it's `OLED` > `Pins`, with `GPIO7/8`, `RP6/7` and `Intrnal`. ## Bitmap Editor The built-in bitmap editor lets you create and edit OLED images directly on your Jumperless using your terminal and the clickwheel. Your browser does not support the video tag. ## Accessing the Bitmap Editor ### From File Manager 1. Open the file manager from the main menu 2. Navigate to a `.bin` bitmap file 3. Select the file to open it in the editor ### Creating a New Image You can create a new bitmap file from the file manager: 1. Navigate to where you want to create the file (e.g., `/images/`) 2. Press `n` for "new file" 3. Name it with a `.bin` extension (e.g., `mylogo.bin`) 4. Open the new file (Enter or `click`) - `n` only creates it, opening it is what starts the editor 5. The editor sees the empty file and makes a blank 128×32 bitmap (or whatever your OLED dimensions are set to in config) `.bmp` files open in the editor too. ## Editor Interface The bitmap editor displays your image in the terminal and on the OLED (if connected). You'll see: - **Main canvas**: Your bitmap rendered using block characters - **Status bar**: Filename, dimensions, cursor position, and save status - **Menu bar**: Quick access to View, Encoder, Draw modes, Save, and Quit - **Help panel**: Keyboard shortcuts and hardware control reference ### View Modes Press `m` to cycle through three display modes: 1. **Full Block Mode** (1:1 pixel mapping) - Each character = 1 pixel 2. **Half Block Mode** (2:1 vertical compression) - Each character = 2 pixels vertically - Fits 128×32 images on smaller terminals 3. **Quarter Block Mode** (2×2 compression) - Each character = 2×2 pixels (4 pixels total) - Fits larger images on screen ## Navigation ### Moving the Cursor **Keyboard:** - Arrow keys or `W/A/S/D` keys - Vim keys: `j` (down), `k` (up), `l` (right) **Hardware:** - **Clickwheel encoder**: Rotate to move cursor - **Probe switch**: - `Select` position → Horizontal movement - `Measure` position → Vertical movement - Press `/` to toggle encoder direction (H/V) independently ## Editing Pixels ### Editing Methods The editor has three draw modes (cycle with `.` key) to pick what happens when you press `enter`/`space`/`encoder click`: 1. **Toggle Mode** (default): Flips pixel state (ON↔OFF) 2. **Set Mode**: Always turns pixels ON (draw) 3. **Clear Mode**: Always turns pixels OFF (erase) Or just use these keys to do it directly and not worry about the mode: - `z` = Set pixel (turn ON) - `x` = Clear pixel (turn OFF) - `c` = Toggle pixel ## Menu Bar Navigation When the cursor reaches the bottom edge and you press down, you enter the menu bar: **Navigation:** - Left/Right arrows: Move between menu items - Enter/Space: Activate selected item - Up: Exit menu bar **Menu Items:** - **View**: Cycle display modes (Full/Half/Quarter) - **Enc**: Toggle encoder direction (H/V) - **Draw**: Cycle draw modes (Toggle/Set/Clear) - **«Save»**: Save file and return to editing - **«Quit»**: Exit editor (prompts if modified) ## Saving and Quitting - **Ctrl+S**: Quick save - **Ctrl+Q**: Quit (prompts to save if modified) - **h or ?**: Show help screen A new file gets the 4-byte header (width and height) when you save, and a file that already had one keeps it. A raw headerless file is saved back raw, which still works as a startup image at the common sizes. ## Example Workflow: Creating a Startup Logo 1. Open file manager, navigate to `/images/` 2. Create new file: `mylogo.bin` 3. Open it - the editor starts with a blank 128×32 canvas 4. Switch to Half Block mode (`m`) for better overview 5. Use clickwheel to navigate, Connect button to draw 6. Save with Ctrl+S 7. Set as startup image: - By editing the config file: ``` `[top_oled] startup_message = /images/mylogo.bin;``` - Or use the click menus `OLED` > `StartUp Messge` > `Bitmap` > (scroll through all the images and `click` to select) 8. Reboot to see your custom logo. Picking it in the menu previews it right away; after boot the idle screen goes back to the standard logo. ## Editor Screenshots Full size view (1:1 pixel mapping): ```jython ███████ ██████ ███████ ██ ██ ██████ █████ ███ ██ ██ ██ █ █ ██████ ██████ ████ ██ ██ ██ ██ █ █ ███ ██ █████ ███ ████ ████ ██ ████ █ █ ██ █ █ █ ██ ██ █ ██ █ ████ █ ██ ███ ██ ███ ███ █ ██ ██ █ ██ █ ██ █ ██ ██ ██ █ ███ ██ █ █ ███ █ ██ ██ ██ ██ ██ █ ████ █ ██ █ ██ ██ █ █ █ █ █ █████ █ ██ █ ████ ████ █ ████ ██ ██ █ ██ █ █ █ █ ████ █ ██ █████ █ ██ █ █████ ██ ████ ██ ████████ ██ █ ██ █ █ ██ █ █████ █ ███████ █████ █ ██ █ ████ █ █████████ █████ ██ █ ██ █ ██ █ ██████ █ █████ █ █ ██ █ ███ █ ██ █ ████ ████ ███ ██ █ ███ █ ██ █ ██ ██ █ ███ ██ █ █ █ ██ █ ███████ ██ ███ █ ██ ██ █ ███ █ █ █ █ █ █ ██ ██ █ █ █ ██ ██ ██ ████ ███ ██ █ ██ █ ███ █ █ █ █ █ ██████ ██ █ █ █ ██ ██ █ ██ ██ ███ ██ ██ █ ████ █ █ █ █ █ ██ ████ █ ██ █ ██ ██ █ ███ █ ████ ██ █ █ ████ █ █ █ ██ █ █ █ ████ ███ █ ██ ██ ████ ██ ████ █ █ ██ ███ █ █ ████ █ █ ██ ███ ███ █ █ █████ ████ █ ███████ █ ██ █ ███ █ █ █ ███ █ ██ ██ ████ █ █ ████ ███ ███ ████ █ █ █ ███ ██ █ █ ██ ██ ████ ██ ███ █ █ █ ███████ ███████ ██ ██ █ █ █ ███ ██ █ ██ ██ ██ ███ █ ██ █ █ ████ ████ ████ ██ █ █ ████ █ █ █ ██ ██ ██ █ ████ ██ █ ██ ██ █ ████ ██ ██ ██ █ ██ ██ ██ █ ██ ██ █████ █ ██████ ██ ███████ █ ███ ███ ██ █ ██ █ █ █ ███ ██ ███ ████ █ █████ ██ ██ ███ ██ ██ █ ██ ███ ██ █ █ ██ ███ █ ██ █ ██ ██ ██ ███ █ █ ████ ████ ██ █ ████ █ █ █ █ █ █ ██ ██ ███ ██ ███ ███████ ██ ██████████ █ █ ██ ██ █ █ █ █ █ ██ ████ ████ ████ ██████████████ ███████████ █████████ █ ██ ██ ██ █ █ ██ ███ ██ ███ ███████████ ██████████████████ ████████ █████████ ███████ ██ ██ ███ ██ ██ ██ ████████████ ███████████ █████ █████ █████████ ██████ ██████ ██ ██ ████████ ██████ █████ █████ █████████ ███ ███ ██████ ███ ███ ██████ ████ ███ ███ █████ █████████ ████ ██ ███████ /images/bubbleJump.bin | 128x32 | (64,16) | Saved View:Full | Enc:V | Draw:CLR | «Save» | «Quit» ⟨Clickwheel > ↺ / ↻: move H/V | Click: toggle pixel ⟩ ⟨ Probe Buttons > Connect:set | Remove:clear | Switch > Select:H | Measure:V ⟩ ⟨Terminal > [z]:set [x]:clear [c]:toggle pixel | [m]:Cycle View | [/]: Enc H/V | ctrl+S:Save | ctrl+Q:Quit | [?]:Help ⟩ ``` Half Block view (2:1 vertical compression - each character is 2 pixels tall): ```jython ▄▄▄▄▄▄ ▄▄▄▄▄▄▄ ▄▄▀▀▀▀▀▀█▄ ▄▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▀▀▀▀▀█▄ ▄█▀▀▀█▄ ▄█▀▀ ▀█ ▄▀▀ ▀█▄▄▀ █▄ ▄█▀▀▀█ ▄▄▄▄ ▄▀▀█▄ ▄▄▄ ▄█▀▀█▄▄▀▀▀▀ ▀█▄▄▀▀▀▀ ▀▄▀ ▀█▄▀ █▄ ▄▀ ██ █▀ ▄▄ █ ▄█▀ █▀ ▀█▄▀ ██▀ ▀█ █ █ ▀█▀ █ ▄▄▄▄▄ ▀█ ██ █▀ ▄▄██ ▄██▄ █ ████ ▄█ ██ █ ██ █ █ ▄█ █ ▄████ █ ▄▄▄▄▄██ █████ █ ██ █ ▄███▀▀ ▀█ ████▄▄▄██ ▀█████▀▀ ██ █ ██▄ █ ██ █ ██▀▀██ █ ███▀▀ █▄ █ ▀█ █ ██▀ █ ██▄▄▄▄▄ █▄ ▀███ ▀▀▀█ ▀▀█▄ ██ █ ███ █ ▀ █ █ █ █ ██▄▄▄▄ ██ █ █ █ ██ ██ ▀▀ ▀█▀█▄ ▀▀█▄ ▀█▄▄ █▄ ▀█ █ ████ █ █ ▀▄ ▄█ █ ▀▀ ▀█▀█ █▄▄█▀ ▄█▄ █▀ ██ ▄█ ▀▀█▄▄▄ █▄ ▀███▄ ▀█ █▄ ▀█ ███ █ ▄ █ ███▀ █ ▄█ ▄█ ▀▀▀ ▄███ █ █ ▄███▀▀ ▀███ █▄█▀▀████ █ █ █ ███ ██ █ ▄█ ██ ██ ▄██▀▀ ▀█ ██▀ █ █ ▄▄▄█ ████▀▀█▄▄█▀▀▀██▀ █▀ ▀▀ █ ▄█▀▀█▄ █ █▄ ▀ ██ ██▄██ █ ▄▄▄▄▄█▀██ ██▄▄▄▄▄ █ ██▄ ▀█▄█ ██▀▀ ▀█ ▀▀ ██ █ █▀ █ ▀█▀ ██ ███ █▀██ █ ▀██▀▀ ██ ▀▀ ▀██ ██▄ ▀█ █ ▄██▄ ███▄ ▄█▀ █ █▀██ ▄█ █ █ █ █ █ ▀█▄ ▄██▄ ███▄ ▄██▄ ▄▄███▄▄▄▄▄▄███▀███▄▄▄▄▄▄▄█▀ ▀█████████ █▄ ██ ██▄ ▄█▀ █▄ ▄█ ██▄▄███▄▄▄██ ▀██▄▄▄▄▄████▀▀█████ ▀█████▀▀█████████▀ ▀██████▀ ▀▀██████▀ ▀▀▀▀▀▀▀ ██▄ ▄██ ▀██████▀ ▀████▀ ▀███▀ ▀███▀ ▀█████▀▀▀ ▀▀▀ ▀▀▀ ▀▀▀▀▀▀ ▀███████▀ ▀▀▀▀ ▀▀ /images/bubbleJump.bin | 128x32 | (64,16) | Saved View:Half | Enc:V | Draw:CLR | «Save» | «Quit» ⟨Clickwheel > ↺ / ↻: move H/V | Click: toggle pixel ⟩ ⟨ Probe Buttons > Connect:set | Remove:clear | Switch > Select:H | Measure:V ⟩ ⟨Terminal > [z]:set [x]:clear [c]:toggle pixel | [m]:Cycle View | [/]: Enc H/V | ctrl+S:Save | ctrl+Q:Quit | [?]:Help ⟩ ``` Quarter Block view (2×2 compression - each character is 4 pixels): ```jython ▄▄▄ ▄▄▄▖ ▗▞▀▀▜▖ ▄▄▄ ▗▄▄▖▗▄▞▀▀▙ ▟▀▜▖ ▗▛▘ ▝▌▗▀ ▜▄▘ ▙ ▟▀▜▗▄▖ ▞▜▖▗▄ ▗▛▜▄▀▀ ▝▙▞▀▘ ▚▘ ▝▙▘ ▙ ▗▘ ▐▌ ▛ ▄ ▐ ▗▛ ▛ ▜▞ █▘▝▌▐ ▌ ▜▘ ▐ ▗▄▄ ▜ █ ▛ ▄█ ▟▙ ▌ ▐█▌ ▟ ▐▌ ▌ ▐▌ ▐ ▌▟ ▌ ▟█▌ ▐ ▗▄▄█ ██▌ ▐ █ ▌ ▗█▛▘▜ ██▄▟▌ ▝██▛▘ █ ▌ ▐▙ ▐ ▐▌ ▌ █▀█ ▐ █▛▘▐▖ ▌ ▜ ▐ ▐▛ ▌ ▐▙▄▄▐▖ ▝█▌▀▜ ▀▙ ▐▌ ▌ ▐█ ▐ ▘ ▌ ▌ ▐ ▐ █▄▄▐▌ ▐ ▐ ▐ ▐▌ █ ▝▘ ▝▛▙ ▀▙▝▙▖ ▐▖ ▝▌ ▌ ▐█▌ ▐ ▌ ▚ ▟ ▐ ▀ ▝▛▌ ▐▄▛ ▟▖ ▐▘ █ ▗▌▝▜▄▖ ▐▖▝█▙ ▜ ▙ ▜ █▌ ▐ ▖ ▌ ▐█▘ ▐ ▗▌▟ ▝▀ ▗█▌ ▐ ▐ ▟█▀ ▜█ ▙▛▜█▌ ▐ ▐ ▐ █▌ ▐▌ ▌▗▌ █ █ ▗█▀ ▜ █▘▌ ▐ ▄▟ ██▀▙▟▀▜▛ ▛ ▀ ▐ ▟▀▙▐ ▐▖ ▝ ▐▌ █▟▌ ▐ ▄▄▟▜▌ ▐▙▄▄▐ ▐▙ ▝▙▌ ▐▛▘▝▌ ▝▘ ▐▌ ▌ ▛ ▌ ▝▛ ▐▌ █▌ ▐▜▌ ▐ ▜▛▘▐▌ ▀ ▝█ █▖ ▝▌ ▌ ▟▙ ▐█▖ ▟▘ ▌ ▛█ ▗▌▌ ▐ ▌ ▐ ▐ ▝▙ ▗█▖ █▙ ▗█▖ ▗▟█▄▄▄█▛█▙▄▄▄▛▝████▌ ▙ ▐▌▐▙ ▟▘▙ ▟ █▄█▙▄█ ▜▙▄▄██▀██▌▜██▀████▛▝███▘ ▝▜██▛ ▝▀▀▀ ▐▙ ▗█ ▜██▛ ▜█▛ ▜█▘▜█▘ ▝██▛▀ ▝▀ ▀▘ ▝▀▀▘ ▜███▘ ▀▀ ▀ /images/bubbleJump.bin | 128x32 | (64,16) | Saved View:Qtr | Enc:V | Draw:CLR | «Save» | «Quit» ⟨Clickwheel > ↺ / ↻: move H/V | Click: toggle pixel ⟩ ⟨ Probe Buttons > Connect:set | Remove:clear | Switch > Select:H | Measure:V ⟩ ⟨Terminal > [z]:set [x]:clear [c]:toggle pixel | [m]:Cycle View | [/]: Enc H/V | ctrl+S:Save | ctrl+Q:Quit | [?]:Help ⟩ ``` The output of `?` ```jython === Bitmap Editor Help === Navigation: Encoder wheel - Move cursor (H or V mode) Arrow keys / WASD - Move cursor j/k/l (vim) - Move cursor Down at bottom edge - Enter menu bar Editing: Encoder click - Apply current draw mode at cursor Enter / Space - Apply current draw mode at cursor Connect button HOLD - Set pixels while held (draw lines) Remove button HOLD - Clear pixels while held (erase lines) Direct Pixel Actions (keyboard): z - Set pixel at cursor (draw) x - Clear pixel at cursor (erase) c - Toggle pixel at cursor Draw Mode Control: . - Cycle draw modes (Toggle/Set/Clear) Hardware Controls: Probe switch SELECT - Encoder horizontal movement Probe switch MEASURE- Encoder vertical movement Display: m - Cycle view mode (Full/Half/Quarter) / - Toggle encoder H/V movement Menu Bar (Down at bottom edge): Left/Right arrows - Navigate menu items Enter / Space - Activate menu item (cycle/Save/Quit) Up / Escape - Exit menu bar Menu Bar Items: View - Cycle display mode (Full/Half/Quarter) Enc - Toggle encoder direction (H/V) Draw - Cycle draw mode (Toggle/Set/Clear) «Save» - [Button] Save file and exit menu «Quit» - [Button] Quit editor (prompts if modified) File: Ctrl+S - Save file Ctrl+Q / ESC - Quit (prompts if modified) h / ? - Show this help Cursor Colors: Green background - Pixel is OFF Red background - Pixel is ON ``` ## Bitmap File Format The editor works with `.bin` files in two formats: **With Header (Recommended):** - 2 bytes: Width (16-bit little-endian) - 2 bytes: Height (16-bit little-endian) - Remaining: Bitmap data (MSB-first, row-major) - Example: 128×32 = 4 header + 512 data = 516 bytes total **Raw Format:** - Just bitmap data, dimensions inferred from file size - 512 bytes → 128×32, 1024 bytes → 128×64, etc. The editor only writes a header if the file already had one, or if it's a new file - a raw file stays raw. ## Converting External Images Want to use your own images? The JumperlOS repository includes Python scripts to convert PNG/JPG images to OLED bitmaps: **Location:** `JumperlOS/scripts/image_to_oled_bitmap.py` **Usage:** ```bash python image_to_oled_bitmap.py input.png output.bin --width 128 --height 32 ``` The script will: 1. Resize your image to fit the OLED dimensions 2. Convert to 1-bit (black/white) format 3. Save with proper header format 4. Output is ready to use as a startup image or edit in the bitmap editor Then you can mount your Jumperless's filesystem as a mass storage device with `U` and drop it into the `/images/` folder. ### Check out the [`/scripts` folder](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts) in the [JumperlOS repo](https://github.com/Architeuthis-Flux/JumperlOS/tree/main), there are a few other scripts related to dealing with bitmaps. --- ## Using the OLED from MicroPython The OLED display has a comprehensive MicroPython API for programmatic control. You can display text with multiple fonts and sizes, show bitmaps, manipulate pixels directly, and even redirect Python's `print()` output to the OLED. ### Quick Start ```jython import jumperless as j import time # Basic text display j.oled_connect() j.oled_print("Hello!", 2) time.sleep(2) j.oled_clear() ``` ### Text Sizes and Scrolling The OLED supports three text size modes: - **Size 0**: Small scrolling text - perfect for terminal-like output with multiple lines - **Size 1**: Normal centered text - **Size 2**: Large centered text (default) ```jython import jumperless as j import time # Set default text size j.oled_set_text_size(0) # Small scrolling text # Display multiple lines for i in range(10): j.oled_print(f"Line {i+1}") time.sleep(0.3) # Switch to large text j.oled_set_text_size(2) j.oled_print("BIG TEXT") ``` ### Print Redirection for Debugging One of the most useful features is print redirection - all `print()` statements can automatically appear on both the serial console **and** the OLED: ```jython import jumperless as j # Enable print copying j.oled_copy_print(True) # These appear on both serial AND OLED print("Starting test...") voltage = j.adc_get(0) print(f"Voltage: {voltage:.2f}V") print("Test complete!") # Disable when done j.oled_copy_print(False) ``` Print copying and the default text size go back to their defaults (off, size 2) after a script finishes running. If you turned them on from the REPL they stay on until you run a script or reboot. This is perfect for debugging projects where you don't have easy access to the serial console. ### Multiple Fonts Choose from 11 different font families: ```jython import jumperless as j # List all available fonts fonts = j.oled_get_fonts() print(fonts) # Set a fun font j.oled_set_font("Jokerman") j.oled_print("Fun!", 2) # Switch to monospace for code j.oled_set_font("Courier New") j.oled_print("Monospace", 2) ``` ### Display Bitmaps Show bitmap images stored on the filesystem: ```jython import jumperless as j # One-liner to display a bitmap j.oled_show_bitmap_file("/images/jogo32h.bin", 0, 0) # Or load and display separately j.oled_load_bitmap("/images/logo.bin") j.oled_display_bitmap(0, 0, 0, 0) ``` ### Graphics and Pixel Control For custom graphics, you can manipulate individual pixels: ```jython import jumperless as j # Draw a box j.oled_clear() for x in range(20, 108): j.oled_set_pixel(x, 10, 1) # Top j.oled_set_pixel(x, 22, 1) # Bottom for y in range(10, 23): j.oled_set_pixel(20, y, 1) # Left j.oled_set_pixel(107, y, 1) # Right j.oled_show() ``` ### Advanced: Direct Framebuffer Access For maximum control, you can read and write the entire framebuffer: ```jython import jumperless as j # Get display dimensions width, height, size = j.oled_get_framebuffer_size() print(f"Display: {width}x{height}, {size} bytes") # Capture the screen fb = j.oled_get_framebuffer() # Save to file with open("/screen_capture.bin", "wb") as f: f.write(fb) # Restore later with open("/screen_capture.bin", "rb") as f: fb_data = f.read() j.oled_set_framebuffer(fb_data) ``` ### Complete API Reference For the full API documentation with all functions, parameters, and examples, see: **[MicroPython API Reference - OLED Display Section](09.5-micropythonAPIreference.md#oled-display)** The API includes: - Text size control (`oled_set_text_size`, `oled_get_text_size`) - Print redirection (`oled_copy_print`) - Font system (`oled_get_fonts`, `oled_set_font`, `oled_get_current_font`) - Bitmap functions (`oled_load_bitmap`, `oled_display_bitmap`, `oled_show_bitmap_file`) - Framebuffer access (`oled_get_framebuffer`, `oled_set_framebuffer`, `oled_get_framebuffer_size`) - Pixel manipulation (`oled_set_pixel`, `oled_get_pixel`) - Retained screens and layouts (`oled_screen`, `oled_add_text`, `oled_add_shape`, `oled_set`, `oled_set_var`, `oled_screen_show`/`_hide`/`_save`/`_load`) - see the [OLED Layout / Screens section](09.5-micropythonAPIreference.md#oled-display) ### Example Projects **Animated Sine Wave:** ```jython import jumperless as j import math import time width, height, _ = j.oled_get_framebuffer_size() for offset in range(100): j.oled_clear(False) # Don't show() after clear to avoid flashing for x in range(width): y = int(height//2 + 10 * math.sin((x + offset) / 10)) if 0 <= y < height: j.oled_set_pixel(x, y, 1) j.oled_show() time.sleep(0.05) ``` **Sensor Monitor:** ```jython import jumperless as j import time # Monitor voltage with print redirection j.oled_copy_print(True) j.oled_clear() while True: voltage = j.adc_get(0) current = j.ina_get_current(0) print(f"V: {voltage:.2f}V") print(f"I: {current*1000:.1f}mA") time.sleep(1) ``` --- # Arduino Stuff ## UART Passthrough With an Arduino Nano in the header and the UART lines connected, anything on those lines should be passed through to the second serial port that shows up when you plug in your Jumperless. Don't worry about the baud rate, the Jumperless senses what the host computer is set to and changes the speed accordingly. Same for the parity and stop bits, so stuff that isn't 8N1 goes through (UPDI wants 8E2, one of the beta testers found that out flashing an ATtiny412 through it, that whole saga is in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/a-series-of-tubes)). The Nano goes in the header socket on the board, and every signal pin on that header is a routable node - `D0` through `D13`, `A0` through `A7`, `AREF` and `RESET`. You can connect any of them to a breadboard row or a rail just like anything else. The power pins (`5V`, `3V3`, `VIN`, `GND`) aren't routable. `D0` and `D1` are the only ones that ever get wired up for you. ## Quick Connection Shortcuts The shortcuts to connect `D0` and `D1` to the Jumperless's UART `Tx` and `Rx` is `A` to connect, and `a` to disconnect. Add a `?` to ask instead of doing - `A?` tells you whether the UART is routed and whether a Nano is there, `a?` just whether it's routed. `r` resets the Nano. `rt` and `rb` pick which `RESET` pad to pulse, and `r2` does both. You don't need `A` before an upload, flashing routes the UART for you. It's only there for talking to the sketch afterwards if you'd disconnected it. ## Automatic Flashing It will even sense when Arduino IDE is trying to upload code and twiddle the reset lines to allow you to flash code with just a single USB cable going to your Jumperless. That reset twiddling is set up for a classic AVR Nano. If you've got a Nano ESP32 in the header, set the `[serial_1]` config key `flash_reset_type` to `esp32` or the upload will never get it into the bootloader. **Tip:** You can also use [Wokwi](https://wokwi.com) with the Jumperless Bridge app for flashing - no need to even have the Arduino IDE open --- ## Commands from Routable UART You can send commands to the Jumperless from your Arduino (or anything connected to the routable UART) by wrapping them in XML-style tags. The command inside the tags gets executed. The tagged text still shows up on the passthrough port along with everything else your Arduino prints, it doesn't get stripped out - but it's never echoed back down the UART to the Arduino. (there's a demo of netlists going in over the UART in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/jumperless-probelessly).) ### Two Types of Tags There are two flavors of command tags, depending on what you want to do: #### `` Tags - Raw Commands These run exactly like you typed them in the main Jumperless menu. Use these for things like making connections with `f`, loading files, or any single-character menu command. They don't send anything back to the Arduino. #### `` Tags - Python Commands These run MicroPython commands directly. Perfect for `connect()`, `disconnect()`, `adc_get()`, `dac_set()`, and all the other Python hardware functions. The `` tag automatically prepends the `>` that normally tells the Jumperless "this is a Python command." A `` command sends back exactly what it prints and nothing else, so wrap anything you want to read in `print()`. ### Supported Tag Names Any of these work (use matching opening and closing tags): | Tag | Example | |-----|---------| | `` | `f 1-30` | | `` | `x` | | `` | `n` | | `` | `print(adc_get(0))` | --- ## Python Commands with `` Tags The `` tag is the most powerful way to control your Jumperless from Arduino code. It gives you direct access to all the MicroPython hardware functions. ### Basic Example ```cpp #define OPENJCOMMAND Serial.print(""); #define CLOSEJCOMMAND Serial.println(""); void setup() { Serial.begin(115200); delay(1500); // Give Jumperless time to boot } void loop() { // Read voltage on ADC channel 0 OPENJCOMMAND Serial.print("print(adc_get(0))"); CLOSEJCOMMAND delay(100); // Read the response while(Serial.available() > 0) { char c = Serial.read(); // Process the voltage reading... } } ``` ### Full Example - ADC Scanning Your browser does not support the video tag. This sketch connects ADC0 to different breadboard rows and reads the voltage at each one: ```cpp #define OPENJCOMMAND Serial.print(""); #define CLOSEJCOMMAND Serial.println(""); void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200); delay(1500); } int lastNode = 8; int node = 8; unsigned long delayTime = 60; void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(delayTime); node++; if (node > 60) { node = 1; } // Disconnect from previous node OPENJCOMMAND Serial.print("disconnect( ADC0," + String(lastNode) + ")"); CLOSEJCOMMAND delay(delayTime); // Connect to new node OPENJCOMMAND Serial.print("connect(ADC0 ," + String(node) + ")"); CLOSEJCOMMAND delay(delayTime); // Read the voltage OPENJCOMMAND Serial.print("print(adc_get(0))"); CLOSEJCOMMAND delay(delayTime); // Read response from Jumperless char response[30] = {0}; int idx = 0; while(Serial.available() > 0 && idx ` tags: ```cpp // Connections "connect(1, 30)" // Connect breadboard rows "connect(D13, TOP_RAIL)" // Connect Arduino pin to power "disconnect(ADC0, 15)" // Remove a connection "nodes_clear()" // Clear ALL connections // Analog I/O "adc_get(0)" // Read voltage (channels 0-7, 0-3 are the routable ones) "dac_set(0, 3.3)" // Set DAC output voltage "dac_set(TOP_RAIL, 5.0)" // Set rail voltage // Digital I/O "gpio_set(1, True)" // Set GPIO high "gpio_set(1, False)" // Set GPIO low "gpio_get(2)" // Read GPIO state // Current sensing "ina_get_current(0)" // Read current in amps "ina_get_voltage(0)" // Read bus voltage at the current sensor ``` See the [MicroPython API Reference](09.5-micropythonAPIreference.md) for the complete list. --- ## Raw Commands with `` Tags Use `` tags when you want to send menu commands - the same ones you'd type in the serial terminal. ### Example - Making Connections ```cpp #define OPENJCOMMAND Serial.print(""); #define CLOSEJCOMMAND Serial.println(""); void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(115200); delay(1500); } int node1 = 1; int node2 = 8; unsigned long delayTime = 60; void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(delayTime); node1++; node2++; if (node1 > 60) node1 = 1; if (node2 > 60) node2 = 1; // Use the 'f' command to make a connection // Format: f - OPENJCOMMAND Serial.print("f " + String(node1) + "-" + String(node2) + "\n"); CLOSEJCOMMAND delay(delayTime); digitalWrite(LED_BUILTIN, LOW); } ``` ### Useful Raw Commands | Command | What it does | |---------|--------------| | `f 1-30` | Connect nodes 1 and 30 | | `+ D13-GND` | Add connection (alternate syntax) | | `- 1-30` | Remove connection | | `x` | Clear all connections | | `n` | Show net list | --- ## Tips and Gotchas ### Timing The Jumperless needs a little time to process each command. A delay of 40-100ms between commands is usually safe. If you're seeing weird behavior, try increasing the delay. ### Response Reading Only `` commands send anything back, and only what they print - `print(adc_get(0))` gets you a voltage, `adc_get(0)` on its own gets you nothing. `` commands are fire-and-forget from the Arduino's side. Make sure to read the Serial buffer after a command that does return data, or it'll fill up and cause issues. ### Startup Delay Add a `delay(1500)` in your `setup()` to give the Jumperless time to fully boot before sending commands. ### Flashing Your Arduino Just use the Arduino IDE normally - select the second serial port that shows up (the one labeled with "port3" or similar), and upload. The Jumperless automatically handles the reset timing. ### Which Tag to Use? - **Use ``** for anything that's a Python function: `connect()`, `adc_get()`, `dac_set()`, etc. - **Use ``** for menu commands: `f`, `x`, `n`, etc. --- ## Wokwi Integration If you're using the [Jumperless Wokwi Bridge](https://github.com/Architeuthis-Flux/Jumperless-Wokwi-Bridge), you can flash your Arduino directly from Wokwi simulations - the bridge handles all the communication for you. --- # Config File To change any persistent settings that apply to the Jumperless as a whole, there's a `config` file. There are three ways to poke at it, pick whichever fits your mood: 1. **The interactive editor** - enter a bare `` ` `` (backtick) and get a full menu with arrow keys, descriptions, and live-updating values 2. **Copy / paste** - print the config with `~`, copy a line, change the value, paste it back 3. **Edit the file** - it's just `config.txt` on the filesystem, edit it however you like; those edits get read at the next boot ## The Interactive Editor Enter a single `` ` `` (backtick, nothing else) into the terminal and you get a config menu instead of a config file: [Image: The interactive config editor's category list] The categories are organized by what you're actually trying to mess with (`Probe`, `Clickwheel`, `Measurement`, `Display`...), with the plumbing (`Calibration`, `Hardware`) further down, and `All` at the top if you'd rather scroll one flat list of everything. The keys: - `up` / `down` - move (the pane on the right describes whatever you're on: what it does, its range, its default) - `enter` - open a category, or highlight the value of the option you're on (text options like `startup_message` go straight to typing) - `left` / `right` - step a highlighted value, cycle its choices, or flip it on/off; while you're just moving around, `left` is back and `right` opens/selects like `enter` - `e` - type an exact value - `d` - reset the highlighted option to its default - `enter` again - done with the value - `left` or `q` - back / exit `j` / `k` move too, `PgUp` / `PgDn` page, `Home` / `End` jump to the ends, and `esc` backs out like `left`. [Image: Inside the Probe category] **Most changes apply live.** Every edit goes through the same machinery as the paste path, so the board reacts while you're still in the menu - hit `enter` on `led_brightness` and hold `right`, and the breadboard gets brighter under your finger, change the OLED font and it redraws, tweak the menu FX and the next transition wears it. The exceptions only take effect on the next boot: the `[hardware]` keys, `probe.use_pio_button`, `probe.led_on_button_pin`, `clickwheel.encoder_pio`, and the `[usb_audio]` keys (turning `usb_audio.enabled` on live re-enumerates USB and drops the serial ports for about 2 seconds). [Image: The Display category - brightness sliders that apply as you arrow through them] There's also a `Menu FX Tuner` category at the bottom that opens a live tuner for the click-menu frame transitions (it drives the real breadboard menu while you play with it), a `Reset to defaults` that resets everything except calibration and hardware identity, and an `Exit` row that closes the menu (`left` and `q` do too). ## Viewing Config.txt If you'd rather see the whole thing at once, enter `~` to print the config. ```jython ~ copy / edit / paste any of these lines into the main menu to change a setting Jumperless Config: `[config] firmware_version = 5.7.11.0; `[hardware] generation = 5; `[hardware] revision = 7; `[hardware] probe_revision = 5; `[hardware] psram_installed = false; `[hardware] psram_app_size_kb = 2048; `[probe] auto_connect = on; `[probe] power_source = dac0_first; `[probe] use_pio_button = true; `[probe] led_on_button_pin = true; `[probe] led_refresh_us = 0; `[probe] pad_max = 4056; `[probe] pad_min = 15; `[probe] pad_max_measure = 4111; `[probe] pad_max_measure_gpio = 4110; `[probe] pad_min_measure = 10; `[probe] switch_threshold_high = 1.2000; `[probe] switch_threshold_low = 0.9000; `[probe] switch_select_max_ma = 0.0000; `[probe] switch_blink_hold_pct = 50; `[probe] measure_voltage = 3.3671; `[probe] current_zero = 2.1667; `[probe] min_valid_reading = 85; `[probe] droop_v0 = 3.3500; `[probe] droop_ohms = 169.6479; `[probe] pad_ohms = 5.0000; `[clickwheel] encoder_pio = auto; `[clickwheel] rail_click_adjust = oled_only; `[clickwheel] part_walk = z; `[clickwheel] fx_type = glow; `[clickwheel] fx_duration_ms = 160; `[clickwheel] fx_tint = 0x00; `[clickwheel] fx_density = 128; `[measurement] net_currents = 1; `[measurement] current_flow = conventional; `[measurement] show_probe_current = 0; `[measurement] crosspoint_resistance = 40.0000; `[terminal] colors = true; `[terminal] line_buffering = true; `[undo] persist = true; `[undo] max_saved_actions = 256; `[dacs] limit_max = 8.00; `[dacs] limit_min = -8.00; `[debug] file_parsing = false; `[debug] net_manager = false; `[debug] nets_to_chips = false; `[debug] nets_to_chips_alt = false; `[debug] probing = false; `[debug] arduino = 0; `[debug] show_node_errors = true; `[debug] probe_switch_stats = false; `[debug] probe_switch_agree = false; `[debug] net_voltage_scan = false; `[debug] net_scan_pair_taps = 1; `[routing] stack_paths = 2; `[routing] stack_rails = 3; `[routing] stack_dacs = 0; `[routing] stack_gpio = 0; `[routing] stack_adcs = 0; `[routing] part_safety = off; `[slots] boot_mode = last_active; `[slots] boot_slot = 0; `[calibration] top_rail_zero = 1655; `[calibration] top_rail_spread = 18.4000; `[calibration] bottom_rail_zero = 1639; `[calibration] bottom_rail_spread = 19.0000; `[calibration] dac_0_zero = 1655; `[calibration] dac_0_spread = 18.2300; `[calibration] dac_1_zero = 1629; `[calibration] dac_1_spread = 19.0300; `[calibration] adc_0_zero = 8.9969; `[calibration] adc_0_spread = 18.0563; `[calibration] adc_1_zero = 8.9903; `[calibration] adc_1_spread = 18.0659; `[calibration] adc_2_zero = 8.9993; `[calibration] adc_2_spread = 18.0637; `[calibration] adc_3_zero = 8.9826; `[calibration] adc_3_spread = 18.0345; `[calibration] adc_4_zero = 0.0000; `[calibration] adc_4_spread = 4.9151; `[calibration] adc_7_zero = 8.8184; `[calibration] adc_7_spread = 17.7676; `[logo_pads] top_guy = uart_tx; `[logo_pads] bottom_guy = uart_rx; `[logo_pads] building_pad_top = isense_pos; `[logo_pads] building_pad_bottom = isense_neg; `[logo_pads] top_guy_idle = off; `[logo_pads] bottom_guy_idle = off; `[logo_pads] building_pad_top_idle = off; `[logo_pads] building_pad_bottom_idle = off; `[display] lines_wires = wires; `[display] menu_brightness = -10; `[display] led_brightness = 10; `[display] rail_brightness = 55; `[display] special_net_brightness = 20; `[display] net_color_mode = rainbow; `[serial_1] function = passthrough; `[serial_1] baud_rate = 115200; `[serial_1] print_passthrough = 0; `[serial_1] connect_on_boot = 0; `[serial_1] lock_connection = 0; `[serial_1] autoconnect_flashing = 1; `[serial_1] async_passthrough = true; `[serial_1] tag_parsing = enabled; `[serial_1] flash_reset_type = avr; `[serial_2] function = micropython; `[serial_2] baud_rate = 115200; `[serial_2] print_passthrough = 0; `[serial_2] connect_on_boot = 0; `[serial_2] lock_connection = 0; `[top_oled] enabled = 1; `[top_oled] i2c_address = 0x3C; `[top_oled] width = 128; `[top_oled] height = 32; `[top_oled] rotation = 0; `[top_oled] connection_type = i2c0; `[top_oled] sda_pin = 4; `[top_oled] scl_pin = 5; `[top_oled] gpio_sda = 134; `[top_oled] gpio_scl = 135; `[top_oled] sda_row = -1; `[top_oled] scl_row = -1; `[top_oled] connect_on_boot = 1; `[top_oled] lock_connection = 0; `[top_oled] show_in_terminal = off; `[top_oled] font = Eurostl; `[top_oled] startup_message = images/bubbleJumpThin.bin; `[usb_cdc] ignore_dtr = false; `[usb_audio] enabled = false; `[usb_audio] left = 0; `[usb_audio] right = 1; `[usb_audio] rate = 16000; `[usb_audio] full_scale = 8.00; `[usb_audio] dc_block = true; ``` This is just a file on your filesystem called `config.txt` and you can edit that file directly too. It only gets read at boot, so your edits land on the next reboot - and the firmware rewrites `config.txt` from its live settings whenever a setting changes, so edit it with the board idle and reboot afterwards. If you want the change right now, use the editor or paste the line back in. [Image: config.txt open in a text editor on a computer, with the Jumperless mounted as a drive] The `[calibration]` numbers come from `Calibration` > `DACs Calib` on the click wheel. It runs by itself on first startup, and you can run it again if the DAC or ADC voltages look off (it sets a bunch of DAC voltages and reads them back with the INA219 to work out the zero and spread for each one). The probe's own calibration (`pad_min`, `pad_max*`, the switch thresholds) is in `[probe]` - the [Calibration](05.8-calibration.md) page covers what sets each one. ## Config Help There's also a `help` you can get to by entering `~help` ```jython ~help Read config ~ = show current config ~names = show names for settings ~numbers = show numbers for settings ~[section] = show specific section (e.g. ~[routing]) Write config `[section] setting = value; = enter config settings (pro tip: copy/paste setting from ~ output and just change the value) ` = open the interactive config menu (arrow keys) Reset config `reset = reset to defaults (keeps calibration and hardware version) `reset_hardware = reset hardware settings (keeps calibration) `reset_calibration = reset calibration settings (keeps hardware version) `reset_all = reset to defaults and clear all settings `force_first_start = clears everything to factory settings and runs first startup calibration `self_test = run the hardware self test (non-destructive) `self_test_report = re-print the stored self test report Help ~? = show this help ``` (Small quirk: `~?` currently shows a shorter one-line command card instead; `~help` is the one that prints all of the above.) ## States vs Config States are now saved as YAML and we did away with the old text file format. Each slot's YAML file holds one complete circuit - connections, colors, rail and DAC voltages, GPIO setup. **State vs Config - What's the Difference?** - **State** stores things relevant to the currently loaded slot - connections, wire colors, rail voltages, GPIO settings. These change when you switch slots. - **Config** (config.txt) contains hardware-wide settings that apply to the entire Jumperless regardless of which slot is active. Rail voltages, GPIO settings, and other circuit-specific parameters now go with the state (in the YAML file) rather than config, so each slot can have its own power supply and GPIO configuration. ## State File Structure For things specific to the current `state` of the Jumperless, there's a YAML file that contains all the connections, colors (optional), `rail` / `DAC` voltages, `GPIO` directions and pulls, stuff like that. The idea is this defines a complete setup of a particular circuit that can be switched between in different `slots`. The Jumperless boots into whichever `slot` was last active (`[slots] boot_mode = last_active`); set `boot_mode = fixed_slot` and `boot_slot = N` if you'd rather it always come up in slot N. You can switch to other `slots` with ` `Load` > `0-7` (it will show a preview of each one.) To save a copy of the currently `active slot`; `Slots` > `Save to` > `0-7` will save a copy of the `active slot` to another `slot` and also make that target slot the `active`. `Slots` > `Clear` > `0-7` deletes a `slot`'s file. Enter `Y` to print the current state (`Y0` plain, `Y1` colored hex, `Y2` colored blocks). It prints the YAML itself, with a `Time since last change` line on top if you have unsaved edits. `S` loads a pasted state back in, in the same format. ```jython Y version: 2 sourceOfTruth: bridges bridges: - {n1: 38, n2: 44} - {n1: 21, n2: 28} - {n1: 48, n2: 55} - {n1: 4, n2: 2, dup: 2} nets: - {num: 4, nodes: [DAC_0, BUF_IN], name: "DAC 0", anim: true} - {num: 6, nodes: [38, 44], color: pink} - {num: 7, nodes: [21, 28], color: blue} - {num: 8, nodes: [48, 55], color: green} - {num: 9, nodes: [4, 2], color: amber} power: topRail: 3.30 bottomRail: 2.50 dac0: 3.30 dac1: 0.00 config: routing: {stackPaths: 2, stackRails: 3, stackDacs: 0, railPriority: 1} gpio: direction: [1,1,1,1,1,1,1,1,1,1] pulls: [0,0,0,0,0,0,0,0,0,0] pwmFrequency: [1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00,1.00] pwmDutyCycle: [0.50,0.50,0.50,0.50,0.50,0.50,0.50,0.50,0.50,0.50] pwmEnabled: [0,0,0,0,0,0,0,0,0,0] readFloating: [0,0,0,0,0,0,0,0,0,0] uart: {txFunction: 0, rxFunction: 1} oled: {connected: false, lockConnection: false} bcd: {pins: 0, value: 0} ``` `dup:` only shows up on connections where you asked for a particular stack count. If you've placed parts, the file also carries a `parts:` section, and a `guideProgress:` line while you're partway through a guided project. ## Source of Truth Because the information in here is *sort of* redundant (the connections could be computed from just the `bridges` or the `nets` section on their own), there's a field called `sourceOfTruth` which is the section that actually gets parsed and then the other section is written with the computed values. (I haven't done much testing on changing this to `nets` so I'd probably just leave it on `bridges` for now.) There's some weirdness with how colors are applied, since the `source of truth` is the bridges, and the things that actually get colored are the `nets`, it'll take the colors from the `bridges` (if specified) and try to apply them to the `nets`. But since nets always have a single color (to show that they're connected), if you have `bridges` with different colors in the same `net`, it'll just pick one (don't ask me exactly how the logic chooses, idk.) If you specify a color to a `net` even with `sourceOfTruth: bridges` it should respect the `net` assignment over the `bridge` assignment. ## Switching Between Saved Circuits (Slots) The Jumperless has **8 slots** (0-7) where you can save different circuit configurations. Think of them like presets or save files. **Quick slot cycling:** - Type ` `Load` > `0-7`. When you make connections with the probe, they're automatically saved to whichever slot is currently active. See the [Glossary](99-glossary.md) for more details about slots. ## Editing State Files You can edit the YAML slot files and the board will pick up your changes - see [Editing Slot Files](08-file-manager.md#editing-slot-files). --- # GPIO The ten routable GPIOs (`GPIO 1`-`8` plus the UART `Tx` and `Rx` pins) can be set up from the board itself, no terminal needed: direction, pull resistors, PWM, and a counter that drives a group of them as one number. All of it shows on the OLED and the terminal. Nothing here paints the breadboard, so the LEDs keep showing your circuit. To *connect* a GPIO to a row, use the `GPIO` pad by the logo while probing (see [Getting Started](01-getting-started.md#special-functions)). This page is about what the pin does once it's connected. ## Set up a pin Two ways in: **Highlight it and click.** Land the highlight on a `row` that has a GPIO on it (scroll there with the wheel, or tap it with the probe). The OLED shows the pin and its level, like `GPIO 3 out` / `HIGH`, with an `options?` tag. While that tag is showing, `click` the wheel and the pin's options open. The tag goes away after a second, and a click after that just opens the regular menu. Turning the wheel only ever scrolls, so you can scroll right past a GPIO row without opening anything. This one needs an OLED. **From the menu.** `Click` > `GPIO` > `Set Pins` lists all ten pins with what they're doing right now: `3 out HIGH`, `5 in pull-up`, `2 PWM 1.0k`, `Tx UART`. Pick one. Either way you get the same options. Turn to move between them, `click` to edit one, `hold` to leave. The probe buttons work too: `Connect` is `click`, `Remove` is `hold`. - `Dir` - `in` or `out` - `Pulls` - `down`, `up`, `none`, or `keep`. On an input it takes effect right away. On an output it's remembered for when the pin becomes an input. - `PWM` - `on` or `off`. Turning it on gives you `Freq` and `Duty` to set with the wheel, and the pin changes live while you turn. `Click` keeps what you landed on, `hold` puts the old value back and drops you on the `Freq` / `Duty` picker (so it's one more `hold` to get out of PWM than the others). Not offered on `Tx` / `Rx`. - `BCD` - jumps to the [counter](#the-counter) If something else is using the pin, the OLED tells you what (`GPIO 7` / `OLED`) and the options don't open. That's the OLED's I2C pins, a pin a MicroPython script has claimed, the probe's power pin, or the UART passthrough. ??? tip "Try it" 1. Connect `GPIO 1` to `row 20` as an output (`GPIO` pad, right side of `1`, tap row 20). 2. Tap row 20 to highlight it. While the OLED says `options?`, `click` the wheel. 3. Turn to `PWM`, `click`, turn to `on`, `click`. Pick `Freq`, and turn the wheel while watching the row's LED brightness change. `Click` to keep it. 4. `Hold` to back out of PWM. `Hold` again to leave the options. ## The counter Pick some pins, and the Jumperless drives them as the bits of one number that you turn up and down with the wheel. It's for things like feeding a 7447 that's driving a 7-segment display, or stepping through the addresses of a memory chip by hand. (The menu calls it `BCD`, but it's plain binary and the readout is hex.) `GPIO 1` is the lowest bit, then up through `GPIO 8`, then `Tx`, then `Rx`. With 4 pins you count `0`-`F`, with 8 you count `00`-`FF`, and it wraps around at both ends. ### Counting `Click` > `GPIO` > `BCD Counter` > `Count`. (Or pick `BCD` from a pin's options.) The OLED shows every pin in the range along the top with its current level underneath, and the count in hex next to it. Turn the wheel: clockwise counts up, and the rows those pins are wired to change right along with it. `Click` or `hold` to leave. Whatever's on the pins stays there. If you haven't set a range yet, it picks one for you: every GPIO you've already wired to the board, or if there aren't any, a run of 4 free pins. If no pin is free it says `no free pins` and stays put. ### Range `GPIO` > `BCD Counter` > `Range` picks the pins yourself. The first option is `Routed`, which is just the pins you've wired (`1-4`, or `1,3,T` if they're not next to each other). `Click` it and that's your range. Turn past it for `Start` and `Width` to pick a run of pins by hand. `Click` sets it, `hold` cancels. ### Counting with the logo pads You can put counting on the pads by the logo so you don't have to open a menu at all. In your [config](06-config.md): Type it into the terminal, backtick and all (the backtick is the config command): ```jython `[logo_pads] top_guy_idle = bcd_up; `[logo_pads] bottom_guy_idle = bcd_down; ``` Then with the probe idle and its switch on `Select`, tapping the top guy counts up and the bottom guy counts down, one step per tap. The OLED shows the new count each time. (`building_pad_top_idle` and `building_pad_bottom_idle` take the same values.) ??? tip "Try it" 1. Connect `GPIO 1`, `2`, `3`, and `4` as outputs to rows `10`, `11`, `12`, and `13`. 2. `Click` > `GPIO` > `BCD Counter` > `Count`. 3. Turn the wheel and watch the four rows count in binary. `Hold` to leave. ## Choosing a GPIO on the OLED When you tap the `GPIO` pad while probing, the chooser draws on the breadboard as always, and the OLED mirrors it: `1`-`4` across the top, `5`-`8` across the bottom, with `i` and `o` marks where the input and output tap zones are. When you tap one it confirms what you picked (`GPIO 3` / `Input`). Picking a pin something else owns tells you who has it and cancels instead of taking it. ## What's saved Direction, pulls, PWM, and the counter's pins and value are all saved with the `slot`, so loading a slot puts the pins back the way they were. --- # Automation & LLM Tools The Jumperless V5 is built to be driven by software — by your own scripts, by desktop apps, and by LLM agents (Cursor, Claude Desktop/Code, etc.). This page is the hub for **every** way to control the board from outside the menu. The full hardware/API surface is documented in the [MicroPython API Reference](09.5-micropythonAPIreference.md) — this page is about *transport and tooling*, not the individual calls. --- ` prefix on port 1 | | You want to run **full scripts on the device** | MicroPython **Raw REPL** on port 5 | All of these ultimately drive the same MicroPython API on the device. The backchannel (port 7) is the exception: it is a read-only telemetry channel that never enters Python and never mutates state. ```mermaid flowchart LR subgraph host [Host / Agent] MCP[jumperless-mcp] SKILL[Agent Skill + jumperless.py] SCRIPT[your scripts] end subgraph dev [Jumperless V5] P1[port 1: menu + > Python] P5[port 5: Raw REPL] P7[port 7: USBSer3 backchannel] API[(MicroPython API)] end MCP - -> P5 SKILL - -> P5 SCRIPT - -> P1 & P5 P1 - -> API P5 - -> API P7 -. read-only .-> API ``` --- --> ## USB port structure The Jumperless enumerates as four USB CDC serial interfaces. On macOS they are named `JLV5portN`; on Linux they are sequential `/dev/ttyACMx`; on Windows they are sequential `COMx`. | Port | macOS suffix | Role | |------|--------------|------| | 1 | `JLV5port1` | Main terminal, menu, `>` one-liner Python, single-char commands | | 2 | `JLV5port3` | Arduino UART passthrough | | 3 | `JLV5port5` | MicroPython Raw REPL — **primary transport for scripts and the Agent Skill** | | 4 | `JLV5port7` | USBSer3 machine backchannel — `:help` (YAML), `:cmds`, read-only status verbs | !!! tip The host helper `scripts/jumperless.py detect` (in the Agent Skill repo) auto-finds the Raw REPL port and caches it, so you rarely need to name ports by hand. !!! note I will refer to these ports by their index (1st, 2nd, 3rd, 4th). macOS names them by USB interface index, and each serial port uses two interfaces (control and data), so the suffixes step by two: 1, 3, 5, 7. Linux and Windows number them sequentially. --- ## Communication methods ### 1. `>` Python one-liners (1st / main port) Prefix a single line of Python with `>` on the main terminal. Best for quick checks and single commands. ```jython > connect(1, 5) > v = adc_get(0) > print(f"V = {v:.2f}") ``` ### 2. MicroPython Raw REPL (3rd port) The canonical transport for anything beyond a one-liner: full scripts, loops, guided flows. This is what the Agent Skill's `jumperless.py` and the MCP server both speak under the hood. ```python import time for i in range(10): print(i, adc_get(0)) time.sleep(0.5) ``` ### 3. Arduino tags (2nd port, via UART) From an Arduino connected to the Jumperless headers: ```cpp Serial.print("connect(1, 5)"); // run Python Serial.print("n"); // menu command ``` ### 4. Single-character commands (1st port) Raw characters sent to port 1 trigger immediate menu actions — fast state dumps, board clears, etc. (`J` = JSON state, `x` = clear, `n` = list nets, …). ### 5. USBSer3 backchannel (4th port) — read-only telemetry A dedicated *machine* port that never blocks and never changes state. It speaks two command forms: - **Single characters** dispatch instantly: `A` full status, `V` ADC+current, `G` GPIO, `N` nets, `K` YAML. - **`:` verbs** read a newline-terminated line: `:gpio:s`, `:leds`, `:crossbar`, `:adc`, `:yaml`, `:every:1ms:100:gpio:s`, … Every command is gated by an access tag; only read-only queries run here, so an agent can poll the board freely without risk of mutating it. #### Self-describing `:help` (YAML) The backchannel describes itself. Send `:help` (or a bare `:`) and it emits a **YAML** document — readable straight in a serial terminal, and parseable with `yaml.safe_load()`: ```text ---YAML_HELP_START--- ser3_help: 1 protocol: single_char: "Instant dispatch; no line collection. Multi-char modifiers use ':' verbs." ... verbs: - name: "gpio:s" summary: "48-pin GPIO state snapshot" args: "[float]" output: "s{}" example: ":gpio:s" min_us: 20 ... ---YAML_HELP_END--- ``` Targeted help is available too: | Command | Returns | |---------|---------| | `:help` | Full YAML help document | | `:help:` | One verb's details (e.g. `:help:gpio:s`) | | `:help:` | A single-char command's long help (e.g. `:help:c`) | | `:help:json` | The same content in JSON | | `:cmds` / `:cmds_all` | Machine command list (JSON) — `:cmds_all` includes blocked commands and their access tags | A host harness for the backchannel ships with the firmware repo at `scripts/bench_backchannel.py` (drives `:bench`, times verbs). --- ## MCP server [**Jumperless-mcp** by LesbianVelociraptor](https://github.com/LesbianVelociraptor/jumperless-mcp) For MCP-native clients (Claude Desktop, Cursor MCP, …), the Jumperless exposes a Model Context Protocol server: a Rust MCP front-end plus a resident Python library on the device. It presents the board's capabilities as typed tools (connections, power, measurement, GPIO/PWM, OLED, overlays, state, …). It lives as the **`mcp/` git submodule** inside the canonical automation repo, so one checkout gives you both the Agent Skill and the MCP server: ```bash git clone --recurse-submodules https://github.com/Architeuthis-Flux/Large-Breadboard-Model.git cd Large-Breadboard-Model/mcp cargo install --path . # or use a release binary ``` Point your MCP client at the built binary: ```json { "mcpServers": { "jumperless": { "command": "/path/to/Large-Breadboard-Model/mcp/target/release/jumperless-mcp" } } } ``` > **Exclusive port:** the MCP server holds the USB serial port while running. > Don't run `jumperless.py` (the Agent Skill transport) against the same board > at the same time. --- ## Agent Skill If your agent supports the [Agent Skills](https://agentskills.io/) standard (Cursor, Claude Code), install the Jumperless V5 skill. It teaches the agent the device's capabilities and drives it through `scripts/jumperless.py` over the Raw REPL, with progressive-disclosure reference docs loaded only as needed. - **On this site:** [Jumperless V5 Agent Skill](jumperless-agent-skill.md) - **Canonical source:** [Architeuthis-Flux/Large-Breadboard-Model](https://github.com/Architeuthis-Flux/Large-Breadboard-Model) ```bash mkdir -p ~/.cursor/skills # or ~/.claude/skills cd ~/.cursor/skills git clone --recurse-submodules \ https://github.com/Architeuthis-Flux/Large-Breadboard-Model.git jumperless-v5 ``` --- ## Node Map Use this to translate between human‑readable names (like `D13` or `TOP_RAIL`) and the internal node numbers. All constants are available in the MicroPython REPL; you normally do **not** need the numbers directly, but the mapping is useful for mental models and debugging. ### Breadboard rows (1–60) Rows 1–60 represent the breadboard rows along the main area: - `1`–`30` — upper half - `31`–`60` — lower half Each row corresponds to a vertical strip of 5 holes on the physical board. Example: ```python connect(1, 10) # connect top row 1 to top row 10 connect(35, GND) # connect lower half row 35 to ground ``` --- ### Node names and IDs Every node name, alias and ID lives in [Node Names and Constants](09.5-micropythonAPIreference.md#node-names-and-constants) in the MicroPython API Reference. `ISENSE_PLUS` and `ISENSE_MINUS` are the two ends of a **2 Ω shunt resistor** and are internally shorted through that shunt; always use them in series with the circuit being measured. !!! caution Avoid using **DAC 0** and **ROUTABLE_BUFFER_IN** because they're used for probe switch sensing --- ### Breadboard layout (high‑level) The board follows a standard half‑size breadboard geometry: - Nano header at the top: - Top row: `D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 GND RST1 D0 D1` - Second row: `D13 3V3 REF A0 A1 A2 A3 A4 A5 A6 A7 5V RST0 GND VIN` - Top power rail: - `TOP_RAIL` - `GND` - Breadboard rows: - Rows `1`–`30` — upper half, between the top rails and the center gap - Rows `31`–`60` — lower half, between the center gap and the bottom rails - Bottom power rail: - `BOTTOM_RAIL` - `GND` An ASCII diagram (from the docs) approximates the layout; the agent should treat rows and rails as in any typical solderless breadboard, with the addition that every hole has an individually controllable RGB LED. #### DIP ICs straddling the center gap A DIP chip (555, op-amp, logic, …) sits across the center gap, with each side in a different breadboard half. The two halves are independent rows, so the two sides of the chip map to numerically distant nodes. For a chip whose first pin sits at upper-half row `N`, the upper-side pins run `N, N+1, …` and the lower-side pins run from the row directly across the gap (`N+30`). Worked example — an 8-pin DIP (e.g. a 555) with pin 1 at row 1: | Pin | Node | Pin | Node | |-----|------|-----|------| | 1 | `1` | 8 | `31` | | 2 | `2` | 7 | `32` | | 3 | `3` | 6 | `33` | | 4 | `4` | 5 | `34` | Pins 1–4 are on the upper side (rows 1–4); pins 5–8 are across the gap on the lower side (rows 34→31, counting back toward pin 1). Adjust the base row to wherever the chip is actually placed; verify with the probe or a measurement when unsure. --- #### How to use this map - Prefer named constants like `D13`, `TOP_RAIL`, `GPIO_1`, `ADC0`, `ISENSE_PLUS` when generating code. - Use the numeric IDs only when inspecting low‑level debugging output or when matching numeric IDs in `get_state()` / `get_net_info()` results. - When the user describes physical positions (“top rail”, “bottom left rail”, “row 25”), translate them into these node names/IDs before constructing `connect(...)` commands. ## JSON State Format The function `get_state()` returns a **JSON string** describing the entire board state: power rails, nets, GPIOs, and overlays. `set_state(json_str)` applies such a state. Two optional flags follow it, and they have to be positional — `set_state(json_str, clear_first, from_wokwi)`, where `clear_first` defaults to true and `from_wokwi` to false. Keyword arguments raise a `TypeError`. !!! note The entire immediate state of the board is defined in this JSON and can be shared to another Jumperless, saved as a backup, included in tutorials, etc. Slots themselves are stored as YAML, which is what `K` and `:yaml` dump. This file explains the structure so agents can safely inspect, modify, and re‑apply state. --- ### Top-level structure A typical `get_state()` JSON (pretty‑printed) looks like: ```json { "power": { "top_rail": 3.8, "bottom_rail": 3.8, "dac0": 3.25, "dac1": 0.0 }, "nets": [ { "index": 1, "name": "GND", "nodes": ["GND", "21"], "special": "none" }, { "index": 2, "name": "Top Rail", "nodes": ["TOP_R", "23"], "special": "RAIL", "voltage": 3.8 } // ... ], "gpio": [ { "pin": 1, "net": null, "function": "SIO", "direction": "INPUT", "pull": "down", "reading": "unknown", "floating_read": 1 }, { "pin": "TX", "net": 7, "function": "UART", "direction": "OUTPUT", "pull": "down", "reading": "unknown", "floating_read": 0 } ], "overlays": [ { "name": "border", "row": 1, "col": 1, "width": 30, "height": 10, "colors": ["003333", "003333", "..."] } ] } ``` There may be additional keys in future firmware versions; agents should **not** assume the set of keys is fixed and should preserve unknown keys when round‑tripping. --- ### `power` section ```json "power": { "top_rail": 3.8, "bottom_rail": 3.8, "dac0": 3.25, "dac1": 0.0 } ``` Fields: - `top_rail` — voltage (float) configured for `TOP_RAIL` - `bottom_rail` — voltage configured for `BOTTOM_RAIL` - `dac0`, `dac1` — DAC channel setpoints When using `set_state`, changing these values drives the corresponding channels and is saved into the current slot. Any value outside -8 V to 8 V is rejected. --- ### `nets` section Each item describes a net (set of nodes that are electrically connected inside the crossbar). Example: ```json { "index": 4, "name": "DAC 0", "nodes": ["DAC_0", "BUF_IN"], "special": "DAC", "voltage": 3.25 } ``` Fields: - `index` — numeric net index - `name` — human‑readable net name (may be auto‑generated or user‑defined) - `nodes` — array of node names (strings), such as `"GND"`, `"TOP_R"`, `"21"`, `"D13"`, etc. - These names correspond to the mapping in [Node Names and Constants](09.5-micropythonAPIreference.md#node-names-and-constants). - `special` — annotation for special nets; the values are `"none"`, `"RAIL"`, `"DAC"`, `"ADC"`, `"GPIO"`, `"UART_TX"`, `"UART_RX"` and `"FAKE_GPIO_IN"` - `voltage` — present on `ADC`, `DAC`, `RAIL` and `FAKE_GPIO_IN` nets - `logic` — present on `GPIO`, `UART_TX` and `UART_RX` nets; the logic level (0 or 1) **Important:** `nets` describes **logical groupings** of nodes. It is **not** a direct list of bridges; bridges are derived from the crossbar configuration internally. --- ### `gpio` section Each entry describes one logical GPIO: ```json { "pin": 1, "net": null, "function": "SIO", "direction": "INPUT", "pull": "down", "reading": "unknown", "floating_read": 1 } ``` Fields: - `pin` — either: - An integer `1`–`8` for `GPIO_1`–`GPIO_8` - `"TX"` or `"RX"` for the UART pins - `net` — net index this pin is connected to (or `null` if unconnected) - `function` — textual description of function: - `"SIO"` — standard GPIO - `"UART"` — UART TX/RX - Other firmware‑defined roles - `direction` — `"INPUT"` or `"OUTPUT"` - `pull` — `"up"`, `"down"`, or `"none"` - `reading` — textual summary of the last known logic state (`"high"`, `"low"`, `"unknown"`, etc.) - `floating_read` — boolean (0/1) indicating whether floating detection is enabled Agents can **inspect** this section to understand logical GPIO usage, but should generally **change GPIO configuration via the MicroPython APIs** (`gpio_set_dir`, `gpio_set_pull`, etc.) rather than editing this JSON directly. --- ### `overlays` section Overlays describe additional graphics drawn on the breadboard RGB LEDs. They are rendered **on top of** the firmware’s net coloring. Example: ```json { "name": "border", "row": 1, "col": 1, "width": 30, "height": 10, "colors": [ "003333", "003333", "...", "003333", "000000", "...", "... more hex color strings ..." ] } ``` Fields: - `name` — overlay name (string) - `row` — top row (1–10) - `col` — left column (1–30) - `width` — width in columns - `height` — height in rows - `colors` — flat array of **hex color strings without `0x` prefix**, e.g. `"003333"`, `"FF2020"` - Length = `width * height` - Order is row‑major: top row left→right, then next row down, etc. - `"000000"` means “transparent” — do not override underlying LED color Brightness recommendation: - Avoid full‑scale white `FFFFFF`. - Prefer saturated colors with reduced magnitude (~25%): e.g. `2020FF`, `20FF20`, `FF2020`, `404040`. When editing overlays via JSON: - Always maintain the correct `width * height` number of color entries. - Preserve unknown fields if present. - Ensure that `row`, `col`, `width`, and `height` keep the overlay within the canvas, which is 10 rows by 30 columns: row 1 is the top outer edge, rows 5 and 6 straddle the center gap, and row 10 is the bottom outer edge. Often it is easier to use the MicroPython overlay APIs (`overlay_set`, `overlay_clear`, etc.) directly instead of editing `overlays` in the state JSON manually. The JSON is still useful for inspection and for bulk export/import of complex scenes. --- ### Editing state safely General guidelines: 1. **Fetch once, apply locally.** - Call `get_state()` and parse the JSON in the host environment. - Keep this as your “baseline” snapshot. 2. **Work on a copy.** - Clone the baseline object before modifying it. - Preserve unknown fields. 3. **Modify only what you care about.** - For power: update `power.top_rail`, `power.dac0`, etc. - For overlays: add or replace specific entries in `overlays`. - Avoid rewriting `nets` unless you fully understand the implications; it is often better to use `connect()`/`disconnect()` APIs to modify connectivity. 4. **Re‑serialize and apply.** - Use a standard JSON encoder. - Call `set_state(json_string, True)` when applying a complete, authoritative state. - If you are only adding overlays or adjusting power, send a JSON with just those sections. `set_state` accepts any subset of `power`, `nets`, `gpio` and `overlays` and only applies the sections that are there. `clear_first` matters only when a `nets` section is present — that is when it clears every existing connection first. 5. **Rollback on problems.** - If `set_state` leads to unexpected behavior, re‑apply the saved baseline snapshot. --- ### Example: adjusting top rail voltage via state Instead of: ```python dac_set(TOP_RAIL, 5.0) ``` You can do: ```python import json state = json.loads(get_state()) state["power"]["top_rail"] = 5.0 set_state(json.dumps(state)) ``` This approach is useful when batching multiple changes (e.g. updating both rail voltages and overlays) in a single atomic operation. --- ### Example: augmenting overlays Suppose `get_state()` returns a state with existing overlays, and you want to add a new “place‑here” marker at row 3, column 10: ```python import json state = json.loads(get_state()) # Create a 1×1 overlay with a bright but not full‑scale green place_here = { "name": "place_here_row3_col10", "row": 3, "col": 10, "width": 1, "height": 1, "colors": ["20FF20"] } state.setdefault("overlays", []) state["overlays"] = [ o for o in state["overlays"] if o.get("name") != place_here["name"] ] + [place_here] set_state(json.dumps(state)) ``` This pattern: - Preserves existing overlays. - Replaces any prior overlay with the same name. - Leaves other state fields untouched. --- ### Wokwi import (`from_wokwi=True`) When `from_wokwi=True`, `set_state()` expects `json_str` to be a Wokwi `diagram.json` rather than a Jumperless state JSON. The firmware converts the Wokwi representation into bridges, nets, and colors. Agents can: - Ask the user to paste a Wokwi JSON. - Pass it directly to `set_state(wokwi_json, True, True)`. After that, a subsequent `get_state()` will return the standard Jumperless state JSON. --- ### Robustness tips for agents - Treat `get_state()` as **authoritative** for the current internal configuration, but always cross‑check against the user’s description of external wiring and components. - Always preserve unknown keys when editing state; future firmware versions may add fields. - Prefer using high‑level MicroPython APIs (`connect`, `disconnect`, `dac_set`, `overlay_set`, etc.) for incremental changes, and use state JSON editing for **bulk** or **offline** transformations (import/export, heavy refactoring, or pre‑computed overlays). ### MicroPython tool reference (subset) The complete, authoritative list is the [MicroPython API Reference](09.5-micropythonAPIreference.md). The most common calls for automation: | Category | Key tools | |----------|-----------| | Connections | `connect()`, `disconnect()`, `nodes_clear()`, `is_connected()`, `fast_connect()` | | Slots | `nodes_save(slot)`, `switch_slot(slot)`, `CURRENT_SLOT()` | | State | `get_state()`, `set_state(json)` | | Voltage | `dac_set(ch, v)`, `dac_get(ch)` | | Measurement | `adc_get(ch)`, `ina_get_current(s)`, `ina_get_voltage(s)`, `ina_get_power(s)` | | GPIO / PWM | `gpio_set()`, `gpio_get()`, `gpio_set_dir()`, `gpio_set_pull()`, `pwm()`, `pwm_stop()` | | WaveGen | `wavegen_set_wave()`, `wavegen_set_freq()`, `wavegen_set_amplitude()`, `wavegen_start()` | | UI | `oled_print()`, `oled_clear()`, `probe_read_blocking()`, `probe_button()`, `clickwheel_get_button()` | | LED overlays | `overlay_set()`, `overlay_set_pixel()`, `overlay_clear()`, `overlay_clear_all()` | | Net inspection | `get_net_info()`, `get_num_nets()`, `print_nets()`, `print_bridges()` | #### Node addressing (quick form) - **Breadboard rows:** `1`–`60` - **Rails / supplies:** `TOP_RAIL`, `BOTTOM_RAIL`, `GND`, `DAC0`, `DAC1` - **Arduino:** `D0`–`D13`, `A0`–`A7`, `AREF`, `RESET` - **GPIO:** `GPIO_1`–`GPIO_8`, `UART_TX`, `UART_RX` - **Measurement:** `ADC0`–`ADC3`, `ISENSE_PLUS`, `ISENSE_MINUS` --- ### A mental model for LLM agents The Jumperless prevents internal shorts, but **cannot see external wires or components** physically on the breadboard. An agent should maintain a model of what it believes is on the board and raise confidence through measurement and user confirmation. A lightweight per-component record works well: ```json { "id": "comp_001", "type": "resistor", "value": 1000, "pins": [5, 10], "confidence": 0.95, "detection_method": "measured", "notes": "Measured 987Ω between rows 5-10" } ``` | Confidence | Source | Meaning | |-----------|--------|---------| | 1.0 | `measured` | Electrically verified | | 0.9 | `user_confirmed` | User explicitly confirmed | | 0.7 | `user_stated` | User mentioned it casually | | 0.5 | `inferred` | Guessed from context | | 0.3 | `assumed` | Default assumption | --- ### Workflows **Safe power-up.** Before energizing an unknown board, ask what's on it, build a low-confidence model, then verify key rows with an ADC before connecting power — a hidden user wire between two rows can turn `TOP_RAIL` + `GND` into a dead short. **Identify with the probe.** Use `probe_read_blocking()` to let the user point at a node, then route an ADC to it and measure. **Characterize as a black box.** Drive a node with the WaveGen / DAC and sweep while reading an ADC. **Batch edits via state.** Fetch `get_state()`, mutate the JSON in Python, and re-apply with `set_state()` — one atomic round-trip instead of many calls. **Undo.** The firmware keeps a history ring, so you don't need to burn a slot before destructive ops like `nodes_clear()`. Call `undo()` and `redo()` from MicroPython (`^` and `&` in the terminal), or keep a `get_state()` snapshot to re‑apply. --- ### Safety guidelines 1. **Voltage range.** ADC0–ADC3 are buffered for ±8V; the board is ±9V tolerant overall. 2. **Short protection.** The firmware refuses dangerous internal connections (e.g. `TOP_RAIL` directly to `GND`), but cannot see external wiring. 3. **Confirm power.** The board is USB-powered (no barrel jack); ask if unsure. 4. **Crossbar resistance.** ~ 20–40Ω per default `connect()` path (~ 80Ω with a single path). Measure voltage *at the destination* to compensate for drop. 5. **Settling time.** Allow a few ms after routing/DAC changes (50–100 ms after `nodes_clear()` / `set_state()`) before measuring. --- ### Implementation status | Feature | Status | |---------|--------| | `connect()`, `disconnect()`, `is_connected()` | Implemented | | `dac_set()`, `adc_get()`, `ina_*()` | Implemented | | `gpio_*()`, `pwm()` | Implemented | | `oled_print()`, `probe_*()` | Implemented | | WaveGen tools | Implemented | | Slot management | Implemented | | `get_state()` / `set_state()` snapshot | Implemented | | `adc_get_stats()` (averaged sampling) | Available via the MCP server | | `undo()` / `redo()` history | Implemented | | USBSer3 `:help` self-describing backchannel | Implemented (firmware) | --- # File Manager The Jumperless has a built in File Manager which you can access in the menu with `/`, or enter `U` in the menu and Jumperless will mount as a USB Mass Storage drive called `JUMPERLESS` where you can edit files on the filesystem. `/` on its own opens the File Manager. Put a filename after it, like `/adc_basics.py`, and that script runs straight away - it looks in `/python_scripts`, its `examples`, `lib` and `modules` folders, then the root. ## File System Structure ``` ├── config.txt │ ├── slots/ │ ├── slot0.yaml │ └── ... (a file shows up for each slot you've saved to, up to slot7.yaml) │ ├── projects/ │ ├── 555/ │ │ ├── README.md │ │ ├── main.py │ │ └── wiring.yaml │ ├── i2cscrn/ │ ├── nand00/ │ └── eeprom/ │ ├── images/ (bitmaps for the OLED) ├── screens/ (OLED GUI layouts, once something has saved one) ├── undo_history.txt (the undo history, saved with your slots) │ └── python_scripts/ ├── history.txt ├── cool_micropython_script.py ├── ... (your python scripts go here) │ ├── lib/ │ ├── jumperless.py │ ├── jumperless.pyi │ └── oledgui.py │ ├── modules/ │ └── examples/ ├── adc_basics.py ├── dac_basics.py ├── file_io_basics.py ├── gpio_basics.py ├── interaction_demo.py ├── pin_irq_basics.py ├── led_brightness_control.py ├── node_connections.py ├── oscilloscope.py ├── stylophone.py ├── uart_basics.py ├── uart_loopback.py ├── voltage_monitor.py └── ... (and more) ``` Each slot's configuration is stored as a YAML file in the `/slots/` directory, and the global hardware configuration is in `/config.txt`. --- ## Navigation | Control | Action | |---------|--------| | **↑/↓ Arrow Keys** or **Rotary Encoder** | Move selection up/down | | **Enter** or **Click Encoder** | Open directory or edit file. Slot files get *loaded* instead (use `e` to edit them), `.bin` and `.bmp` open in the bitmap editor, and clicking a project's `wiring.yaml` in `/projects/` starts that project. `.py` files run if you got here from the clickwheel `Files` menu; from the terminal `/` they open in the editor. | | **Hold Encoder** | Go up one directory (at the root it quits) | | **Long hold Encoder** | Quit File Manager | | **/** | Go to root directory | | **.** | Go up one directory | | **Esc** | Go up one directory, or quit if you're already at the root | | **h** | Show help | | **v** | Quick view of file contents | | **e** | Edit file | | **i** | File info | | **n** | New file (prompts for filename) | | **d** | New directory | | **x** | Delete file or directory (confirm with `y`/`N`) | | **r** | Refresh directory listing | | **u** | Memory status | | **m** | Force initialize MicroPython examples | | **q** or **CTRL + q** | Quit File Manager (Ctrl+Q also quits the Text Editor) | --- ### File Type Icons and Colors | Icon | File Type | Extensions | Color | |------|-----------|------------|-------| | **⌘** | Directories | - | Cyan | | **𓆚** | Python files | .py, .pyw, .pyi | Green | | **⍺** | Text files | .txt, .md, .readme | Yellow | | **⚙** | Config files | .cfg, .conf, any name starting with `config` | Magenta | | **⟐** | JSON files | .json, .yaml, .yml | Blue | | **☊** | Legacy slot files | nodeFileSlot*.txt | Orange | | **⎃** | Net color files | netColorsSlot*.txt | Pink | Images, audio, video, documents, and archives get their own icons too. Slot files are `.yaml`, so they show up blue like JSON. Anything unrecognized shows as a grey **⍺**. --- ## Jumperless eKilo Text Editor The File Manager also has text editor based off [**eKilo**](https://github.com/antonio-foti/ekilo) ### Editor Controls - **Ctrl+S**: Save file - **Ctrl+Q**: Quit editor. If you have unsaved changes it asks you to press it once more (Esc doesn't discard your edits, it just tells you how to leave) - **Ctrl+P**: Save and load the file into the MicroPython REPL - `.py` files only, anything else just saves - **Ctrl+U**: Memory status - **Tab**: Indent - **Arrow keys**: Navigate cursor - **Rotary encoder**: Move cursor horizontally. Turn past the end of the file (or back before the start) and you get a Save/Cancel menu to pick from with the wheel and a click - **Click encoder**: Enter character selection mode (you can scroll through the letters on the OLED and click again to insert it) - **Long hold encoder**: Save (if you've changed anything) and quit ### Character Selection With the Click Wheel and OLED When using the rotary encoder in the editor: - **Click encoder**: Enter character selection mode - **Rotate encoder**: Cycle through available characters - **Click encoder**: Confirm character selection - **Wait 5 seconds**: Exit character selection mode Yes, you could write code with just the click wheel and the OLED if you really wanted to. [Image: 1760676653009] --- ## OLED Display Support If you have an OLED connected, the File Manager shows: - **Current path** and **selected file** - **File navigation** with scrolling support - **Real-time updates** as you navigate --- ### MicroPython Examples The example scripts live in `/python_scripts/examples/`. Open one in the File Manager and press `Ctrl+P` to run it (or just type its path at the main menu), and see the [Examples](08.5-examples.md) page for the full list and what each one does. If you delete one it comes back on its own the next time the File Manager opens. `m` forces a refresh: it also updates examples that still match an older firmware's version and always refreshes the `lib/` modules, and if you've edited an example it leaves yours alone and writes the current default next to it as `_original.py`. ## Editing Slot Files Slot files (located in `/slots/`) use **YAML format** and can be edited directly! They're human-readable files containing: - **bridges** - Your circuit connections, one `{n1: A, n2: B}` pair per line (`dup:` and `color:` show up only where they're set; net colors and names live under `nets`) - **power** - Rail and DAC voltages (topRail, bottomRail, dac0, dac1) - **config** - Routing preferences and GPIO settings - **nets**, **parts** and **overlays** - written by the board itself **Example slot file:** ```yaml version: 2 sourceOfTruth: bridges bridges: - {n1: 1, n2: 10, dup: 2, color: red} - {n1: NANO_D5, n2: GP_1, dup: 2} - {n1: TOP_RAIL, n2: 5, dup: 2} power: topRail: 3.30 bottomRail: 2.50 dac0: 3.33 dac1: 0.00 ``` **Named nodes** you can use: `NANO_D0-D13`, `NANO_A0-A7`, `GP_1-8` (or `RP_GPIO_1-8`), `TOP_RAIL`, `BOTTOM_RAIL`, `GND`, `DAC0`, `DAC1`, and more (see [glossary](99-glossary.md)). Note these differ from the MicroPython constants - `GPIO_1` won't parse in slot files. If you edit the active slot's file, the Jumperless automatically reloads it - when you quit the onboard eKilo editor, or, if you have the Jumperless mounted as a USB Mass Storage drive and are editing the files on your computer, when you eject/unmount the drive. Opening any `/slots/slotN.yaml` in the onboard editor previews that slot on the breadboard while you're editing it. When you close the editor the board goes back to whichever slot was active and re-reads its file, which is how your saved edits to the active slot land. --- ## USB Mass Storage Enter `U` in the menu and Jumperless will mount as a USB Mass Storage drive called `JUMPERLESS` where you can edit files on the filesystem. Keep in mind that file operations are pretty slow, so make sure to give it time to fully save files when you drop them onto the filesystem. Ejecting the drive from your computer applies your edits - the board syncs, saves anything pending, and reloads the active slot - but it's still a drive you can remount. Enter `u` to actually turn Mass Storage off. You can also enter `Z` for a little debug menu: `1` toggles USB debug output, `2` forces a refresh of the filesystem from what your computer wrote, and `3` validates every slot file. While the drive is on, `u` disables it, `G` reloads config.txt, `y` refreshes connections, and `S` shows status. --- # MicroPython This guide covers how to write, load, and run Python scripts that control Jumperless hardware using the embedded MicroPython interpreter. If you just want an overview of all the available calls, check out the [**MicroPython API Reference**](09.5-micropythonAPIreference.md) For stuff that's not Jumperless-specific, check out the [MicroPython Docs](https://docs.micropython.org/en/latest/index.html) ## Now you can live code with [JumperIDE](https://ide.jumperless.org/)! Holy shit I should have done this years ago Seriously, this is *such* a better experience than using the onboard text editor and REPL, you should play with it right now Go to [https://ide.jumperless.org/](https://ide.jumperless.org/) and press the connect button. [Image: JumperIDE before connecting] Choose the 3rd Jumperless port in that list (Windows may not put them in order, so if nothing happens, try the other ones) and click Connect Then open some examples (this update should overwrite the examples with the new ones) and hit the Run / Stop button [Image: gpio_basics.py running in JumperIDE] Press it again to Stop. If you make changes, hit the green Save button next to it (it takes a second and the script should be stopped.) [Image: an edited file waiting to be saved] **Serial terminal.** The `Serial Terminal` tab is port 1, the board's main menu, so you get the REPL and the menu side by side. Click `Connect` in that tab, choose the 1st Jumperless port this time, and type `m`. [Image: the Serial Terminal tab showing the main menu] **API reference.** The book icon opens the MicroPython API docs on the right, and if you have `Go To Clicked Function` checked, the docs should jump to whatever function you click in your code. [Image: the API reference following a click on adc_get] **JumperNet Registry.** The Jumperless icon in the sidebar is the JumperNet Registry, scripts people have shared from their own boards. It's one list, everybody sees the same one, and there's no account. Click a script and it opens in a tab, `Run` runs it on your board. [Image: the JumperNet Registry list] [Image: a registry script open in the editor] To share yours, have it open in a tab and click `Upload script to registry` at the top of the list. It asks for a name, your name, and a line about what it does (the code box is already filled in from the tab), and `Upload` puts it in the list for everyone right away, there's no review step. Work in progress scripts are fine, that's what it's for. [Image: the upload dialog] The three little icons on a row are open, edit and history. Anyone can edit anyone's script (it's wiki style, so fix the typos you find, and replace the prefilled `Your name` with yours or the edit gets filed under the last author), every version stays in the history, and `Load` opens an old one in its own tab without touching the current one. To delete a script, edit it and set the name to `delete`. Nothing checks who you are, so only delete your own. OLED images work the same way for uploading and deleting (`Upload OLED image` shows up when a `.bin` is the open tab, `Browse Images` is the gallery), except only the original author can edit one, and an image's history is the last 50 versions. Every script uploaded gets synced into the [JumperIDE repo](https://github.com/Architeuthis-Flux/JumperIDE/tree/main/cloudflare/script-registry-worker/scripts) on its own, so the scripts are all on GitHub too, images live only in the registry. [Image: a script's history] **OLED bitmaps.** `Tools` > `New OLED bitmap` gives you a 128x32 canvas, click or drag to draw, and with `Live to device` checked it should show up on the board's OLED as you draw ([more about the OLED here](04-oled.md)). `Download .bin` saves it and `Upload to registry` shares it. `Browse Images` in the registry shows everyone else's. [Image: drawing in the OLED bitmap editor] [Image: the same drawing on the board's OLED] [Image: the shared OLED images in the registry] ### If you write something cool, publish it to the JumperNet registry from JumperIDE for VS Code (**Jumperless: Publish Script to Registry**) and I'll add the good ones to the default examples. This is using [MicroPython's built-in Raw REPL](https://docs.micropython.org/en/latest/reference/repl.html#raw-mode-and-raw-paste-mode), so anything that can interact with that will work here. I've tested it with JumperIDE, both the web one and the VS Code extension, but anything that speaks the raw REPL (like `mpremote`) works on that 3rd port. There's also `jumperless.py` and `jumperless.pyi` module with stubs for all the built-in functions so syntax highlighting and autocomplete will work in your favorite code editor (sorry, autocomplete for jumperless functions doesn't work in the web IDE. JumperIDE for VS Code installs these stubs for you.) You can grab them here: ### [jumperless_module.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/jumperless_module.py) ### [jumperless.pyi](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/jumperless.pyi) They're also already on the board as `/python_scripts/lib/jumperless.py` and `/python_scripts/lib/jumperless.pyi`, so you can just copy them off it. ### Stubs by hand JumperIDE for VS Code sets this up for you (globally, or per folder with `Set Up This Folder for Jumperless Python`), but if you just want autocomplete in a project of your own it's 3 files, in VS Code or Cursor or whatever else runs Pylance. The `.pyi` is the one the editor reads. The `.py` is the same API as plain Python, for running on the Jumperless, no types in it. Make a `typings` folder in your project and put the `jumperless.pyi` from above in it. Pylance looks there for stubs by default, `from jumperless import *` should resolve, every function gets its real signature and docs. Next to it, make `typings/__builtins__.pyi` with one line in it: ```python from jumperless import * ``` That tells Pylance the whole API is a builtin, which is what it is on the Jumperless, `from jumperless import *` happens before your script runs so you don't need to write it, in the editor or on the Jumperless. Then a `pyrightconfig.json` in the project root: ```json { "stubPath": "typings", "reportMissingModuleSource": false } ``` The first line makes this folder override the global stubs my VS Code extension sets up (those are a few functions behind the one on main), the second one turns off the yellow squiggle you'd get on `from jumperless import *` because there's a stub but no `.py` behind it, it's harmless, just annoying. (note: `pip install jumperless` / `uv add jumperless` gets you the Jumperless Wokwi Bridge. Its module is `jumperless_pkg` and it has nothing to do with the board's API, the stubs aren't on PyPI.) ### Jupyter notebooks [micropython-magic](https://github.com/Josverl/micropython-magic) runs a notebook cell on the Jumperless while the rest of the notebook runs on your computer, and it works with the stubs above. `pip install micropython-magic` (or `uv add`), then in the first cell: ```python %load_ext micropython_magic %mpy --select /dev/cu.usbmodemJLV5port5 ``` The port is the 3rd Jumperless one, the same one JumperIDE uses, so disconnect JumperIDE first, mpremote can't open a port something else is holding. On a Mac it's `/dev/cu.usbmodemJLV5port5`, on Linux it's `/dev/ttyACM` and a number, on Windows it's a COM number and they're not always in order, it's the one where Enter gets you a `>>>`. `--verify` didn't work for me, plain `--select` does. Then start a cell with `# %%micropython` and it runs on the Jumperless: ```python # %%micropython for i in range(5): print(adc_get(0)) print(gpio_get(1)) oled_print("hi from a notebook") ``` [Image: a notebook cell running on the Jumperless] The `#` is on purpose, Pylance skips any cell that starts with a `%%` magic it doesn't know, so with a bare `%%micropython` you get no squiggles or hover or anything. micropython-magic turns `# %%micropython` back into the real magic when the cell runs, the editor sees plain Python, hovering `adc_get` gives you the signature and docs from the stub. [Image: the stub's signature in a cell that runs on the Jumperless] Run the `%load_ext` cell first. Until it's loaded, `# %%micropython` is just a comment and the cell runs on your computer, where `adc_get` isn't a thing (you get `NameError: name 'adc_get' is not defined`, that's what that means, the Jumperless never saw it). --- ## JumperIDE for VS Code [[Image: VSCode Marketplace]](https://marketplace.visualstudio.com/items?itemName=ArchiteuthisFlux.jumperide) [[Image: Open VSX]](https://open-vsx.org/extension/ArchiteuthisFlux/jumperide) [[Image: GitHub Release]](https://github.com/Architeuthis-Flux/JumperIDE-VSCode/releases/latest) [[Image: License: Unlicense]](https://github.com/Architeuthis-Flux/JumperIDE-VSCode/blob/main/LICENSE) Same idea as the web IDE, but it runs in VS Code (or Cursor, or VSCodium), so you get Pylance, git, and everything else you already have. Everything is in one sidebar, and the board shows up as a terminal. #### Install Search `JumperIDE` in the Extensions view, it's on the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=ArchiteuthisFlux.jumperide) and [Open VSX](https://open-vsx.org/extension/ArchiteuthisFlux/jumperide) (that's the one Cursor and VSCodium search). Or download the `.vsix` from the [latest release](https://github.com/Architeuthis-Flux/JumperIDE-VSCode/releases/latest) and run `code --install-extension jumperide-1.0.2.vsix` from the folder it's in. The first time it loads it sets up autocomplete for the whole Jumperless API in every workspace (the stubs go in `~/.jumperless/typings`) and asks you to reload the window. The hover docs need Python and Pylance, `Set Up This Folder for Jumperless` offers to install them if you don't have them. #### Connect Click the Jumperless icon in the activity bar. The `Actions` view is the whole thing: a connection button that shows the state, `Run` and `Stop`, saving, the OLED editor, the terminal, the API reference, and publishing. [Image: the Actions view] Click `Disconnected` (or `Jumperless` in the status bar, or `Jumperless: Connect` from the command palette) and pick the starred port, the one whose description ends in `MicroPython REPL — recommended`. On a Mac it reads `port5`. It's the 3rd Jumperless port and it isn't pre-selected, so don't just hit `Enter`, that gets you `port1`, the menu, which can't run scripts, and you end up in terminal-only mode with an empty file tree. [Image: the port picker] The status bar should turn pink with the board's name, `Device Files` fills in, and a `Jumperless REPL` terminal opens at the `>>>` prompt. [Image: connected] #### Files, run, stop Click a file in `Device Files` and it opens as a local working copy, so Pylance sees it and hovering a Jumperless function gives you its docs. `Cmd+S` / `Ctrl+S` pushes it back to the board. The icons in the view's header are disconnect, refresh, new file, new folder and a new OLED bitmap, `Delete from Device` is on the right-click menu. [Image: a device file open, with the hover docs] `F5` (or `Run Current File`) runs whatever is in the editor, as is, it doesn't save first. The output goes to the `Jumperless REPL` terminal. `Shift+F5` (or `Stop`) sends a `Ctrl+C`. [Image: running gpio_basics.py] [Image: Connect Run Stop] `Save to Jumperless` pushes the current file to the board (a file that didn't come from the board asks for a device path, prefilled with last time's answer), `Save Locally` saves a copy on your computer. #### Serial terminal `Serial Terminal` (or `Jumperless: Open Serial Terminal`) opens a second terminal on any port. `port1` is the starred one, that's the board's menu, and it types `m` for you so the menu comes up. `Ctrl+Q` goes through to the board in these terminals instead of to VS Code. Or pick `Use Jumperless App` and it runs the [standalone app](https://github.com/Architeuthis-Flux/Jumperless-App) in a terminal instead. [Image: the serial terminal port picker] [Image: the board's menu in the serial terminal] #### OLED bitmaps `New OLED Bitmap` asks whether the file lives on the Jumperless or on this computer (if you're not connected it just saves locally), then opens a 128x32 pixel editor, and any `.bin` in `Device Files` opens in it too. `Black`, `White` and `Toggle` are the pens, and with `Live to device` checked every stroke should show up on the board's OLED as you draw (it `Ctrl+C`s a running script to do it). `Save` writes the `.bin`, `Push to Device` sends the whole thing once. [Image: the OLED bitmap editor] [Image: the same drawing on the board's OLED] #### API reference `API Reference` opens the [MicroPython API docs](09.5-micropythonAPIreference.md) beside your code. The hover docs and autocomplete come from the same place. [Image: the API reference beside the code] #### JumperNet `JumperNet Registry` and `OLED Images` in the sidebar are the shared registry, the same one the web IDE shows. Click a script and it opens, right-click for `Save to Device`. `Publish to JumperNet` (or `Jumperless: Publish Script to Registry`) uploads the file in the editor, it asks for a name, a description and your name. Editing and history are in the web IDE only. [Image: a registry script opened from the sidebar] [Image: publishing a script] #### Settings `jumperless.serial.preferredPortIndex` is which Jumperless port gets the star (2, the 3rd one), `jumperless.serial.baud` is 115200, `jumperless.registry.baseUrl` is the registry, and `jumperless.connectOnStartup` opens the port picker when VS Code starts. #### Zero-import autocomplete On the board, scripts run with the full API preloaded (`from jumperless import *` happens before your code). The editor matches that automatically: on first activation the extension installs typed stubs and points your Python analyzer at them, so files opened from the device resolve the whole API with no imports and no setup. (Controlled by `jumperless.setup.autoSetUpGlobally`, on by default.) - `typings/jumperless.pyi` — typed stub, synced from [JumperlOS](https://github.com/Architeuthis-Flux/JumperlOS) (by hand, so it can be a few functions behind `scripts/jumperless.pyi` on main) - `typings/builtins.pyi` — standard-library builtins with Jumperless globals layered on top (typo detection still works) - `typings/time.pyi` — MicroPython `time` extras (`ticks_ms`, `sleep_ms`, …) To get the same thing in one of your own project folders (checked into that repo instead of user settings), run **Jumperless: Set Up This Folder for Jumperless Python** — it writes the `typings/` folder and a `pyrightconfig.json` into the workspace. --- ## Quick Start (Built-in REPL) From the main Jumperless menu, press `p` to enter the MicroPython REPL: [Image: Screenshot 2025-07-04 at 7 03 24 PM] ## REPL Navigation Up / Down arrow keys on a blank prompt will scroll through history, any other key will break out of history mode and enter multiline editing. So you can use arrow keys to navigate and edit the script. In history mode, the `>>>` prompts will be pink, when you're editing, they'll be blue. ## Hardware Control Functions All Jumperless hardware functions are automatically imported into the global namespace - no prefix is actually necessary. JumperIDE for VS Code already resolves them with its stubs, but in an editor without those it's probably good to use `import jumperless as j` so it doesn't complain about undefined names. --- ## Basic Script Structure ```jython """ My Jumperless Script Description of what this script does """ print("Starting my script...") # Connect some nodes connect(1, 5) connect(2, 6) # Set up GPIO gpio_set_dir(1, True) # Output gpio_set_dir(2, False) # Input # Main loop for i in range(10): gpio_set(1, True) time.sleep(0.5) gpio_set(1, False) time.sleep(0.5) # Read input (gpio_get returns truthy for HIGH, falsy for LOW) if gpio_get(2): print("Button pressed!") # Cleanup nodes_clear() print("Script complete!") ``` ## Loading and Running Scripts ### Method 1 (Recommended): [JumperIDE](https://ide.jumperless.org/) See [above](#now-you-can-live-code-with-jumperide) for instructions. It's at the top of the page for a reason, it's awesome. ### Method 2: File Manager From the REPL (enter `p` in the main menu), then type `files` to open the file manager: ```jython >>> files ``` Navigate to your script and press Enter to load it for editing, then press `Ctrl+P` to load it into the REPL for execution. **Note:** The standard Python `exec(open(...).read())` also works - the filesystem is mounted as a MicroPython VFS, so the built-in `open()` and the `os` module operate on the same files as `jfs`. ### Method 3: REPL Commands From the MicroPython REPL, you can use the following commands to manage scripts: ```jython # Put a saved script on the REPL input line to edit or run # (bare `load` lists the saved scripts with numbers) load my_script.py # Save the last executed script (auto-named if you leave the name off) save my_new_script.py ``` ### Method 4: Direct Execution From the main Jumperless menu, you can execute single commands. The `>` is the command, type it with the line, and use `print()` to see a value: ```jython > gpio_set(1, True) > print(adc_get(0)) > connect(1, 5) ``` ## REPL (Interactive Mode) ### Starting REPL From main menu: Press `p` ### REPL Commands ```jython CTRL + q - Exit REPL quit - Exit REPL history - Show command history and saved scripts save [name] - Save last executed script load - Load script by name or number files - Open file manager new - Create new script with eKilo editor edit - Open the last input in the eKilo editor multiline on|off|auto - Force multiline mode on or off, or go back to automatic (not in `helpl`, but it works) context - Toggle connection context helpl - Show REPL help help() - Show hardware commands ``` ### Navigation ``` ↑/↓ arrows - Browse command history ←/→ arrows - Move cursor, edit text TAB - Add 4-space indentation Enter - Execute (empty line in multiline to finish) Ctrl+Q - Force quit REPL or interrupt running script ``` ### Multiline Auto-Indent Mode The REPL automatically detects when you need multiple lines after a `:`, and it indents for you, so type the lines without the leading spaces. ```jython >>> def blink_led(): ... for i in range(5): ... gpio_set(1, True) ... time.sleep(0.5) ... gpio_set(1, False) ... time.sleep(0.5) ... >>> blink_led() ``` If you want *real* multiline mode, type `multiline on` and then `run` to execute what you typed. `new` and `edit` open the eKilo editor straight from the REPL. ### Command History - Use ↑/↓ arrows to browse previous commands - Commands are automatically saved - Type `history` to see all saved scripts ## Connection Context Switching The MicroPython REPL now supports **connection contexts** that determine how connections persist: - **`global` context**: Changes persist to global state - connections remain after exiting Python - **`python` context**: Connections you make in the session are undone when you exit, and the state from when you entered comes back **To toggle contexts:** Type `context` in the REPL **How it works:** - In `global` mode: Any connections you make become permanent, just like using the normal command interface - In `python` mode: The connection state when you entered the REPL is saved, and restored when you exit - The current context is shown in the REPL banner when you enter, and by `helpl`. Typing `context` prints it too. The default is `global` ## Built-in Examples The board comes with a pile of example scripts in `/python_scripts/examples/`. Every one of them is described on the [Examples](08.5-examples.md) page. There are three ways to run one. From the REPL, type `files`, open the script, and press `Ctrl+P`. From the main menu, `/` opens the file manager and `/python_scripts/examples/adc_basics.py` runs a script directly. From the clickwheel, `Files` lists the filesystem and clicking a `.py` file runs it. ## Troubleshooting **REPL not responding:** - Press Ctrl+Q to force quit on the main menu port (port 1), or Ctrl+C on the 3rd port that JumperIDE uses - Unplug / replug your Jumperless (don't worry, almost everything is persistent) **`@micropython.native` / `@micropython.viper` reboots the board:** - On 5.7.11.0 defining one is fine, calling it hard faults (the function pointer is missing its Thumb bit, so the first call is a UsageFault). After it comes back, press `m` on the main menu port and it prints a `[crashlog]` line saying so. ## Formatted Output and Custom Types The Jumperless module returns custom types that print nicely but also work in conditionals: ```jython # GPIO functions return custom types that print as readable strings state = gpio_get(1) # Prints "HIGH", "LOW", or "FLOATING" direction = gpio_get_dir(1) # Prints "INPUT" or "OUTPUT" pull = gpio_get_pull(1) # Prints "PULLUP", "PULLDOWN", or "NONE" # These types are also truthy/falsy for use in conditionals: if gpio_get(1): # True if HIGH, False if LOW or FLOATING print("Pin is HIGH") if gpio_get_dir(1): # True if OUTPUT, False if INPUT print("Pin is output") # Connection status works the same way connected = is_connected(1, 5) # Prints "CONNECTED" or "DISCONNECTED" if connected: # True if connected, False if not print("Nodes are connected") # Voltage and current readings are floats voltage = adc_get(0) # Returns float (e.g., 3.300) current = ina_get_current(0) # Returns float in A (e.g., 0.0123) power = ina_get_power(0) # Returns float in W (e.g., 0.4567) # All functions work with both numbers and string aliases gpio_set_dir("GPIO_1", True) # Same as gpio_set_dir(1, True) connect("TOP_RAIL", "GPIO_1") # Same as connect(101, 131) ``` --- # Examples Every Jumperless ships with a set of MicroPython example scripts in `/python_scripts/examples/` and four guided projects in `/projects/`. This page says what each one does, what you need to plug in, and what you'll see, so you can pick one instead of opening them one at a time. The sources are in the [JumperlOS repo](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts/ex) if you want to read them without a board. If you're new to this, start with the [555 LED Flasher](#555-led-flasher) project. It shows you where each part of a real circuit goes and measures each one once it's in. ## Running an example Go to [JumperIDE](https://ide.jumperless.org/) and click `USB/Serial`. Choose the 3rd Jumperless port in that list (Windows may not put them in order, so if nothing happens, try the other ones) and click `Connect`. The board's files show up in the `File Manager` on the left, the examples are in `python_scripts` > `examples`. Open one and hit `Run` (or `F5`), and the output should print in the `REPL Terminal` at the bottom, and on the OLED where the script uses it. Press `Run` again to stop it. If you make changes, hit the green `Save` button next to it or `Ctrl+S` / `Cmd+S` (it takes a second and the script should be stopped.) [Image: JumperIDE with gpio_basics.py open and running] There's more about the IDE on the [MicroPython](08-micropython.md#now-you-can-live-code-with-jumperide) page. If you'd rather stay on the board: `click` > `Files` > `examples` > pick a script and `click`, or type its path in the terminal, like `/python_scripts/examples/gpio_basics.py`. `Ctrl+Q` stops it from the terminal (it prints a `KeyboardInterrupt` traceback, that's normal), and if it doesn't take, hold the click wheel for a few seconds. A few of these call `nodes_clear()` when they start, which clears whatever you had connected. They're marked below. Load the slot again afterward and it's all back. ??? tip "Try it" 1. In JumperIDE, open `python_scripts` > `examples` > `gpio_basics.py` and hit `Run` (it clears the board first). `row 3` and `row 13` should light up green as `GPIO 1` and `GPIO 2` get wired to them, and the REPL prints what it reads back. 2. Open `adc_basics.py` and `Run` it. It should print the 4 ADC voltages twice a second. Hit `Run` again to stop it. [Image: gpio_basics.py: rows 3 and 13 on GPIO 1 and 2] On the board they all live in `/python_scripts/examples/`. The links go to the source on GitHub. ## The basics Short scripts, one idea each, no parts needed unless it says so. - **[dac_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/dac_basics.py)** - Steps `DAC 1` and both rails through 0 V, 1.5 V and 3.3 V, reading each one back with `dac_get()`. You'll see the rail LEDs change with it. It skips `DAC 0` because that one normally powers the probe. Runs once. It leaves the rails at 0 V when it's done, so set them again after. - **[adc_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/adc_basics.py)** - Prints the voltage on `ADC 0`-`3` twice a second, forever. It doesn't connect anything, so route a voltage to an ADC first (the `ADC` pad on the probe, or `connect(ADC0, 20)`) or you'll just see noise. `Run` again (or `Ctrl+Q`) to stop. - **[gpio_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/gpio_basics.py)** - Wires `GPIO 1` to `row 3` and `GPIO 2` to `row 13`, blinks the output, cycles the input's pull resistor through none / up / down, then bridges the two rows so the input reads the output back. Everything prints to the terminal and the OLED. Runs once. *Clears the board first.* - **[node_connections.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/node_connections.py)** - `connect()`, `is_connected()`, `disconnect()` and `print_bridges()` on four pairs of nodes (rows, `DAC0`, `GPIO_1`). The LEDs are the show here: each pair lights as its own net for half a second and then goes out. Runs once. *Clears the board first and last.* - **[machine_pin_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/machine_pin_basics.py)** - The same GPIO driven two ways: the Jumperless `gpio_*()` calls with node names, and stock MicroPython `machine.Pin` (`GPIO_1`-`8` are RP2350 pins 20-27). Routes `GPIO 1` to `GPIO 2` through the crossbar so one drives and the other reads, and ends with a `pin.irq()` edge count. Runs once, no parts. - **[file_io_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/file_io_basics.py)** - A tour of the [jfs](09.6-jfs.md) filesystem framed as a little data logger: write, append, seek, list, rename, delete, and what happens when you open too many files. Terminal only, runs once. - **[uart_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/uart_basics.py)** - Opens `machine.UART` at 115200 and routes `UART Tx`/`Rx` to the Nano header's `D0`/`D1`, then sends a message every 1.5 seconds. You need something in the Nano header listening; the script itself prints nothing after the banner. `Run` again (or `Ctrl+Q`) to stop. - **[uart_loopback.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/uart_loopback.py)** - Connects `UART Tx` and `Rx` to the same node so the board talks to itself, and prints what it reads back every half second. A good "is the UART alive" check with no parts. (At the moment it mostly prints `None`, the loopback needs a fix.) `Run` again (or `Ctrl+Q`) to stop. - **[voltage_monitor.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/voltage_monitor.py)** - Connects `ADC 0` to `row 12` and shows the voltage on the OLED and the terminal, refreshed constantly. It clears row 12 when it starts, so put your 0 to 3.3 V on row 12 (a pot wiper, a rail, a DAC) after it's running. `Run` again (or `Ctrl+Q`) to stop. ## Interrupts These use `machine.Pin.irq()`, which fires the instant a pin changes instead of whenever a loop gets around to checking. - **[pin_irq_basics.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/pin_irq_basics.py)** - Routes `GPIO 1` to `GPIO 2`, pulses one, and catches the rising and falling edges on the other with a handler. Prints the running counts and a `PASS` line. No parts, runs once. - **[pin_irq_freq_counter.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/pin_irq_freq_counter.py)** - A frequency counter. PWM on `GPIO 1`, routed to `GPIO 2` and to `row 20` so you can scope it, and a hard interrupt counting the edges. Turn the wheel to change the frequency and watch the measurement follow it. `Click` the wheel to quit. No parts. - **[pin_irq_reaction_game.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/pin_irq_reaction_game.py)** - A reaction timer. Wait for the green block on the LEDs, then tap as fast as you can; a hard interrupt timestamps the tap to the microsecond. Five rounds, then a best / average. Needs a tact switch across rows `28` and `30` (or a jumper wire in row 30 that you tap into row 28). If you never tap, it just ends after five misses. ## Interactive - **[interaction_demo.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/interaction_demo.py)** - Reads every control at once from one loop: tap a pad to move a bridge there, turn the wheel to slide it, press the probe buttons to shift its color, and flip the probe switch to `Measure` to have it walk up the board on its own. It prints nothing, watch the board. No parts. `Run` again (or `Ctrl+Q`) to stop. - **[led_brightness_control.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/led_brightness_control.py)** - Touch a pad and `DAC 0` goes to that pad number's share of 5 V (pad 30 is 2.5 V), dimming an LED on `row 15`. The OLED shows the voltage and the current it draws. Put an LED (with a resistor) from row 15 to `GND`. (This one crashes with a `NameError` on its first loop unless the probe is already on a pad, I'm fixing it.) `Run` again (or `Ctrl+Q`) to stop. - **[stylophone.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/stylophone.py)** - Touch a pad and `GPIO 1` plays a tone at 40 Hz times the pad number. The probe buttons lengthen and shorten the sustain. Put a speaker or piezo between `row 25` and `row 55`. `Run` again (or `Ctrl+Q`) to stop. - **[oled_layout_editor.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/oled_layout_editor.py)** - Lay out two lines of text on the OLED with the board itself: tap a top-row pad to put the selected text on the top line at that position, a bottom-row pad for the bottom line, rail pads to nudge it up and down, the wheel to change the size, `Connect` to change the font, and type the text in the terminal. `Remove` saves it to `/screens/layout.json` so you can read the numbers off for your own scripts. Needs an OLED. `Ctrl+C` to stop. ## OLED These need an [OLED](04-oled.md). - **[oled_stats_page.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/oled_stats_page.py)** - Builds a screen with the four ADC voltages and the uptime, and makes it the idle page in place of the logo. The numbers keep updating after the script ends, and the page steps aside for menus and comes back after. To get rid of it, run `import oledgui; oledgui.hide()` in the REPL. - **[test_oled_features.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/test_oled_features.py)** - Runs through the OLED functions one section at a time: text sizes, print mirroring, fonts, bitmaps, the framebuffer, scrolling. About 30 seconds. (Right now the terminal output stops partway, at the small text scrolling test.). Handy as a copy-paste reference for each call. - **oledgui.py** (in `/python_scripts/lib/`) - Not a script you run. It's the library the two above import: `Screen`, `Text`, `Line` and `Rect` objects on top of the retained-screen OLED calls, with `{adc:0}`-style tokens that update themselves. See the [API reference](09.5-micropythonAPIreference.md). ## Tools Bigger scripts that turn the board into an instrument. - **[oscilloscope.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/oscilloscope.py)** - A scope on the OLED. Tap a row with the probe to put `ADC 0` there, turn the wheel to change the selected setting, `click` to cycle through timebase, volts per division, trigger level, trigger edge and auto-range. The front probe button resets the settings; the rear one exits. Signals need to be 0 to 3.3 V. Needs an OLED. (Too big to load on a board without PSRAM right now, it says `out of memory`.) - **[usb_audio_mic.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/usb_audio_mic.py)** - Makes the Jumperless show up on your computer as a 2-channel 16 kHz microphone called `JL Audio In` (the rate is a `[usb_audio]` key in [config](06-config.md)), with `row 20` as the left channel and `row 40` as the right (±8 V full scale). Run it once to turn the device on (the serial port drops and comes back after a couple of seconds), then run it again to watch the levels. Record with anything: Audacity, QuickTime, a browser. `Run` again (or `Ctrl+Q`) stops the script, `JL Audio In` stays on your computer until you unplug the board. - **[excel_listener.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/excel_listener.py)** - The board side of the Excel GUI workbook: it takes connection and voltage commands over serial and answers with measurements. Needs `[usb_cdc] ignore_dtr = 1;` in your [config](06-config.md), and it tells you so if it's missing. *Clears the board first.* (Same problem as the oscilloscope, it doesn't load without PSRAM.) ## Utilities - **[async_read.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/async_read.py)** - Nothing Jumperless-specific, just how to check for keyboard input without blocking (`select.poll()` on `stdin`). Type something and it prints an `ack` and echoes it. Its banner says `Ctrl+C`, but `Ctrl+Q` is what stops it from the terminal. - **[test_neopixel.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/test_neopixel.py)** - Drives a WS2812 strip from `GPIO 1` with six animations; the wheel picks the speed and its button picks the mode. Data on `row 15`, ground on `row 14`, power from the top rail on `row 16` (set the rail to 5 V yourself, `Rails` > `Top` on the wheel or `dac_set(TOP_RAIL, 5)` in the REPL). Until the `neopixel` package is installed it stops at `ImportError: no module named neopixel`. It also shows how to install a module from the ViperIDE package manager, which you have to do first or `import neopixel` fails. *Clears the board first.* - **[viperide_reinit.py](https://github.com/Architeuthis-Flux/JumperlOS/blob/main/scripts/ex/viperide_reinit.py)** - The handshake an IDE runs when it connects: board info, flash usage and a file listing in a machine-readable format. Not really an example, but it's there if you're writing your own host tool. ## Guided projects The four projects in `/projects/` are the "hello world" circuits. Each one is a wiring file, a README, and a `main.py`. The first time you open one it loads as your circuit: the top rail gets set (5 V for the 555, 3.3 V for the others), the parts' pins light up along the board edge so you can see where they go, and the OLED walks you through them one at a time. You push the parts in, and the Jumperless can measure each one to tell you it's seated right. To open one, type `z` and its name in the terminal (`z 555`), or from the wheel go to `Files` > `projects` > the project's folder and `click` `wiring.yaml`. Then: - The OLED shows the step (`555 LED Flasher 3/9`) and the rows for that step's part light up (they stay lit while the steps are showing). [Image: the step card on the OLED] [Image: Logic Gates 101 just opened: the 74HC00's rows and the LED's rows marked along the edge, top rail at 3.3 V] Turn the wheel to move between steps, `hold` to put the steps away. In the terminal, `z steps` prints the current step, and `z steps next`, `z steps prev`, `z steps 3`, `z steps off` and `z steps on` do what they say. - Push the part in where the step says. Tap one of its rows with the probe and the OLED tells you which pin that is. - `z check R1` (any part name, or `z check step 3`) measures the part and prints what it read: a resistor's value, an LED's forward voltage, whether a chip answers. A resistor that reads `open` has a leg out of the hole, `short` means both legs are on the same side of the gap. The 555's resistor steps only measure, any value passes. The other projects check the value, so a resistor far from the one in the wiring file gets a `fail` and a `wrong part?`. - Opening a project doesn't make the connections between the parts. In this version you make those yourself, with the probe or the `+` command, from the wiring file's `connect:` lines. The 555's are all in the box below. - `z 555` runs `main.py` as soon as the project opens, `z 555 noscript` opens it without. From the Files browser, run `main.py` yourself from the project's folder. `Hold` the wheel for a few seconds to stop it. `Ctrl+Q` works too, as long as you haven't typed anything else into the terminal since it started. - What you build is saved in the project's own run file (`/projects/555/555_run.yaml`), so it's still there next time you open it. `z 555 new`, or clicking `wiring.yaml` in Files, starts over from the shipped wiring. `x` clears a project's parts along with its connections, so if a project opens with no parts and only a couple of steps, that's what happened to its run file. `z 555 new` brings it back. ??? tip "The 555's connections" With the chip's pin 1 at `row 35` and the other parts where the steps put them, this one line makes every connection in the wiring file: ``` + 35-gnd,36-7,38-top_rail,5-top_rail,10-top_rail,40-6,13-6,43-7,18-7,19-gnd,23-gnd,16-37,46-22 ``` That's the 555's `GND`, `TRIG`, `RESET` and `VCC`, R1 from the rail to `DIS`, R2 from `DIS` to `THR`, the cap and the LED to ground, and R3 from `OUT` (row 37) to the LED. [Image: the 555 wired up by that line] ### 555 LED Flasher An NE555 blinking an LED. `z 555`. Parts: an NE555 (DIP-8, pin 1 at `row 35`, across the middle gap), two resistors around 10k and 47k, a 10 µF capacitor, an LED, and a 330 Ω resistor for it. The exact values don't matter, anything in the right order of magnitude works, because `z check R1` measures each resistor and `main.py` uses those readings to work out the blink rate *your* parts should give. Then it counts the actual blinks and prints both next to each other, and even solves backward for the capacitor's real value from the blink it sees. [Source and full README.](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts/projects/555) ### Logic Gates 101 One gate of a 74HC00 quad NAND. `z nand00`. The Jumperless drives both inputs from GPIO, reads the output back on a third, and lights an LED from the same output. `main.py` prints the truth table with an `ok` / `WRONG` per row, then lets you type input pairs (`00`, `01`, `10`, `11`) and see what comes out. Parts: a 74HC00 (DIP-14, pin 1 at `row 35`), an LED, and a 330 Ω resistor. [Source.](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts/projects/nand00) ### Type to Screen An I2C OLED module pushed into the breadboard anywhere you like, wired to the Jumperless's I2C pins by the crossbar. `z i2cscrn`. `main.py` asks where you put `GND`, `VCC`, `SCL` and `SDA` (tap each with the probe), lets you pick the driver (SSD1306 128x32 or 128x64, SH1106), and then whatever you type in the terminal shows up on the module. Parts: any 4-pin SSD1306 or SH1106 module. Turn the Jumperless's own top OLED off while you use this, they share the I2C pins. [Source.](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts/projects/i2cscrn) ### EEPROM Dumper A 24C02 or 24C16 serial EEPROM read over I2C and hex-dumped to the terminal, with the write-protect pin held by the board's own wiring. `z eeprom`. Parts: the EEPROM (DIP-8, pin 1 at `row 35`) and two 4.7k pull-up resistors. Same note as above about the top OLED. [Source.](https://github.com/Architeuthis-Flux/JumperlOS/tree/main/scripts/projects/eeprom) ## Where to go next - **[MicroPython](08-micropython.md)** - the REPL, JumperIDE, and how scripts are structured. - **[MicroPython API Reference](09.5-micropythonAPIreference.md)** - every function these scripts call. - **[JFS](09.6-jfs.md)** - reading and writing files on the board. - **[Parts](05.5-parts.md)** - the part placement and Auto Scan the guided projects are built on. If you write something cool, send it to me and I'll add it to the examples. --- # MicroPython API Reference [Node Connections](#node-connections) (Connecting stuff with the Jumperless) - *[Examples](#node-connections)*: - `connect(node1, node2, [duplicates=-1])` - Connect two nodes (duplicates: -1=config default, N=force N) - `disconnect(node1, node2)` - Disconnect nodes (`node2` = -1 clear everything connected to `node1`) - `fast_connect(node1, node2, [duplicates=-1])` - Connect, skip LED update - `fast_disconnect(node1, node2)` - Disconnect, skip LED update - `is_connected(node1, node2)` - Check if nodes are connected - `nodes_clear()` - Clear all connections [DAC](#dac) (Digital-to-Analog Converter) - *[Examples](#dac)*: - `dac_set(channel, voltage)` - Set DAC output voltage - `dac_get(channel)` - Get DAC output voltage [ADC](#adc) (Analog-to-Digital Converter) - *[Examples](#adc)*: - `adc_get(channel)` - Read ADC input voltage [GPIO](#gpio) (General Purpose Input / Output from the RP2350B) - *[Examples](#gpio)*: - `gpio_set(pin, value)` - Set GPIO pin state - `gpio_get(pin)` - Read GPIO pin state - `gpio_set_dir(pin, direction)` - Set GPIO pin direction - `gpio_get_dir(pin)` - Get GPIO pin direction - `gpio_set_pull(pin, pull)` - Set GPIO pull-up/down - `gpio_get_pull(pin)` - Get GPIO pull-up/down - `gpio_claim_pin(pin)` - Take a pin over for your script so the background scanner leaves it alone - `gpio_release_pin(pin)` - Give a claimed pin back - `gpio_release_all_pins()` - Give all claimed pins back (happens at script exit anyway) [INA](#ina) (Current/Power Monitor) - *[Examples](#ina)*: - `ina_get_current(sensor)` - Read current in amps - `ina_get_voltage(sensor)` - Read bus voltage (same as `ina_get_bus_voltage`) - `ina_get_bus_voltage(sensor)` - Read bus voltage - `ina_get_power(sensor)` - Read power in watts [PWM](#pwm) (Pulse Width Modulation) - *[Examples](#pwm)*: - `pwm(pin, [frequency], [duty])` - Setup PWM on GPIO pin - `pwm_set_duty_cycle(pin, duty)` - Set PWM duty cycle - `pwm_set_frequency(pin, freq)` - Set PWM frequency - `pwm_stop(pin)` - Stop PWM on pin [OLED Display](#oled-display) (Organic Light Emitting Diode 128 x 32 pixel display) - *[Examples](#oled-display)*: - `oled_print("text")` - Display text - `oled_clear()` - Clear display - `oled_connect()` - Connect OLED - `oled_disconnect()` - Disconnect OLED - `Screen()` / `Text(...)` (oledgui) - Retained, live-updating layouts ([OLED Layout / Screens](#oled-layout-screens-retained-live-updating)) [Graphic Overlays](#graphic-overlays) (Directly controlling the breadboard LEDs) - *[Examples](#graphic-overlays)*: - `overlay_set(name, x, y, height, width, colors)` - Create/update overlay - `overlay_clear(name)` - Remove overlay - `overlay_clear_all()` - Remove all overlays - `overlay_shift(name, dx, dy)` - Move overlay relative - `overlay_place(name, x, y)` - Move overlay absolute - `overlay_set_pixel(x, y, color)` - Set single pixel - `overlay_count()` - Get active overlay count - `overlay_serialize()` - Get overlays as JSON [Probe Functions](#probe) (Probe status / actions) - *[Examples](#probe)*: - `probe_read_blocking()` - Wait for probe touch (don't return until a pad is touched) - `probe_read_nonblocking()` - Check probe immediately (return -1 if no pad is touched) - `get_button([blocking=True])` - Get button state (default: blocking) - `probe_button([blocking=True])` - Get button state (default: blocking) - `probe_button_blocking()` - Wait for button press - `probe_button_nonblocking()` - Check buttons immediately - `check_button()` - Check for probe button presses - `get_switch_position()` - Get probe switch position (0=measure, 1=select, -1=unknown) - `set_switch_position(position)` - Set switch position manually - `check_switch_position()` - Check switch via current sensing - `probe_autoconnect([enable])` - Get/set probe auto-connect (True/False, temporary until reboot) - `probe_tap(node)` - Fake a probe tap on a node (held ~1.2s, node `, `>=` * **Arithmetic**: `+`, `-`, `*`, `//`, `%` * **Conversions**: `int(node)` converts to integer value **Example:** ```jython my_pin = node("D7") led_pin = node(15) connect(my_pin, led_pin) oled_print(my_pin) # Displays 'D7' on the OLED # Arithmetic and comparison work! if my_pin 10 MΩ sensors) and may cause a small leakage current or change the measured state. If your external circuit is super high‑impedance, either disable floating-read for that pin or add a defined pull resistor. ### `gpio_get_read_floating(pin)` Returns whether floating-read detection is enabled for a GPIO pin. * `pin`: The GPIO pin number (1-10). * Returns: `True` if floating-read is enabled, otherwise `False`. * **Aliases**: `get_gpio_read_floating()` **Example:** ```jython # Enable floating detection on GPIO 3 gpio_set_read_floating(3, True) # Confirm it is enabled print(gpio_get_read_floating(3)) # True or False # If a connected high‑impedance sensor behaves oddly, disable floating-read gpio_set_read_floating(3, False) ``` **Pinout:** * `1-8`: Routable GPIO pins `GPIO_1` to `GPIO_8`. * `9`: `UART_TX`. * `10`: `UART_RX`. Anywhere a pin number is taken you can also pass the node constants `GPIO_1` to `GPIO_8`, `UART_TX`/`UART_RX`, or the raw RP2350 numbers `20`-`27`. **Example:** ```jython # Set GPIO 1 as an output and turn it on gpio_set_dir(1, True) gpio_set(1, True) # Set GPIO 2 as an input with a pull-up gpio_set_dir(2, False) gpio_set_pull(2, 1) # Read the state of GPIO 2 state = gpio_get(2) if state: # GPIOState is truthy when HIGH, falsy when LOW or FLOATING print("GPIO 2 is HIGH") # You can also print it directly - shows "HIGH", "LOW", or "FLOATING" print("State: " + str(state)) ``` --- ## PWM (Pulse-Width Modulation) Functions for generating PWM signals on GPIO pins. ### `pwm(pin, [frequency], [duty_cycle])` Sets up and starts a PWM signal on a GPIO pin. * `pin`: The GPIO pin to use (1-8). * `frequency` (optional): The PWM frequency in Hz (0.01 to 62500000). Defaults to 1, so `pwm(pin)` on its own gives you a 1Hz blink - pass a frequency if you want anything faster. * `duty_cycle` (optional): The duty cycle from 0.0 to 1.0. Defaults to 0.5. * **Aliases**: `set_pwm()` **Frequency Ranges:** * **Hardware PWM**: 10Hz to 62.5MHz (high precision, hardware peripheral) * **Slow PWM**: 0.01Hz to 10Hz (hardware timer based, precise timing) * **Automatic Selection**: System automatically chooses the appropriate mode based on frequency ### `pwm_set_duty_cycle(pin, duty_cycle)` Changes the duty cycle of an existing PWM signal. * `pin`: The GPIO pin number (1-8). * `duty_cycle`: The new duty cycle (0.0 to 1.0). * **Aliases**: `set_pwm_duty_cycle()` ### `pwm_set_frequency(pin, frequency)` Changes the frequency of an existing PWM signal. * `pin`: The GPIO pin number (1-8). * `frequency`: The new frequency in Hz (0.01 to 62500000). * **Aliases**: `set_pwm_frequency()` ### `pwm_stop(pin)` Stops the PWM signal on a GPIO pin. * `pin`: The GPIO pin number (1-8). * **Aliases**: `stop_pwm()` **Example:** ```jython # Hardware PWM: 1kHz, 25% duty cycle on GPIO_1 pwm(GPIO_1, 1000, 0.25) # Slow PWM: 0.1Hz (10 second period), 50% duty cycle on GPIO_2 pwm(GPIO_2, 0.1, 0.5) # Ultra-slow PWM: 0.01Hz (100 second period, the slowest it goes), 25% duty cycle on GPIO_3 pwm(GPIO_3, 0.01, 0.25) # Change the duty cycle to 75% pwm_set_duty_cycle(GPIO_1, 0.75) # Change frequency (will automatically switch between hardware/slow PWM) pwm_set_frequency(GPIO_1, 500) # 500Hz (hardware PWM) pwm_set_frequency(GPIO_1, 5) # 5Hz (slow PWM) # Stop the PWM signal pwm_stop(GPIO_1) ``` --- ## Graphic Overlays Functions for creating and manipulating 2D color overlays on the breadboard LEDs. The breadboard is addressed as a **10-row × 30-column grid**: * **Row 1-5**: Top half (A-E) * **Row 6-10**: Bottom half (F-J) * **Column 1-30**: Breadboard columns 1-30 ### `overlay_set(name, x, y, height, width, colors)` Creates or updates a graphic overlay. * `name`: Unique string identifier for the overlay. * `x`: Starting column (**1-30**). Matches breadboard column labels. * `y`: Starting row (**1-10**). 1-5 = Top half (A-E), 6-10 = Bottom half (F-J). * `height`: Height in rows (y-dimension). * `width`: Width in columns (x-dimension). * `colors`: List of 32-bit integer colors (0xRRGGBB). Can be a flat list or 2D list (rows). * Returns the overlay index. **Note:** If you pass a 2D array (list of lists) for `colors`, the outer list represents rows (height) and the inner lists represent columns (width). Make sure your `width` and `height` arguments match the data shape. **Example:** ```jython # Create a 5-wide, 2-high overlay at x=12, y=5 # x=12 (Column 12), y=5 (Row 5/E) colors_2d = [ [0x550000, 0x550000, 0x550000, 0x550000, 0x550000], # Row 0 [0x550000, 0x550000, 0x550000, 0x550000, 0x550000] # Row 1 ] overlay_set("box_2d", 12, 5, 2, 5, colors_2d) ``` ### `overlay_clear(name)` Removes a specific overlay. * `name`: The identifier of the overlay to remove. * Returns `1` if found/removed, `0` otherwise. ### `overlay_clear_all()` Removes ALL active overlays. ### `overlay_shift(name, dx, dy)` Moves an overlay by a relative offset. Wraps around edges. * `name`: Overlay identifier. * `dx`: Column delta (e.g., 1 for right, -1 for left). * `dy`: Row delta (e.g., 1 for down, -1 for up). * Returns `1` if found, `0` otherwise. ### `overlay_place(name, x, y)` Moves an overlay to a specific absolute position. Wraps around edges. * `name`: Overlay identifier. * `x`: New column (**1-30**). * `y`: New row (**1-10**). * Returns `1` if found, `0` otherwise. **Example:** ```jython # Use the probe to move the box overlay import jumperless as j import time colors_2d = [ [0x550000, 0x104000, 0x005500, 0x001040, 0x000055], # Row 0 [0x550000, 0x104000, 0x005500, 0x001040, 0x000055], # Row 1 ] j.overlay_set("box_2d", 12, 5, 2, 5, colors_2d) while True: node = j.probe_read_blocking() j.overlay_place("box_2d",node, 5) time.sleep(0.1) ``` ### `overlay_set_pixel(x, y, color)` Sets a single pixel directly (convenience wrapper). * `x`: Column (1-30). * `y`: Row (1-10). * `color`: 0xRRGGBB color. ### `overlay_serialize()` Returns the current state of all overlays as a JSON string. --- ## INA (Current/Power Monitor) Functions for reading data from the INA219 current sensors. ### `ina_get_current(sensor)` Reads the current in Amps. * `sensor`: The sensor to read (0 or 1). * **Aliases**: `get_current()` ### `ina_get_voltage(sensor)` Reads the bus voltage in Volts - the same reading as `ina_get_bus_voltage()`. * `sensor`: The sensor to read (0 or 1). * **Aliases**: `get_voltage()` ### `ina_get_bus_voltage(sensor)` Reads the bus voltage in Volts. * `sensor`: The sensor to read (0 or 1). * **Aliases**: `get_bus_voltage()` ### `ina_get_power(sensor)` Reads the power in Watts. * `sensor`: The sensor to read (0 or 1). * **Aliases**: `get_power()` **Example:** ```jython current_mA = ina_get_current(0) * 1000 print("Current: " + str(current_mA) + " mA") ``` --- ## OLED Display Functions for controlling the onboard OLED display with advanced text, graphics, and bitmap capabilities. ### Basic Display Functions #### `oled_print(text, [size=-1])` Displays text on the OLED screen. It can print strings, numbers, and custom Jumperless types. * `text`: The content to display. * `size` (optional): Text size (0=small scrolling, 1=normal, 2=large). If -1 or omitted, uses the default size set by `oled_set_text_size()`. Defaults to 2. **Size Modes:** - **Size 0**: Small scrolling text (perfect for terminal-like output with multiple lines) - **Size 1**: Normal centered text - **Size 2**: Large centered text (default) **Example:** ```jython oled_print("Hello!") # Uses default size oled_print("Big Text", 2) # Large text oled_print("Scrolling", 0) # Small scrolling text ``` #### `oled_clear([show=True])` Clears the OLED display. * `show` (optional): If `True` (default), automatically calls `oled_show()` after clearing. Set to `False` for animations to avoid flashing between frames. **Example:** ```jython # Normal use - clears and shows oled_clear() # Animation loop - clear without showing to prevent flashing for frame in range(100): oled_clear(False) # Clear without show # Draw your frame... oled_show() # Show once after drawing ``` #### `oled_show()` Refreshes the OLED display to show the latest changes. **Note:** Usually not needed as `oled_print()` handles display updates automatically. Required after `oled_set_pixel()` calls. #### `oled_connect()` Connects the I2C lines to the OLED display. #### `oled_disconnect()` Disconnects the I2C lines from the OLED display. ### Text Size Control #### `oled_set_text_size(size)` Set the default text size for all subsequent `oled_print()` calls. * `size`: Text size (0=small scrolling, 1=normal, 2=large) * Returns: `True` if successful, `False` if invalid size **Example:** ```jython import jumperless as j # Use small scrolling text for terminal output j.oled_set_text_size(0) for i in range(10): j.oled_print(f"Line {i+1}") # Each creates a new scrolling line # Switch to large text j.oled_set_text_size(2) j.oled_print("BIG TEXT") ``` #### `oled_get_text_size()` Get the current default text size. * Returns: Current text size (0, 1, or 2) **Example:** ```jython current_size = oled_get_text_size() print(f"Current OLED text size: {current_size}") ``` ### Print Redirection #### `oled_copy_print(enable)` Enable or disable copying Python `print()` output to the OLED display in real-time. When enabled, all `print()` statements will appear on both the serial console and the OLED in small scrolling text mode. This is perfect for debugging without a serial connection. * `enable`: `True` to enable, `False` to disable **Example:** ```jython import jumperless as j # Enable print copying j.oled_copy_print(True) # These appear on both serial AND OLED print("Starting test...") voltage = j.adc_get(0) print(f"Voltage: {voltage:.2f}V") print("Test complete!") # Disable print copying j.oled_copy_print(False) print("This only goes to serial") ``` ### Font System #### `oled_get_fonts()` Get a list of all available font families. * Returns: List of font family names (strings) **Available Fonts:** 1. Eurostile - sans serif, futuristic, like Xenon pinball or Star Trek 2. Jokerman - decorative font with lots of extra artistic dots and bars 3. Comic Sans - sans serif, comic book style lettering 4. Courier New - slab serif, typewriter style 5. New Science - sans serif, humanist/geometric, like Helvetica 6. New Science Ext - wider version of New Science 7. Andale Mono - fixed spacing sans serif, used for small text 8. Free Mono 9. Iosevka Regular - fixed spacing sans serif, like Lucida, slashed zero 10. Berkeley Mono - fixed spacing, sans serif, large X height 11. Pragmatism - sans serif, vaguely romantic (Descriptions by MadBodger) **Example:** ```jython import jumperless as j import time fonts = j.oled_get_fonts() print(f"Available fonts: {fonts}") # Display each font for font in fonts: j.oled_set_font(font) j.oled_print(font, 2) time.sleep(1.5) ``` #### `oled_set_font(name)` Set the current font family by name. The font will remain active until changed. * `name`: Font family name (case-insensitive) * Returns: `True` if successful, `False` if font not found **Example:** ```jython import jumperless as j # Set to Jokerman if j.oled_set_font("Jokerman"): j.oled_print("Fun Font!", 2) else: print("Font not found") # Set to Courier for code-like display j.oled_set_font("Courier New") j.oled_print("Code Style", 2) ``` #### `oled_get_current_font()` Get the name of the currently active font family. * Returns: Current font family name (string) **Example:** ```jython import jumperless as j current = j.oled_get_current_font() print(f"Current font: {current}") # Save and restore font saved_font = j.oled_get_current_font() j.oled_set_font("Jokerman") j.oled_print("Temporary", 2) j.oled_set_font(saved_font) # Restore original ``` ### Bitmap Display #### `oled_load_bitmap(filepath)` Load a bitmap file into the internal bitmap buffer. * `filepath`: Path to bitmap file (e.g., "/images/logo.bin") * Returns: `True` if loaded successfully, `False` on error **Bitmap File Format:** - **Raw Format**: Pure bitmap data (guesses dimensions from file size) - 128x32 = 512 bytes - 128x64 = 1024 bytes - 64x32 = 256 bytes - 128x31 = 496 bytes Any other raw file size is rejected. - **Custom Format**: 4-byte header + bitmap data - Bytes 0-1: Width (16-bit little-endian) - Bytes 2-3: Height (16-bit little-endian) - Remaining: Bitmap data (1 bit per pixel, packed) **Example:** ```jython if oled_load_bitmap("/images/jogo32h.bin"): print("Logo loaded!") else: print("Failed to load logo") ``` #### `oled_display_bitmap(x, y, width, height, [data=None])` Display a bitmap on the OLED. **Two modes:** 1. **Use loaded bitmap**: If `data` is `None`, displays the bitmap from `oled_load_bitmap()` 2. **Direct data**: If `data` is provided, displays that bitmap immediately * `x`: X position on display (0-127) * `y`: Y position on display (0-31) * `width`: Bitmap width in pixels (ignored if using loaded bitmap) * `height`: Bitmap height in pixels (ignored if using loaded bitmap) * `data` (optional): Bitmap data to display directly * Returns: `True` if successful, `False` on error **Example:** ```jython import jumperless as j # Method 1: Load then display j.oled_load_bitmap("/images/logo.bin") j.oled_display_bitmap(0, 0, 0, 0) # width/height ignored for loaded bitmap # Method 2: Display direct data bitmap_data = bytes([0xFF, 0x00, 0xFF, 0x00] * 128) # Striped pattern j.oled_display_bitmap(0, 0, 128, 32, bitmap_data) ``` #### `oled_show_bitmap_file(filepath, x, y)` Convenience function that loads and displays a bitmap in one call. * `filepath`: Path to bitmap file * `x`: X position on display * `y`: Y position on display * Returns: `True` if successful, `False` on error **Example:** ```jython import jumperless as j import time # One-liner to show a logo j.oled_show_bitmap_file("/images/jogo32h.bin", 0, 0) time.sleep(2) # Show another image j.oled_show_bitmap_file("/images/badge.bin", 32, 8) ``` ### Framebuffer and Pixel Manipulation The framebuffer functions provide low-level access to the display memory, enabling advanced graphics, animations, and screen capture. **Framebuffer Format:** - 1 bit per pixel (0=black/off, 1=white/on) - Organized in vertical bytes (8 pixels per byte) - Size: 512 bytes (128x32) or 1024 bytes (128x64) - Compatible with Adafruit SSD1306 format #### `oled_get_framebuffer()` Get a copy of the current OLED framebuffer as a bytes object. * Returns: Framebuffer data as `bytes` (512 or 1024 bytes depending on display size), or `None` if no OLED is connected #### `oled_set_framebuffer(data)` Set the entire OLED framebuffer from bytes or bytearray. * `data`: Framebuffer data (must be correct size for display) * Returns: `True` if successful, `False` if wrong size **Example:** ```jython import jumperless as j import time # Capture current display fb = j.oled_get_framebuffer() print(f"Framebuffer size: {len(fb)} bytes") # Save to file for later with open("/screen_capture.bin", "wb") as f: f.write(fb) j.oled_clear() time.sleep(2) # Load and display saved screen with open("/screen_capture.bin", "rb") as f: fb_data = f.read() if j.oled_set_framebuffer(fb_data): print("Screen restored!") else: print("Wrong framebuffer size") ``` #### `oled_get_framebuffer_size()` Get the dimensions and size of the framebuffer. * Returns: Tuple of `(width, height, buffer_size_in_bytes)` **Example:** ```jython width, height, size = oled_get_framebuffer_size() print(f"Display: {width}x{height}, {size} bytes") # Output: Display: 128x32, 512 bytes # Calculate pixels total_pixels = width * height print(f"Total pixels: {total_pixels}") ``` #### `oled_set_pixel(x, y, color)` Set a single pixel on the OLED. **Note:** Call `oled_show()` after setting pixels to make changes visible. * `x`: X coordinate (0 to width-1) * `y`: Y coordinate (0 to height-1) * `color`: Pixel color (0=black/off, 1=white/on) * Returns: `True` if successful, `False` if OLED not connected **Example:** ```jython import jumperless as j # Draw a diagonal line j.oled_clear() for i in range(32): j.oled_set_pixel(i, i, 1) j.oled_show() # Draw a box for x in range(20, 108): j.oled_set_pixel(x, 10, 1) # Top edge j.oled_set_pixel(x, 22, 1) # Bottom edge for y in range(10, 23): j.oled_set_pixel(20, y, 1) # Left edge j.oled_set_pixel(107, y, 1) # Right edge j.oled_show() ``` #### `oled_get_pixel(x, y)` Get the color value of a single pixel. * `x`: X coordinate (0 to width-1) * `y`: Y coordinate (0 to height-1) * Returns: Pixel color (0=black/off, 1=white/on, -1=error) **Example:** ```jython # Check if a pixel is set pixel = oled_get_pixel(64, 16) if pixel == 1: print("Pixel is white/on") elif pixel == 0: print("Pixel is black/off") else: print("Error reading pixel") ``` ### OLED Layout / Screens (retained, live-updating) The layout system lets you build a **retained screen** out of positioned text and shapes, then `show()` it. A background render service keeps the screen up to date: any text containing `{token}` templates re-resolves automatically, and you can move/restyle elements live. This is ideal for stats pages and for designing layouts you intend to bake into firmware. It is available as an object-oriented wrapper in the `oledgui` module, or as a flat handle-based API on the native `jumperless` module. #### Object-oriented API (`oledgui`) ```python from oledgui import Screen, Text, Line, Rect, set_var, ALIGN_CENTER, ALIGN_TOP scr = Screen() # Title centered along the top, divider beneath it scr.add(Text("JUMPERLESS", font="Eurostile", size=8, halign=ALIGN_CENTER, valign=ALIGN_TOP)) scr.add(Line(0, 11, 127, 11)) # Live readouts - these update on their own every render tick scr.add(Text("A0 {adc:0}V", x=2, y=14, font="Pragmatism", size=8)) scr.add(Text("up {uptime}", x=2, y=23, font="Pragmatism", size=7)) scr.show() # becomes the active display # Push your own values into a {name} token set_var("status", "ready") scr.save("dashboard") # -> /screens/dashboard.json ``` **Live value tokens** (resolved in the background, no redraw loop needed): | Token | Value | |-------|-------| | `{adc:N}` | ADC channel N voltage | | `{gpio:N}` | GPIO N state (`HIGH`/`LOW`) | | `{dac:N}` | DAC channel N voltage | | `{uptime}` | time since boot (`m:ss`) | | `{millis}` | milliseconds since boot | | `{freemem}` | free heap bytes | | `{undo}` | last undo/redo action label | | `{name}` | any custom value pushed with `set_var("name", value)` | **Fonts** are selected by name + point size (nearest available size is used, falling back to Pragmatism for unknown names). Get available names with `oled_get_fonts()`. **Positioning** is absolute `(x, y)` by default; pass `halign`/`valign` (or call `.anchor(h, v)`) to anchor an element so it adapts to content width. **Classes:** * `Screen()` — `.add(el)`, `.text(...)`, `.shape(...)`, `.show(persist=False)`, `.hide()`, `.clear()`, `.save(name)`, `.free()` * `Text(text, x, y, font, size, halign, valign, z)` — live props: `.text`, `.font`, `.size`, `.x`, `.y`, `.z`, `.visible` * `Shape(kind, x, y, w, h, filled, z)` plus helpers `Line(x, y, x2, y2)` and `Rect(x, y, w, h, filled=False)` * `load_screen(name)` → `Screen` (loads `/screens/.json`) * module-level `hide()` and `reset()` — hide the active screen, or free every screen **Constants:** `ALIGN_LEFT` (0), `ALIGN_CENTER` (1), `ALIGN_RIGHT` (2), `ALIGN_TOP` (0), `ALIGN_MIDDLE` (1), `ALIGN_BOTTOM` (2), `ALIGN_FREE` (3), `SHAPE_LINE` (0), `SHAPE_RECT` (1), `SHAPE_FILLED_RECT` (2). #### Flat API (native `jumperless`) The OO classes are built on these; use them directly if you prefer: * `oled_screen()` → screen handle * `oled_add_text(screen, text, x=, y=, font=, size=, halign=-1, valign=-1, z=0)` → element handle * `oled_add_shape(screen, kind, x=, y=, w=, h=, filled=, z=)` → element handle (kind: 0=line, 1=rect, 2=filled rect) * `oled_set(elem, prop, value)` — `prop` is `text`/`font` (str) or `x`/`y`/`w`/`h`/`z`/`size`/`visible`/`anchor`/`halign`/`valign`/`shape`/`filled`/`box` (int, `box` draws a rectangle around the text) * `oled_set_var(name, value)` — push a live `{name}` value * `oled_screen_show(screen, persist=False)` / `oled_screen_hide()` * `oled_screen_save(screen, name)` / `oled_screen_load(name)` → screen handle * `oled_screen_clear(screen)` / `oled_screen_free(screen)` * `oled_screen_reset()` — free every screen and blank the panel By default `show()` is a one-shot: the screen is displayed and live-updates while it's on top, but it doesn't come back once something else draws over it, and it's torn down when your script ends. Pass `persist=True` to make it the idle display instead — it takes the boot logo's place, gets redrawn whenever the UI returns to idle, and survives the script until `hide()`. Call `oled_screen_reset()` (or `oledgui.reset()`) at the top of a script, otherwise re-running it leaks screen handles until the pool is empty. ```python import jumperless as j s = j.oled_screen() j.oled_add_text(s, "Hello {uptime}", x=0, y=0, font="Pragmatism", size=10) j.oled_screen_show(s) ``` #### Designing layouts to bake into firmware Build and tweak a screen live (e.g. with the `oled_layout_editor.py` example, driven by the clickwheel + probe), then `save()` it. The resulting `/screens/.json` is human-readable — read the `font`, `size`, `x`, `y`, `halign`/`valign` values straight out of it and copy them into native C++ code. ### Advanced OLED Examples #### Debug Output to OLED ```jython import jumperless as j import time # Enable print copying for debugging j.oled_copy_print(True) # Your code with debug output for i in range(10): voltage = j.adc_get(0) print(f"V{i}: {voltage:.2f}V") time.sleep(0.5) j.oled_copy_print(False) ``` #### Simple Oscilloscope ```jython import jumperless as j import math import time # Clear display j.oled_clear() width, height, _ = j.oled_get_framebuffer_size() j.connect(j.ADC0, 11) # Draw sine wave animation for offset in range(100): j.oled_clear(False) # Don't show() after clear to avoid flashing # Draw axes for x in range(width): if (x % 4 == 0): j.oled_set_pixel(x, height//2, 1) # Dotted center line # Draw sine wave for x in range(width): # y = int(height//2 + 10 * math.sin((x + offset) / 10)) # Dummy sine wave y = int(j.get_adc(0)) + 16 if 0 `, `>=` * **Arithmetic**: `+`, `-`, `*`, `//`, `%` * **Conversions**: `int(pad)` converts to integer value **Example:** ```jython pad = probe_read(False) # Non-blocking if pad != NO_PAD: print(pad) if pad 60: # Works! node_2 -= 60 connect(node_1, node_2) ``` ### `probe_button([blocking=True], [consume=False])` Reads the state of the buttons on the probe. * `blocking` (optional): If `True` (default), waits for a button press. If `False`, returns the current state immediately. * `consume` (optional): If `True`, clears the button press after reading (one-shot detection). If `False` (default), the button state persists while held, allowing repeated reads in a loop. * Returns a `ProbeButton` object (`CONNECT_BUTTON`, `REMOVE_BUTTON`, or `BUTTON_NONE`). * **Aliases**: `get_button()`, `button_read()`, `read_button()`, `probe_button_blocking()`, `probe_button_nonblocking()`, `check_button()`, `button_check()` * Both arguments are positional - write `get_button(False, True)`, not `get_button(consume=True)`. `probe_button_blocking()` and `probe_button_nonblocking()` take only `consume`; `check_button()` and `button_check()` take no arguments. **Consume Behavior:** - `consume=False` (default): Holding the button returns the same state repeatedly - **ideal for continuous control** (e.g., incrementing values while held) - `consume=True`: Each button press is detected only once - ideal for menu navigation or one-shot actions **Example:** ```jython # Continuous control - hold button to keep changing hue while True: button = check_button() # non-blocking, never consumes if button == BUTTON_CONNECT: hue += 1 # Keeps incrementing while button is held set_net_color_hsv(1, hue) elif button == BUTTON_REMOVE: hue -= 1 # Keeps decrementing while button is held set_net_color_hsv(1, hue) time.sleep(0.05) # One-shot detection - each press counted once presses = 0 while presses {menu_items[selected]}") elif direction == j.CLICKWHEEL_DOWN: selected = (selected - 1) % len(menu_items) print(f"> {menu_items[selected]}") # Check button button = j.clickwheel_get_button() if button == j.CLICKWHEEL_PRESSED: print(f"Selected: {menu_items[selected]}") elif button == j.CLICKWHEEL_HELD: print("Exit menu") break # Note: Direction persists, so even with slow polling (50ms), # you won't miss turn events! time.sleep(0.05) ``` **Example - Value Adjustment with Persistence:** ```jython import jumperless as j import time value = 50 while True: # Check direction without consuming direction = j.clickwheel_get_direction(False) if direction == j.CLICKWHEEL_UP: value = min(100, value + 1) j.oled_print(f"Value: {value}", 2) time.sleep(0.1) # Delay for visual feedback # Consume after displaying j.clickwheel_get_direction(True) elif direction == j.CLICKWHEEL_DOWN: value = max(0, value - 1) j.oled_print(f"Value: {value}", 2) time.sleep(0.1) j.clickwheel_get_direction(True) # Exit on button press if j.clickwheel_get_button() == j.CLICKWHEEL_PRESSED: break time.sleep(0.01) ``` ### `clickwheel_up([clicks])` / `clickwheel_down([clicks])` / `clickwheel_press()` Inject a turn or a click into the firmware's own UI, the same as turning or pressing the wheel yourself. Each call is one event - the `clicks` argument is accepted but ignored. ### `clickwheel_is_initialized()` Returns `True` if the encoder driver is up. --- ## WaveGen (Waveform Generator) Functions for generating analog waveforms on DAC outputs. **Setters:** - `wavegen_set_output(output)` - Select output: `DAC0`, `DAC1`, `TOP_RAIL`, `BOTTOM_RAIL` (default `DAC1`) - `wavegen_set_freq(hz)` - Set frequency: 0.0001–10000.0 Hz (default 100 Hz) - `wavegen_set_wave(shape)` - Set waveform shape (see constants below) - `wavegen_set_sweep(start_hz, end_hz, seconds)` - Accepted, but nothing happens yet: the values are stored and no sweep runs. To sweep, loop `wavegen_set_freq()` yourself. - `wavegen_set_amplitude(vpp)` - 0.0–16.0 Vpp (default 3.3 Vpp) - `wavegen_set_offset(v)` - -8.0–+8.0 V (default 1.65 V for 0–3.3 V centered) - `wavegen_start([run=True])` - Start/stop output; calling with False stops - `wavegen_stop()` - Stop output immediately **Getters:** - `wavegen_get_output()` - Get current output channel - `wavegen_get_freq()` - Get current frequency - `wavegen_get_wave()` - Get current waveform - `wavegen_get_amplitude()` - Get current amplitude (Vpp) - `wavegen_get_offset()` - Get current offset - `wavegen_is_running()` - Check if wavegen is active **Aliases:** All setters/getters have `set_wavegen_*` and `get_wavegen_*` aliases. **Waveform Constants:** - `SINE` (0) - Sine wave - `TRIANGLE` (1) - Triangle wave - `SAWTOOTH` (2) - Sawtooth/ramp wave - `RAMP` (2) - Alias for SAWTOOTH - `SQUARE` (3) - Square wave - `ARBITRARY` (4) - Arbitrary waveform (not yet implemented) **Example:** ```jython # Generate a 100Hz sine wave on DAC1 wavegen_set_output(DAC1) wavegen_set_wave(SINE) wavegen_set_freq(100) wavegen_set_amplitude(3.3) # 3.3V peak-to-peak wavegen_set_offset(1.65) # Center at 1.65V (0-3.3V range) wavegen_start() # Check if running if wavegen_is_running(): print("Wavegen active at " + str(wavegen_get_freq()) + "Hz") # Change waveform while running wavegen_set_wave(TRIANGLE) # Stop wavegen_stop() ``` **Notes:** - The wave is generated by DMA in the background, so LEDs, routing and your script keep running while it plays. Current readings and DAC setters do wait until it stops. - Frequency, waveform, amplitude, and offset can be changed live while running. --- ## Net Information API Functions for querying and modifying net metadata. Nets are groups of connected nodes. ### `get_net_name(netNum)` Gets the name of a specific net. * `netNum`: The net number (1 to `get_num_nets()`). Net 0 is the empty placeholder, not a net you made. * Returns the net name string, or `None` if the net doesn't exist. **Example:** ```jython name = get_net_name(1) print("Net 1 is called: " + str(name)) ``` ### `set_net_name(netNum, name)` Sets a custom name for a net. * `netNum`: The net number. * `name`: The new name string. Pass empty string or `None` to reset to default. **Example:** ```jython set_net_name(1, "VCC") set_net_name(2, "Signal_A") ``` ### `get_net_color(netNum)` Gets the color of a net as a 32-bit RGB value. * `netNum`: The net number. * Returns the color as `0xRRGGBB`. **Example:** ```jython color = get_net_color(1) print("Net color: " + hex(color)) # e.g., "0xff0000" for red ``` ### `get_net_color_name(netNum)` Gets the color name of a net as a human-readable string. * `netNum`: The net number. * Returns a color name like "red", "blue", "green", etc. **Example:** ```jython color_name = get_net_color_name(1) print("Net 1 is " + color_name) # e.g., "Net 1 is red" ``` ### `set_net_color(netNum, color, [r], [g], [b])` Sets the color of a net by name, hex string, or RGB values. * `netNum`: The net number. * `color`: Color as a name ("red", "blue", "pink"), a hex string ("#FF0000", "0xFF0000"), an integer `0xRRGGBB`, or an `(r, g, b)` tuple or list. * `r`, `g`, `b` (optional): If providing RGB values directly, pass them as separate arguments. * Returns `True` on success, `False` on failure (invalid color). **Available color names:** red, orange, amber, yellow, chartreuse, green, seafoam, cyan, blue, royal blue, indigo, violet, purple, pink, magenta, brown, white, black, grey **Example:** ```jython # Set by color name set_net_color(1, "red") set_net_color(2, "cyan") # Set by hex string set_net_color(3, "#FF00FF") # Magenta set_net_color(4, "0x00FF00") # Green # Set by RGB values set_net_color(5, 255, 128, 0) # Orange set_net_color(6, 0xFF8000) # Same orange as an integer set_net_color(7, (255, 128, 0)) # ...or as a tuple ``` ### `set_net_color_hsv(netNum, h, [s], [v])` Sets the color of a net using HSV (Hue, Saturation, Value) color space. Automatically detects whether you're using normalized (0.0-1.0) or full-range (0-255) values based on the hue parameter. * `netNum`: The net number. * `h`: Hue value. If `h` is between 0.0-1.0, all HSV values are treated as normalized (0.0-1.0). Otherwise, values are treated as 0-255 range. * `s` (optional): Saturation value. Defaults to maximum saturation (255) if not provided or negative. * `v` (optional): Value/brightness. Defaults to 32 (reasonable LED brightness) if not provided or negative. * Returns `1` on success, `0` on failure. **Range auto-detection:** - If `h` ≤ 1.0: Normalized mode (0.0-1.0 for all values) - If `h` > 1.0: Full-range mode (0-255 for all values) **Default brightness (32):** This provides good visibility without being overly bright. For maximum brightness, explicitly set `v` to 1.0 (normalized) or 255 (full-range). **Example:** ```jython # Normalized mode (0.0-1.0) - detected because h 1.0 set_net_color_hsv(6, 2) # Nearly red, max saturation, default brightness (32) set_net_color_hsv(7, 85) # Green (85 ≈ 255/3), default brightness (32) set_net_color_hsv(8, 170) # Blue (170 ≈ 2*255/3), default brightness (32) set_net_color_hsv(9, 128, 200) # Cyan-ish with 200/255 saturation, default brightness set_net_color_hsv(10, 128, 255, 128)# Cyan with max saturation, 50% brightness set_net_color_hsv(11, 128, 255, 255)# Cyan at MAXIMUM brightness (255) # Using all defaults (h only) set_net_color_hsv(12, 0.25) # Yellow with full saturation, brightness 32 set_net_color_hsv(13, 64) # Yellow in 0-255 mode, brightness 32 ``` **Why use HSV?** HSV is often more intuitive for color selection than RGB: - **Hue** represents the actual color (red → yellow → green → cyan → blue → magenta → red) - **Saturation** controls color intensity (0 = grayscale, max = vivid color) - **Value** controls brightness (0 = black, max = full brightness) ### `get_num_nets()` Gets the number of currently active nets. * Returns an integer. **Example:** ```jython num = get_num_nets() print("There are " + str(num) + " nets") ``` ### `get_num_bridges()` Gets the total number of bridges (connections). * Returns an integer. **Example:** ```jython num = get_num_bridges() print("There are " + str(num) + " bridges") ``` ### `get_net_nodes(netNum)` Gets all nodes in a net as a comma-separated string. * `netNum`: The net number. * Returns a string like "D13,TOP_RAIL,GPIO_1". **Example:** ```jython nodes = get_net_nodes(1) print("Net 1 contains: " + nodes) ``` ### `get_bridge(bridgeIdx)` Gets information about a specific bridge. * `bridgeIdx`: The bridge index (0 to number of bridges - 1). * Returns a tuple `(node1, node2, duplicates)`. **Example:** ```jython bridge = get_bridge(0) print("Bridge 0: " + str(bridge[0]) + " to " + str(bridge[1])) ``` ### `get_net_info(netNum)` Gets comprehensive information about a net as a dictionary. * `netNum`: The net number. * Returns a dict with keys: `name`, `number`, `color`, `color_name`, `nodes`. **Example:** ```jython info = get_net_info(1) print("Net name: " + info['name']) print("Net color: " + info['color_name']) print("Net nodes: " + info['nodes']) ``` ### `get_all_nets()` Gets every net as a list of dictionaries. * Returns a list of net dicts, same keys as `get_net_info()`. The first entry is the empty placeholder net, not one of yours. **Example:** ```jython for net in get_all_nets()[1:]: print(str(net['number']) + ": " + net['nodes']) ``` --- ## Path Query API Functions for inspecting the internal routing paths between nodes. Paths represent the actual physical routes through the crossbar chips that connect nodes together. ### Understanding Paths vs Bridges * **Bridges**: Direct connections you create (e.g., `connect(1, 5)`) * **Paths**: The actual routing through crossbar chips to implement those bridges A single bridge may require multiple paths through different chips. The path query API lets you inspect these internal routing details. ### `get_num_paths([include_duplicates=True])` Gets the number of routing paths currently in use. * `include_duplicates` (optional): If `True` (default), count all paths including duplicates. If `False`, count only primary (non-duplicate) paths. * Returns an integer. **Example:** ```jython total = get_num_paths() # All paths including duplicates primary = get_num_paths(False) # Only primary paths print(f"Total paths: {total}, Primary: {primary}") ``` ### `get_path_info(path_idx)` Gets detailed information about a specific routing path. * `path_idx`: The path index (0 to `get_num_paths()-1`) * Returns a dict with keys: `node1`, `node2`, `net`, `chips`, `x`, `y`, `duplicate` * Returns `None` if index is invalid **Example:** ```jython path = get_path_info(0) if path: print(f"Path from {path['node1']} to {path['node2']}") print(f"Uses chips: {path['chips']}") print(f"Is duplicate: {path['duplicate']}") ``` ### `get_all_paths()` Gets all routing paths as a list of dictionaries. * Returns a list of path dicts (same format as `get_path_info()`) **Example:** ```jython paths = get_all_paths() for i, path in enumerate(paths): print(f"Path {i}: {path['node1']} -> {path['node2']} via net {path['net']}") ``` ### `get_path_between(node1, node2)` Queries the routing path between two specific nodes. * `node1`, `node2`: The nodes to query * Returns a path dict if found, `None` otherwise **Example:** ```jython path = get_path_between(1, 5) if path: print(f"Route uses chips: {path['chips']}") print(f"Crossbar coordinates: x={path['x']}, y={path['y']}") else: print("No path found between nodes 1 and 5") ``` --- ## Net Current Scan API The Jumperless (V5 only) continuously measures the voltage of every routed node in the background by momentarily tapping a free ADC onto each one, then derives the current through every connection from the voltage difference across its known crosspoint resistance. These are the same numbers that drive the marching-ant current animation on the LEDs, and scripts can query them directly. **How the scan behaves:** * Enabled by the `net_currents` setting in the `[measurement]` config section (on by default) — the `i` serial command toggles it. When the scan is off, every function below returns `None`. * The scan round-robins through all routed nodes, refreshing the full board about once per second; currents are recomputed from the latest voltages 20 times per second. * It is completely passive: the ADC tap is high impedance (~1 MΩ) and never disturbs your circuit. * **DC only** — nodes carrying PWM or other oscillating signals are rejected by the scan's drift check and read `None`. * Accuracy is roughly ±10%, tied to the `crosspoint_resistance` value in the `[measurement]` config section (40 Ω by default). * Reported currents are always **conventional** (positive = higher potential toward lower). The `current_flow` setting in `[measurement]` only flips the LED animation direction, never these numbers. ### `get_node_voltage(node)` Gets the scanned voltage of any routed node. * `node`: Node number, name, or node object (e.g. `15`, `"D2"`, `TOP_RAIL`) * Returns the voltage in volts, or `None` when the scan has no fresh sample (scan disabled, node not routed, or the node is floating) * Alias: `node_voltage()` **Example:** ```jython v = get_node_voltage(15) if v is not None: print(f"Row 15 sits at {v:.2f} V") else: print("Row 15 is not routed (or floating)") ``` ### `get_net_current(netNum)` Gets the current flowing in a net's dominant path. * `netNum`: Net number (1 to `get_num_nets()`) * Returns a dict with keys: `current_mA` (magnitude), `voltage` (midpoint voltage, used for the ant color), `from_node`, `to_node` (conventional current flows from → to) * Returns `None` when the scan has no data for this net * Alias: `net_current()` **Example:** ```jython info = get_net_current(4) if info: print(f"{info['current_mA']:.2f} mA flowing from {info['from_node']} to {info['to_node']}") ``` ### `get_path_current(path_idx)` Gets the signed current through one routing path. Uses the same index space as `get_path_info()`, so you can match currents to specific connections. * `path_idx`: Path index (0 to `get_num_paths()-1`) * Returns the current in mA; **positive means conventional current flows `node1` → `node2`** (matching `get_path_info()`'s fields) * Returns `None` when the scan has no data for this path (unrouted, floating, or the scan is off) * Alias: `path_current()` **Example:** ```jython # Print the current through every connection on the board for i in range(get_num_paths(False)): path = get_path_info(i) i_mA = get_path_current(i) if path and i_mA is not None: src, dst = (path['node1'], path['node2']) if i_mA >= 0 else (path['node2'], path['node1']) print(f"{src} -> {dst}: {abs(i_mA):.2f} mA") ``` --- ## Fake GPIO (Virtual GPIO Pins) Fake GPIO uses the Jumperless' internal crossbar switches to create virtual GPIO pins on any routable node. Unlike the RP2350's hardware GPIO (limited to 10 routable pins at 0-3.3V), Fake GPIO lets you use any node with custom voltage levels from -8V to +8V, or as inputs, you can have as many as you like and the ADC will switch to that node and take a reading on demand. *This is still pretty new and will probably change in the future* *Note: Fake GPIO Outputs are currently disabled until I fix the code, they were causing dead shorts between supplies* ### Why Use Fake GPIO? The RP2350's hardware GPIO is limited to 10 routable pins (GPIO_1 through GPIO_8, plus UART TX/RX) with fixed 3.3V logic levels. Fake GPIO extends this by using the crossbar switching matrix to create virtual GPIO pins on any routable node with configurable voltage levels. ### Configuring INPUT Pins ```python FakeGpioPin(node, j.FAKE_GPIO_INPUT, threshold_high, threshold_low) ``` Creates a digital input that reads voltage via the ADC. **Parameters:** - `node` (int, required): Any routable node to read from - `mode` (constant, optional): `j.FAKE_GPIO_INPUT` (0) or `j.FAKE_GPIO_OUTPUT` (1). Defaults to output, which is the disabled one, so pass `j.FAKE_GPIO_INPUT` for an input. Don't use `j.INPUT` here - that's the routable-GPIO constant and it selects output. - `threshold_high` (float, optional): Input HIGH threshold in volts (default: 2.0) - `threshold_low` (float, optional): Input LOW threshold in volts (default: 0.8) **Returns:** FakeGpioPin object **Example:** ```jython import jumperless as j # Read a digital signal button = j.FakeGpioPin(20, j.FAKE_GPIO_INPUT, 2.0, 0.8) state = button.value() # Returns 0 or 1 # Custom thresholds for 5V logic signal_5v = j.FakeGpioPin(25, j.FAKE_GPIO_INPUT, 3.5, 1.5) if signal_5v.value(): print("5V logic HIGH detected") ``` ### FakeGpioPin Methods #### `pin.value([val])` For INPUT: Reads the current pin state (0 or 1). ```jython # Basic usage pin = j.FakeGpioPin(20, j.FAKE_GPIO_INPUT, 2.0, 0.8) # Using value() state = pin.value() # Read current state ``` #### `pin.on()` / `pin.off()` / `pin.toggle()` Output-only, so they can't do anything while Fake GPIO outputs are disabled. #### `FakeGpioDisconnect(node1, node2)` A context manager that breaks a connection for the length of a `with` block, then puts it back. ```jython with j.FakeGpioDisconnect(20, 25): reading = j.adc_get(0) # 20 and 25 are apart in here ``` --- ## System Functions ### `arduino_reset()` Resets the connected Arduino Nano. ### `run_app(appName)` Launches a built-in Jumperless application. * `appName`: The name of the app to run (e.g., "File Manager", "I2C Scan"). ### `pause_core2(pause)` Pauses or resumes core2 processing. * `pause`: `True` to pause core2, `False` to resume. *For doing time sensitive things where you don't want core 2 to cause timing glitches while it periodically updates the LEDs.* Core 2 will resume when you exit the REPL no matter what. ### `send_raw(chip, x, y, [setOrClear=1])` Sends raw data to core2 for direct chip control. * `chip`: Chip identifier, either `"A"` to `"L"` (case doesn't matter) or the number `0` to `11`. * `x`, `y`: Coordinates on that chip. `x` is 0-15, `y` is 0-7. Anything outside that prints an error and does nothing. * `setOrClear` (optional): `1` to set (default), `0` to clear. You should probably be looking at the schematic if you use this. By bypassing all the routing logic, you can make or break connections in ~1 µs. Pretty handy if want to do high speed switching between known states. ### `change_terminal_color(color, [flush=True])` Sets the terminal text color using 256-color ANSI codes. * `color`: Color index (0-255), or -1 to reset to default * `flush` (optional): Flush output immediately (default: `True`) This is the 6x6x6 color cube that terminals use: [Image: TermColors] **Example:** ```jython change_terminal_color(196) # Bright red print("Error message") change_terminal_color(-1) # Reset to default change_terminal_color(46) # Cyan print("Info message") ``` ### `cycle_term_color([reset=False], [step], [flush=True])` Cycles through the terminal color palette. * `reset` (optional): If `True`, reset to start of color sequence * `step` (optional): Color increment step. Leave it off and it keeps the last one you set (5.0 to start with). A step of 80 or more is ignored. * `flush` (optional): Flush output immediately (default: `True`) Useful for creating rainbow effects or visually distinguishing output sections. This is really just a helper function for me, it only uses a subset of the colors above that actually look good (51 of them). It takes a float so you can use fractional values if you have more than 51 things and you want a smooth spectrum. *This doesn't currently work in Viper IDE because it strips the escape sequences* **Example:** ```jython cycle_term_color(True, 1.5) # Start fresh for i in range(10): cycle_term_color() # Next color print(f"Line {i} in different color") # Visual separator in help output cycle_term_color(True, step=5.0) ``` [Image: CycleTerm] ### `force_service(name)` Forces immediate execution of a specific system service by name. * `name`: Service name as a string (e.g., `"ProbeButton"`, `"Peripherals"`). * Returns: `True` if service was found and executed, `False` otherwise. Useful for manually triggering specific services during tight loops where automatic service scheduling might not run frequently enough. **Example:** ```jython while True: # Fast loop that might miss automatic service updates connect(1, 2) force_service("ProbeButton") # Ensure button state updates button = check_button() time.sleep(0.001) ``` ### `force_service_by_index(index)` Forces immediate execution of a specific system service by index (faster than name lookup). * `index`: Service index (integer, obtained via `get_service_index()`). * Returns: `True` if index valid and service executed, `False` otherwise. **Example:** ```jython # Cache the index once for maximum speed btn_idx = get_service_index("ProbeButton") while True: connect(1, 2) force_service_by_index(btn_idx) # Fastest way to force service button = check_button() time.sleep(0.001) ``` ### `get_service_index(name)` Gets the index of a service by name for use with `force_service_by_index()`. * `name`: Service name as a string. * Returns: Service index (integer, 0 or higher), or `-1` if not found. Cache the returned index for repeated fast calls to `force_service_by_index()`. **Example:** ```jython # Look up once, use many times probe_idx = get_service_index("ProbeButton") if probe_idx >= 0: # Use the cached index in your loop force_service_by_index(probe_idx) ``` ### `switch_slot(slot)` Switches to a different connection slot. * `slot`: The slot number to switch to (0-7). * Returns the previous slot number, or the same number if you were already in that slot. * Raises `ValueError("Invalid slot number")` if the slot is outside 0-7, and also if loading the slot fails. Unsaved changes in the slot you're leaving get saved before the switch. **Example:** ```jython old_slot = switch_slot(2) # Switch to slot 2 print("Was in slot: " + str(old_slot)) ``` ### `context_toggle()` Toggles the connection context between `global` and `python` modes. * In **global** mode: Connection changes persist after exiting Python. * In **python** mode: Connection state is restored when you exit the REPL. **Example:** ```jython context_toggle() # Switch from global to python (or vice versa) print("Now in " + context_get() + " mode") ``` ### `context_get()` Gets the current connection context name. * Returns `"global"` or `"python"`. **Example:** ```jython if context_get() == "global": print("Changes will persist after exit") else: print("Changes will be discarded on exit") ``` ### `get_state()` Returns the entire board state as a formatted JSON string. This includes nets, power settings, and GPIO configuration. **Example:** ```jython state_json = get_state() print(state_json) ``` ### `set_state(json, [clear_first=True], [from_wokwi=False])` Applies a board state from a JSON string or, if ``from_wokwi`` is True, from a Wokwi diagram (provided as raw JSON or filepath on the board). * `json`: A JSON string representing the state (same format as returned by `get_state()`), or a filename/Wokwi JSON when ``from_wokwi`` is used. * `clear_first` (optional): If `True` (default), clears all existing connections and FakeGPIO state before applying the new state. Set to `False` to merge the new state with the existing one. It only clears when the JSON carries a `"nets"` section, so a power-only or GPIO-only state always merges. With `from_wokwi=True` the whole state is cleared either way. * `from_wokwi` (optional): If `True`, interpret `json` as a Wokwi diagram.json and convert it to a Jumperless state before applying. * Returns `-1` if it failed (the error is printed to the serial console). **Examples:** ```jython # Apply a simple state from a string set_state('{"nets": [{"index": 1, "name": "GND", "nodes": ["GND"]}], "power": {"top_rail": 5.0}}') # Apply directly from a Wokwi diagram file saved on the board set_state('/python_scripts/diagram1.json', from_wokwi=True) # or supply raw Wokwi JSON text set_state(wokwi_json_string, from_wokwi=True) ``` ### `bg_start(callback, [interval_ms=50])` Runs `callback` every `interval_ms` milliseconds while the REPL is idle. The callback gets the millisecond tick as its only argument. Intervals below 10 ms are clamped to 10. If the callback raises, the background job switches itself off. `bg_start(None)` stops it too. ### `bg_stop()` Stops the background callback. ### `bg_active()` Returns `True` while a background callback is running. ### `undo()` / `redo()` Step back and forward through the wiring history, same as the undo you get from the terminal. Both return `True` if they moved. * `history_position()`: Where you are in the history ring. * `history_size()`: How many steps the ring holds. * `history_label([offset=0])`: The label of the step `offset` steps from where you are. * `history_jump(position)`: Jump straight to a position. Returns `True` if it moved. * `history_snapshot()`: Take a snapshot right now. Returns `True` if it took one. * `history_snapshot_count()`: How many snapshots there are. --- ## Status Functions These functions print detailed status information to the serial console. * `print_bridges()`: Prints the compact path listing. * `print_paths()`: Prints the same compact path listing - these two do the same thing. * `print_crossbars()`: Prints the raw state of the crossbar matrix. * `print_nets()`: Prints the current net list. * `print_chip_status()`: Prints the status of the CH446Q chips. --- ## JFS (Jumperless FileSystem) The `jfs` module is basically like MicroPython's `vfs` and parts of `os`, but kinda written in a style that's probably more familiar to Arduino-style C++ people (me). It uses the *almost* standardized API shared by [`FatFS` (the one Jumperless actually uses), `LittleFS`, and `SDFS`](https://arduino-pico.readthedocs.io/en/latest/fs.html#file-system-object-littlefs-sd-sdfs-fatfs), but still has been *Pythonified* to use types that are easier to work with in MicroPython. The board's filesystem is also mounted as MicroPython's root, so the plain builtin `open(path, mode)` and the `os` module (`os.listdir`, `os.stat`, `os.mkdir`, `os.remove`, `os.rename`, `os.getcwd`, `os.chdir`, `os.statvfs`) work on the same files. That's the more portable way to write a script if you want it to run somewhere else too. ### Usage ```jython import jfs #you don't actually need this, jfs is imported globally by default # List files in the root directory files = jfs.listdir('/') # returns a python list print(files) ``` Output: ```jython ['config.txt', 'slots/', 'python_scripts/'] ``` (Directories come back with a trailing `/`. Older filesystems may also show legacy `nodeFileSlot*.txt` files and a `net_colors/` directory at the root.) If you want to make this print with subdirectories ```jython files = jfs.listdir('/') for file in range(len(files)): print(files[file]) if files[file].endswith("/"): subdir = jfs.listdir(files[file]) for i in range(len(subdir)): print(" - " + subdir[i]) ``` Output: ``` config.txt slots/ - slot0.yaml - slot1.yaml - slot2.yaml python_scripts/ - history.txt - examples/ - lib/ - script_1.py - script_2.py - log.txt ``` --- ### File API File objects returned by `jfs.open()` support method calls directly on the object: ```jython # Object-oriented file operations # Write-only mode f = jfs.open('hello.txt', 'w') f.write('Hello, Jumperless!') f.close() # Read from the file (need to reopen or use w+/r+ mode) f = jfs.open('hello.txt', 'r') content = f.read() # Read from file object size = f.size() # Get file size f.close() # Read-write mode (truncates file) f = jfs.open('hello.txt', 'w+') f.write('Hello, Jumperless!') f.seek(0) # Seek to beginning to read what we wrote content = f.read() # Now this works! f.close() # Context manager support (automatically closes file) with jfs.open('data.txt', 'w+') as f: f.write('This file will be automatically closed') f.seek(0) # Reset to beginning content = f.read() # Read back what we wrote pos = f.tell() # Get current position name = f.name() # Get file name ``` #### Using `f.print()` for logging The `f.print()` method works like Python's `print()` but writes to the file. It automatically converts arguments to strings, joins multiple arguments with spaces, and adds a newline - perfect for logging. **Note:** `f.print()` does *not* flush after each call (a FatFS flush takes ~2 seconds, so auto-flushing would make logging loops crawl). Data is committed when you `f.close()` or `f.seek()` - if you're logging data you can't afford to lose to a crash or reset, call `f.flush()` yourself at checkpoints: ```jython # Great for logging - auto-converts types and adds newlines with jfs.open('log.txt', 'w+') as f: f.print("Starting test...") voltage = adc_get(0) f.print("Voltage:", voltage, "V") # Multiple args work f.print("Test complete!") f.flush() # Commit to flash at a checkpoint # Unlike f.write(), f.print() handles non-strings automatically f = jfs.open('data.txt', 'w') f.print(123) # OK - converts int to string f.print(3.14) # OK - converts float to string f.print("mixed", 42) # OK - multiple args joined with spaces f.close() ``` **Note:** `f.print()` is a file object method only. There is no `jfs.print()` module-level function. Other ways to do the same thing #### 2. Module-Level Functions You can also use module-level functions with file handles: ```jython f = jfs.open('hello.txt', 'w') jfs.write(f, 'Hello, Jumperless!') # Module-level function jfs.seek(f, 0) # Module-level function content = jfs.read(f, -1) # Module-level function (-1 = read it all) jfs.close(f) # Module-level function ``` #### 3. Direct String Operations (For simple cases) The whole-file path-based helpers live in the `jumperless` module (available globally), not in `jfs`. There's `fs_read(path)`, `fs_write(path, text)`, `fs_exists(path)`, `fs_listdir(path)` (same list as `jfs.listdir()`) and `fs_cwd()`: ```jython # Write/read entire files at once (no file handles needed) fs_write('notes.txt', 'key=value\nother=setting') # returns True if it worked content = fs_read('notes.txt') # up to ~4 KB, or None if it can't be read ``` `fs_read()` stops at 4095 characters (1023 on the original Jumperless), so use `jfs.open()` and `file.read()` for anything bigger. ### File Modes When using `jfs.open(path, mode)`, the following modes are supported: | Mode | Description | Read | Write | Create | |------|-------------|------|-------|---------| | `'r'` | Read only | ✅ | ❌ | ❌ | | `'w'` | Write only | ❌ | ✅ | ✅ | | `'a'` | Append only | ❌ | ✅ | ✅ | | `'r+'` | Read + Write | ✅ | ✅ | ❌ | | `'w+'` | Read + Write | ✅ | ✅ | ✅ | | `'a+'` | Read + Append | ✅ | ✅ | ✅ | **Important:** You cannot read from a file opened in write-only mode (`'w'` or `'a'`) - reads just come back empty. Use `'w+'`, `'r+'`, or `'a+'` if you need both read and write access. You can also add `'b'` to any mode (e.g. `'rb'`, `'wb'`) to open in binary mode: reads return `bytes` and writes accept `bytes`/`bytearray`/`memoryview`. ### Open a file for writing ```jython f = jfs.open('hello.txt', 'w') f.write('Hello, Jumperless!') # Now works with object-oriented API! f.close() ``` ### Directory Operations #### `jfs.listdir(path)` Returns a list containing the names of the entries in the directory given by `path`. * `path` (str): The path to the directory. **Example:** ```jython # List contents of the root directory print(jfs.listdir('/')) # List contents of a subdirectory jfs.mkdir('/my_dir') print(jfs.listdir('/my_dir')) ``` #### `jfs.mkdir(path)` Create a new directory. * `path` (str): The path of the new directory. #### `jfs.rmdir(path)` Remove an empty directory. * `path` (str): The path of the directory to remove. #### `jfs.remove(path)` Remove a file. * `path` (str): The path of the file to remove. #### `jfs.rename(old_path, new_path)` Rename a file or directory. * `old_path` (str): The current path. * `new_path` (str): The new path. #### `jfs.exists(path)` Check if a file or directory exists. * `path` (str): The path to check. * Returns `True` if it exists, `False` otherwise. #### `jfs.stat(path)` Get status of a file or directory. * `path` (str): The path of the file or directory. * Returns a 10-element tuple in the same order as `os.stat()`. The mode field (index 0) is `0x4000` for a directory and `0x8000` for a file, and the size field (index 6) is real; the timestamps are all zero. A path that doesn't exist raises `OSError`. ### Filesystem Information #### `jfs.info()` Get information about the filesystem. * Returns a tuple `(total_bytes, used_bytes, free_bytes)`. **Example:** ```jython total, used, free = jfs.info() print("Filesystem Size: " + str(total / 1024) + " KB") print("Used: " + str(used / 1024) + " KB") print("Free: " + str(free / 1024) + " KB") ``` ### File I/O The `jfs` module supports standard file opening and handling using `jfs.open()` and file objects, including support for the `with` statement for automatic resource management. #### `jfs.open(path, mode='r')` Open a file and return a corresponding file object. * `path` (str): The path to the file. * `mode` (str, optional): The mode in which the file is opened. Defaults to `'r'`. * `'r'`: Read (default). * `'w'`: Write (creates a new file or truncates an existing one). * `'a'`: Append. * `'r+'`: Read and write. * `'w+'`: Write and read (creates/truncates). * `'a+'`: Append and read. **Example:** ```jython # Open a file for reading f = jfs.open('config.txt', 'r') content = f.read() f.close() # Use 'with' for automatic closing with jfs.open('data.log', 'a') as log_file: log_file.write('New log entry.\\n') ``` ### File Object Methods The file object returned by `jfs.open()` has the following methods: #### `file.read([size])` Read `size` bytes from the file. If `size` is omitted (or negative), reads from the current position to the end of the file - there's no per-call cap. A file too big to fit in RAM raises `MemoryError`. #### `file.write(data)` Write the given string or bytes `data` to the file. Returns the number of bytes written. #### `file.close()` Close the file. A closed file cannot be read or written to. #### `file.seek(offset, [whence])` Change the stream position. * `offset`: The byte offset. * `whence` (optional): * `0`: Seek from the start of the stream (default). Use `jfs.SEEK_SET`. * `1`: Seek from the current position. Use `jfs.SEEK_CUR`. * `2`: Seek from the end of the stream. Use `jfs.SEEK_END`. #### `file.tell()` Return the current stream position. * **Aliases**: `file.position()` #### `file.size()` Return the total size of the file in bytes. #### `file.available()` Return the number of bytes available to be read from the current position to the end of the file. #### `file.name()` Returns the name of the file, or `None` once the file is closed. (It's a method call, not an attribute - `f.name` gives you the bound method, not the string.) #### `file.print(*args)` Writes the arguments to the file like `print()` does, converting them to strings and adding a newline. See [Using `f.print()` for logging](#using-fprint-for-logging). #### `file.flush()` Commits buffered writes to flash. --- ### Module-Level File Operations For convenience, the `jfs` module also provides functions that operate directly on file handles returned by `jfs.open()`. This can be useful in some scripting scenarios but using file object methods is generally preferred for clarity. * `jfs.read(file_handle, [size])` - unlike `file.read()`, this one reads 1024 bytes when you leave `size` off. Pass `-1` to read the whole file. * `jfs.write(file_handle, data)` - returns `None`, not the byte count * `jfs.close(file_handle)` * `jfs.seek(file_handle, offset, [whence])` * `jfs.tell(file_handle)` * `jfs.size(file_handle)` * `jfs.available(file_handle)` **Example:** ```jython file_handle = jfs.open('temp.txt', 'w') jfs.write(file_handle, 'some data') jfs.close(file_handle) ``` --- ## Help Functions ### `help()` Displays a comprehensive list of all available functions and constants in the `jumperless` module. You can also pass it sections, so `help("GPIO")` will just print that section. ### `nodes_help()` Displays a detailed reference for all available node names and their aliases. ## Node Names and Constants The Jumperless module provides extensive node name support with multiple aliases for each node. Every name here works as a string - `connect("SUPPLY_3V3", 5)`, `node("gp_1")` - and strings are case-insensitive. Only some of them also exist as bare Python constants you can type without quotes: `TOP_RAIL`, `T_RAIL`, `BOTTOM_RAIL`, `BOT_RAIL`, `B_RAIL`, `GND`, `DAC0`, `DAC_0`, `DAC1`, `DAC_1`, `ISENSE_PLUS`, `ISENSE_P`, `I_P`, `CURRENT_SENSE_P`, `CURRENT_SENSE_PLUS`, `ISENSE_MINUS`, `ISENSE_N`, `I_N`, `CURRENT_SENSE_N`, `CURRENT_SENSE_MINUS`, `BUFFER_IN`, `BUF_IN`, `BUFFER_OUT`, `BUF_OUT`, `ADC0`-`ADC4`, `ADC7`, `UART_TX`, `TX`, `UART_RX`, `RX`, `D0`-`D13`, `NANO_D0`-`NANO_D13`, `A0`-`A7`, `NANO_A0`-`NANO_A7`, `GPIO_1`-`GPIO_8`, `GP1`-`GP8`, and `GPIO_20`-`GPIO_27` (the same pins as `GPIO_1`-`GPIO_8`). Anything else - `SUPPLY_3V3`, `GROUND`, `DAC0_5V`, `ADC_0`, `GPIO1`, `GP_1`, `RP_GPIO_18`, `VIN`, `RST0` and so on - has to be quoted, or you get a `NameError`. ```jython # Power rails (multiple aliases supported) TOP_RAIL = 101 # Also: TOPRAIL, T_R, TOP_R BOTTOM_RAIL = 102 # Also: BOT_RAIL, BOTTOMRAIL, BOTRAIL, B_R, BOT_R SUPPLY_3V3 = 103 # Also: 3V3, 3.3V SUPPLY_5V = 105 # Also: 5V, +5V SUPPLY_8V_P = 120 # Also: 8V_P, 8V_POS (name only, not connected to anything) SUPPLY_8V_N = 121 # Also: 8V_N, 8V_NEG (name only, not connected to anything) # Ground connections GND = 100 # Also: GROUND TOP_RAIL_GND = 104 # Also: TOP_GND (not actually routable but included for PADs) BOTTOM_RAIL_GND = 126 # Also: BOT_GND, BOTTOM_GND (not actually routable but included for PADs) # DAC outputs DAC0 = 106 # Also: DAC_0, DAC0_5V DAC1 = 107 # Also: DAC_1, DAC1_8V # ADC inputs ADC0 = 110 # Also: ADC_0, ADC0_8V ADC1 = 111 # Also: ADC_1, ADC1_8V ADC2 = 112 # Also: ADC_2, ADC2_8V ADC3 = 113 # Also: ADC_3, ADC3_8V ADC4 = 114 # Also: ADC_4, ADC4_5V ADC7 = 115 # Also: ADC_7, ADC7_PROBE, PROBE # Current sensing ISENSE_PLUS = 108 # Also: ISENSE_POS, ISENSE_P, INA_P, I_P, CURRENT_SENSE_PLUS, ISENSE_POSITIVE, I_POS ISENSE_MINUS = 109 # Also: ISENSE_NEG, ISENSE_N, INA_N, I_N, CURRENT_SENSE_MINUS, ISENSE_NEGATIVE, I_NEG # GPIO pins (multiple naming conventions) GPIO_1 = 131 # Also: RP_GPIO_1, GPIO1, GP_1, GP1 GPIO_2 = 132 # Also: RP_GPIO_2, GPIO2, GP_2, GP2 GPIO_3 = 133 # Also: RP_GPIO_3, GPIO3, GP_3, GP3 GPIO_4 = 134 # Also: RP_GPIO_4, GPIO4, GP_4, GP4 GPIO_5 = 135 # Also: RP_GPIO_5, GPIO5, GP_5, GP5 GPIO_6 = 136 # Also: RP_GPIO_6, GPIO6, GP_6, GP6 GPIO_7 = 137 # Also: RP_GPIO_7, GPIO7, GP_7, GP7 GPIO_8 = 138 # Also: RP_GPIO_8, GPIO8, GP_8, GP8 # UART pins UART_TX = 116 # Also: RP_UART_TX, TX, RP_GPIO_16 UART_RX = 117 # Also: RP_UART_RX, RX, RP_GPIO_17 # Additional RP GPIOs RP_GPIO_18 = 118 # Also: GP_18 RP_GPIO_19 = 119 # Also: GP_19 # Buffer connections BUFFER_IN = 139 # Also: ROUTABLE_BUFFER_IN, BUF_IN, BUFF_IN, BUFFIN BUFFER_OUT = 140 # Also: ROUTABLE_BUFFER_OUT, BUF_OUT, BUFF_OUT, BUFFOUT # Arduino Nano pins (extensive support) D13 = 83 # Also: NANO_D13 D12 = 82 # Also: NANO_D12 D11 = 81 # Also: NANO_D11 D10 = 80 # Also: NANO_D10 D9 = 79 # Also: NANO_D9 D8 = 78 # Also: NANO_D8 D7 = 77 # Also: NANO_D7 D6 = 76 # Also: NANO_D6 D5 = 75 # Also: NANO_D5 D4 = 74 # Also: NANO_D4 D3 = 73 # Also: NANO_D3 D2 = 72 # Also: NANO_D2 D1 = 71 # Also: NANO_D1 D0 = 70 # Also: NANO_D0 # Arduino Nano analog pins A0 = 86 # Also: NANO_A0 A1 = 87 # Also: NANO_A1 A2 = 88 # Also: NANO_A2 A3 = 89 # Also: NANO_A3 A4 = 90 # Also: NANO_A4 A5 = 91 # Also: NANO_A5 A6 = 92 # Also: NANO_A6 A7 = 93 # Also: NANO_A7 # Arduino Nano non-routable hardwired connections VIN = 69 # Unconnected to anything RST0 = 94 # Hardwired to GPIO 18 on the RP2350 RST1 = 95 # Hardwired to GPIO 19 on the RP2350 N_GND0 = 97 # GND N_GND1 = 96 # GND NANO_5V = 99 # Hardwired to USB 5V bus (can also be used to power the Jumperless) NANO_3V3 = 98 # Unconnected (without bridging the solder jumper on the back) RESET = 84 # Also: NANO_RESET AREF = 85 # Also: NANO_AREF EMPTY_NET = 127 # Also: EMPTY (the empty net) # Probe switch position constants SWITCH_MEASURE = 0 # Probe in measure mode SWITCH_SELECT = 1 # Probe in select mode SWITCH_UNKNOWN = -1 # Position unknown # Clickwheel direction constants CLICKWHEEL_NONE = 0 # No movement CLICKWHEEL_UP = 1 # Turned clockwise CLICKWHEEL_DOWN = 2 # Turned counter-clockwise # Clickwheel button state constants CLICKWHEEL_IDLE = 0 # Not pressed CLICKWHEEL_PRESSED = 1 # Just pressed CLICKWHEEL_HELD = 2 # Being held down CLICKWHEEL_RELEASED = 3 # Just released CLICKWHEEL_DOUBLECLICKED = 4 # Reserved, never returned - there's no double-click gesture ``` ## The entire output of help() ```jython >>> help() Jumperless Native MicroPython Module Available help sections: help() or help("all") - Show all functions help("DAC") - DAC functions help("ADC") - ADC functions help("GPIO") - GPIO functions help("PWM") - PWM functions help("WAVEGEN") - Waveform generator help("INA") - INA current/power monitor help("NODES") - Node connections help("NETS") - Net info (names, colors) help("SLOTS") - Slot management help("OLED") - OLED display help("PROBE") - Probe and button functions help("CLICKWHEEL") - Clickwheel (rotary encoder) functions help("STATUS") - Status and debug functions help("FILESYSTEM") - Filesystem functions help("MISC") - Miscellaneous functions help("EXAMPLES") - Usage examples DAC (Digital-to-Analog Converter): dac_set(channel, voltage) - Set DAC output voltage dac_get(channel) - Get DAC output voltage set_dac(channel, voltage) - Alias for dac_set get_dac(channel) - Alias for dac_get channel: 0-3, DAC0, DAC1, TOP_RAIL, BOTTOM_RAIL channel 0/DAC0: DAC 0 channel 1/DAC1: DAC 1 channel 2/TOP_RAIL: top rail channel 3/BOTTOM_RAIL: bottom rail voltage: -8.0 to 8.0V ADC (Analog-to-Digital Converter): adc_get(channel) - Read ADC input voltage get_adc(channel) - Alias for adc_get channel: 0-4 GPIO: gpio_set(pin, value) - Set GPIO pin state gpio_get(pin) - Read GPIO pin state gpio_set_dir(pin, direction) - Set GPIO pin direction gpio_get_dir(pin) - Get GPIO pin direction gpio_set_pull(pin, pull) - Set GPIO pull-up/down gpio_get_pull(pin) - Get GPIO pull-up/down Aliases: set_gpio, get_gpio, set_gpio_dir, get_gpio_dir, etc. pin 1-8: GPIO 1-8 pin 9: UART Tx pin 10: UART Rx value: True/False for HIGH/LOW direction: True/False for OUTPUT/INPUT pull: -1/0/1/2 for PULLDOWN/NO_PULL/PULLUP/BUS_KEEPER PWM (Pulse Width Modulation): pwm(pin, [frequency], [duty]) - Setup PWM on GPIO pin pwm_set_duty_cycle(pin, duty) - Set PWM duty cycle pwm_set_frequency(pin, freq) - Set PWM frequency pwm_stop(pin) - Stop PWM on pin Aliases: set_pwm, set_pwm_duty_cycle, set_pwm_frequency, stop_pwm pin: 1-8 GPIO pins only frequency: 0.001Hz-62.5MHz default 1000Hz duty_cycle: 0.0-1.0 default 0.5 (50%) WaveGen (Waveform Generator): wavegen_set_output(channel) - Set output: DAC0, DAC1, TOP_RAIL, BOTTOM_RAIL wavegen_set_freq(hz) - Set frequency (0.0001-10000 Hz) wavegen_set_wave(shape) - Set waveform shape wavegen_set_amplitude(vpp) - Set amplitude (0-16 Vpp) wavegen_set_offset(v) - Set DC offset (-8 to +8 V) wavegen_start() - Start waveform generation wavegen_stop() - Stop waveform generation Getters: wavegen_get_output(), wavegen_get_freq(), wavegen_get_wave(), wavegen_get_amplitude(), wavegen_get_offset(), wavegen_is_running() Waveform constants: SINE, TRIANGLE, SAWTOOTH (RAMP), SQUARE INA (Current/Power Monitor): ina_get_current(sensor) - Read current in amps ina_get_voltage(sensor) - Read shunt voltage ina_get_bus_voltage(sensor) - Read bus voltage ina_get_power(sensor) - Read power in watts Aliases: get_current, get_voltage, get_bus_voltage, get_power sensor: 0 or 1 Node Connections: connect(node1, node2) - Connect two nodes disconnect(node1, node2) - Disconnect nodes is_connected(node1, node2) - Check if nodes are connected nodes_clear() - Clear all connections set node2 to -1 to disconnect everything connected to node1 Net Information: get_net_name(netNum) - Get net name set_net_name(netNum, name) - Set custom net name get_net_color(netNum) - Get net color as 0xRRGGBB get_net_color_name(netNum) - Get net color name set_net_color(netNum, color) - Set net color by name or hex set_net_color_hsv(netNum, h, [s], [v]) - Set by HSV (auto-detects range) get_num_nets() - Get number of active nets get_num_bridges() - Get number of bridges get_net_nodes(netNum) - Get comma-separated node list get_bridge(bridgeIdx) - Get bridge info tuple get_net_info(netNum) - Get full net info as dict get_num_paths(include_duplicates=True) - Get number of paths (optionally exclude duplicates) get_node_voltage(node) - Scanned node voltage (None if no data) get_net_current(netNum) - Net current dict (None if no data) get_path_current(pathIdx) - Signed path current in mA (None if no data) Colors: red, orange, yellow, green, cyan, blue, purple, pink, etc. HSV: h=0.0-1.0 or 0-255 (auto), s=0-1/0-255 (default max), v=0-1/0-255 (default 32) Slot Management: nodes_save([slot]) - Save connections to slot nodes_discard() - Discard unsaved changes nodes_has_changes() - Check for unsaved changes switch_slot(slot) - Switch to different slot (0-7) CURRENT_SLOT - Get current slot number Projects and parts (guided placement): load_project("555") - Begin/reopen a RUN of 555: /projects/555/555_run.yaml a NAME opens the project's one run file; anything with a '/' is a literal path place_part(name, row, pins_json) - Place a part, expand its pins to bridges (0 = ok) part_identify(r1, r2 [, r3]) - Electrically identify the isolated part on those rows part_fingerprint(base, w, gnd, vdd) - Unpowered ESD-clamp fingerprint of a dipN chip's pins part_vectors(base, w, gnd, vdd) - Power the chip and run partdb truth-table vectors optional: place_part(name, row, pins_json, footprint, type, value, part_id) part_id: DB identity - re-placing the same part_id at the same row UPDATES it pins_json: {"A": {"pin": 1, "connect": "GND"}, "B": {"pin": 2, "connect": 7}} pin/offset place the leg, connect is a row or node name, class: signal|power|gnd|nc footprint "dip8"/"sip2" (default: a SIP strip sized from the pins listed) remove_part(name) - Remove a part: bridges, net names and entry (0 = ok) list_parts() - Parts as dicts (name/type/value/row/footprint/placed/placement/pins) guide_progress() - Guided-placement step, -1 when no guide is loaded Context (controls persistence): context_toggle() - Toggle global/python mode context_get() - Get current mode name OLED Display: oled_print("text") - Display text oled_clear() - Clear display oled_connect() - Connect OLED oled_disconnect() - Disconnect OLED OLED Layout (retained screens, live-updating): from oledgui import Screen, Text, Rect, set_var s = Screen() s.add(Text("A0 {adc:0}V", x=0, y=0, font="Pragmatism", size=10)) s.show() - make it the active display set_var("name", value) - push a live {name} value s.save("layout") - save to /screens/layout.json Tokens: {adc:N} {gpio:N} {dac:N} {uptime} {freemem} {undo} Flat API: oled_screen/oled_add_text/oled_add_shape/oled_set Probe Functions: probe_read([blocking=True]) - Read probe (default: blocking) read_probe([blocking=True]) - Read probe (default: blocking) probe_read_blocking() - Wait for probe touch (explicit) probe_read_nonblocking() - Check probe immediately (explicit) get_button([blocking], [consume]) - Get button (blocking=True, consume=False) probe_button([blocking], [consume]) - Get button (blocking=True, consume=False) check_button([consume]) - Check button non-blocking (consume=False) probe_button_blocking([consume]) - Wait for button (consume=False) probe_button_nonblocking([consume]) - Check button immediate (consume=False) consume=False (default): Holding button returns same state (continuous control) consume=True: Each press detected once (one-shot detection) Probe Switch Functions: get_switch_position() - Get current switch position set_switch_position(pos) - Set switch position manually check_switch_position() - Check switch via current sensing Touch returns: ProbePad object (1-60, D13_PAD, TOP_RAIL_PAD, LOGO_PAD_TOP, etc.) Button returns: CONNECT, REMOVE, or NONE (front=connect, rear=remove) Switch returns: SWITCH_MEASURE (0), SWITCH_SELECT (1), SWITCH_UNKNOWN (-1) Clickwheel (Rotary Encoder): clickwheel_get_position() - Get raw position counter clickwheel_reset_position() - Reset position to 0 clickwheel_get_direction([consume=True]) - Get direction event clickwheel_get_button() - Get button state clickwheel_is_initialized() - Check if clickwheel is ready consume=True (default): Direction cleared after reading (one-shot detection) consume=False: Direction persists until consumed (can read multiple times) Direction returns: CLICKWHEEL_NONE (0), CLICKWHEEL_UP (1), CLICKWHEEL_DOWN (2) Button returns: CLICKWHEEL_IDLE (0), CLICKWHEEL_PRESSED (1), CLICKWHEEL_HELD (2), CLICKWHEEL_RELEASED (3) CLICKWHEEL_DOUBLECLICKED (4) is reserved and NEVER returned - the encoder has no double-click gesture. Two fast presses are two ordinary clicks. Status: print_bridges() - Print all bridges print_paths() - Print path between nodes print_crossbars() - Print crossbar array print_nets() - Print nets print_chip_status() - Print chip status Filesystem: jfs.open(path, mode) - Open file jfs.read(file, size) - Read from file jfs.write(file, data) - Write to file jfs.close(file) - Close file jfs.exists(path) - Check if file exists jfs.listdir(path) - List directory jfs.mkdir(path) - Create directory jfs.remove(path) - Remove file jfs.rename(from, to) - Rename file jfs.info() - Get filesystem info Misc: arduino_reset() - Reset Arduino run_app(appName) - Run built-in app pause_core2(pause) - Pause/unpause Core2 (True/False) send_raw(chip, x, y, set) - Send raw data to crossbar chip force_service(name) - Force run a specific service (e.g., "ProbeButton") force_service_by_index(idx) - Force run service by index (faster) get_service_index(name) - Get service index by name (cache for fast calls) Examples (all functions available globally): dac_set(DAC0, 5.0) # Set DAC0 using node constant voltage = get_adc(1) # Read ADC1 using alias connect(TOP_RAIL, D13) # Connect using constants connect(4, 20) # Connect using numbers top_rail = node("TOP_RAIL") # Create node object oled_print("Hello!") # Display text on OLED current = get_current(0) # Read current using alias set_gpio(1, True) # Set GPIO pin high pwm(1, 1000, 0.5) # 1kHz PWM, 50% duty wavegen_set_wave(SINE); wavegen_start() # Start sine wave set_net_color(0, "red") # Color net 0 red set_net_color_hsv(1, 0.5) # Cyan net 1 (HSV hue) nodes_save() # Save current connections pad = probe_read() # Wait for probe touch button = get_button() # Wait for button press ``` ## The entire output of nodes_help() ```jython >>> nodes_help() Jumperless Node Reference ======================== NODE TYPES: Numbered: 1-60 (breadboard) Arduino: D0-D13, A0-A7 (nano header) GPIO: GPIO_1-GPIO_8 (routable GPIO) Power: TOP_RAIL, BOTTOM_RAIL, GND DAC: DAC0, DAC1 (analog outputs) ADC: ADC0-ADC4, PROBE (analog inputs) Current: ISENSE_PLUS, ISENSE_MINUS UART: UART_TX, UART_RX Buffer: BUFFER_IN, BUFFER_OUT THREE WAYS TO USE NODES: 1. NUMBERS (direct breadboard holes): connect(1, 30) # Connect holes 1 and 30 connect(15, 42) # Any number 1-60 2. STRINGS (case-insensitive names): connect("D13", "TOP_RAIL") # Arduino pin to power rail connect("gpio_1", "adc0") # GPIO to ADC (case-insensitive) connect("15", "dac1") # Mix numbers and names 3. CONSTANTS (pre-defined objects): connect(TOP_RAIL, D13) # Using imported constants connect(GPIO_1, A0) # No quotes needed connect(DAC0, 25) # Mix constants and numbers MIXED USAGE: my_pin = node("D13") # Create node object from string connect(my_pin, TOP_RAIL) # Use node object with constant oled_print(my_pin) # Display shows 'D13' COMMON ALIASES (many names work for same node): "TOP_RAIL" = "T_R" "GPIO_1" = "GPIO1" = "GP1" "DAC0" = "DAC_0" "UART_TX" = "TX" NOTES: - String names are case-insensitive: "d13" = "D13" = "nAnO_d13" - Constants are case-sensitive: use D13, not d13 - All three methods work in any function ``` --- # JFS (Filesystem) The `jfs` module is basically like MicroPython's `vfs` and parts of `os`, but kinda written in a style that's probably more familiar to Arduino-style C++ people (me). It uses the *almost* standardized API shared by [`FatFS` (the one Jumperless actually uses), `LittleFS`, and `SDFS`](https://arduino-pico.readthedocs.io/en/latest/fs.html#file-system-object-littlefs-sd-sdfs-fatfs), but still has been *Pythonified* to use types that are easier to work with in MicroPython. ## Quick Reference File Operations: - `jfs.open(path, mode)` - Opens file, returns file handle - `jfs.read(file, size=1024)` - Read from file - `jfs.write(file, data)` - Write to file - `jfs.close(file)` - Close file - `jfs.seek(file, position, whence=0)` - Seek in file - `jfs.tell(file)` - Get current position - `jfs.size(file)` - Get file size - `jfs.available(file)` - Get bytes available File Object Methods (after `f = jfs.open(...)`): - `f.print(data)` - Print to the file (like `print()` but writes to the file, adds a newline) - `f.flush()` - Flush buffered data to file - `f.position()` - Alias for `f.tell()` - `f.name()` - Get file name Directory Operations: - `jfs.exists(path)` - Check if path exists (returns True/False) - `jfs.listdir(path)` - List directory contents (returns list) - `jfs.mkdir(path)` - Create directory - `jfs.rmdir(path)` - Remove directory - `jfs.remove(path)` - Remove file - `jfs.rename(from, to)` - Rename/move file - `jfs.stat(path)` - Get file/directory status info Filesystem Info: - `jfs.info()` - Returns (total, used, free) tuple ## Usage ```jython import jfs #you don't actually need this, jfs is imported globally by default # List files in the root directory files = jfs.listdir('/') # returns a python list print(files) ``` Output: ```jython ['config.txt', 'slots/', 'python_scripts/'] ``` (Directories come back with a trailing `/`. Older filesystems may also show legacy `nodeFileSlot*.txt` files and a `net_colors/` directory at the root.) If you want to make this print with subdirectories ```jython files = jfs.listdir('/') for file in range(len(files)): print(files[file]) if files[file].endswith("/"): subdir = jfs.listdir(files[file]) for i in range(len(subdir)): print(" - " + subdir[i]) ``` Output: ``` config.txt slots/ - slot0.yaml - slot1.yaml - slot2.yaml python_scripts/ - history.txt - examples/ - lib/ - script_1.py - script_2.py - log.txt ``` --- ## File API File objects returned by `jfs.open()` support method calls directly on the object: ```jython # Object-oriented file operations # Write-only mode f = jfs.open('hello.txt', 'w') f.write('Hello, Jumperless!') f.close() # Read from the file (need to reopen or use w+/r+ mode) f = jfs.open('hello.txt', 'r') content = f.read() # Read from file object size = f.size() # Get file size f.close() # Read-write mode (truncates file) f = jfs.open('hello.txt', 'w+') f.write('Hello, Jumperless!') f.seek(0) # Seek to beginning to read what we wrote content = f.read() # Now this works! f.close() # Context manager support (automatically closes file) with jfs.open('data.txt', 'w+') as f: f.write('This file will be automatically closed') f.seek(0) # Reset to beginning content = f.read() # Read back what we wrote pos = f.tell() # Get current position name = f.name() # Get file name ``` ### Using `f.print()` for logging The `f.print()` method works like Python's `print()` but writes to the file. It automatically converts arguments to strings, joins multiple arguments with spaces, and adds a newline - perfect for logging. **Note:** `f.print()` does *not* flush after each call (a FatFS flush takes ~2 seconds, so auto-flushing would make logging loops crawl). Data is committed when you `f.close()` or `f.seek()` - if you're logging data you can't afford to lose to a crash or reset, call `f.flush()` yourself at checkpoints: ```jython # Great for logging - auto-converts types and adds newlines with jfs.open('log.txt', 'w+') as f: f.print("Starting test...") voltage = adc_get(0) f.print("Voltage:", voltage, "V") # Multiple args work f.print("Test complete!") f.flush() # Commit to flash at a checkpoint # Unlike f.write(), f.print() handles non-strings automatically f = jfs.open('data.txt', 'w') f.print(123) # OK - converts int to string f.print(3.14) # OK - converts float to string f.print("mixed", 42) # OK - multiple args joined with spaces f.close() ``` **Note:** `f.print()` is a file object method only. There is no `jfs.print()` module-level function. Other ways to do the same thing ### 2. Module-Level Functions You can also use module-level functions with file handles: ```jython f = jfs.open('hello.txt', 'w') jfs.write(f, 'Hello, Jumperless!') # Module-level function jfs.seek(f, 0) # Module-level function content = jfs.read(f) # Module-level function jfs.close(f) # Module-level function ``` ### 3. Direct String Operations (For simple cases) The whole-file path-based helpers live in the `jumperless` module (available globally), not in `jfs`: ```jython # Write and read by path, no file handles needed fs_write('notes.txt', 'key=value\nother=setting') content = fs_read('notes.txt') ``` `fs_read()` doesn't read whole files - it gives you at most the first 4 KB (1 KB on the original Jumperless) and stops at a NUL byte. For anything bigger, or anything binary, use `jfs.open(path).read()`. `fs_write()` does write the whole string. ## File Modes When using `jfs.open(path, mode)`, the following modes are supported: | Mode | Description | Read | Write | Create | |------|-------------|------|-------|---------| | `'r'` | Read only | ✅ | ❌ | ❌ | | `'w'` | Write only | ❌ | ✅ | ✅ | | `'a'` | Append only | ❌ | ✅ | ✅ | | `'r+'` | Read + Write | ✅ | ✅ | ❌ | | `'w+'` | Read + Write | ✅ | ✅ | ✅ | | `'a+'` | Read + Append | ✅ | ✅ | ✅ | **Important:** You cannot read from a file opened in write-only mode (`'w'` or `'a'`) - reads just come back empty. Use `'w+'`, `'r+'`, or `'a+'` if you need both read and write access. You can also add `'b'` to any mode (e.g. `'rb'`, `'wb'`) to open in binary mode: reads return `bytes` and writes accept `bytes`/`bytearray`/`memoryview`. While the board is mounted as a USB drive on a computer, `jfs` is read-only. Opening for `'w'`, `'a'`, `'r+'`, `'w+'` or `'a+'` raises `OSError`, and so do `jfs.mkdir()`, `jfs.remove()`, `jfs.rename()` and `jfs.rmdir()`. Reads still work, and ejecting the drive on the computer gives you writing back. ## Open a file for writing ```jython f = jfs.open('hello.txt', 'w') f.write('Hello, Jumperless!') # Now works with object-oriented API! f.close() ``` ## Directory Operations ### `jfs.listdir(path)` Returns a list containing the names of the entries in the directory given by `path`. * `path` (str): The path to the directory. **Example:** ```jython # List contents of the root directory print(jfs.listdir('/')) # List contents of a subdirectory jfs.mkdir('/my_dir') print(jfs.listdir('/my_dir')) ``` ### `jfs.mkdir(path)` Create a new directory. * `path` (str): The path of the new directory. This raises `OSError` if the directory already exists (errno 17), if the path is a file (errno 20), or if the parent directory doesn't exist. Guard it with `jfs.exists()` if the script might run more than once. ### `jfs.rmdir(path)` Remove an empty directory. * `path` (str): The path of the directory to remove. ### `jfs.remove(path)` Remove a file. * `path` (str): The path of the file to remove. ### `jfs.rename(old_path, new_path)` Rename a file or directory. * `old_path` (str): The current path. * `new_path` (str): The new path. ### `jfs.exists(path)` Check if a file or directory exists. * `path` (str): The path to check. * Returns `True` if it exists, `False` otherwise. ### `jfs.stat(path)` Get status of a file or directory. * `path` (str): The path of the file or directory. * Returns a 10-element tuple in the same order as `os.stat()`. Index 0 is the mode (`0x4000` for a directory, `0x8000` for a file) and index 6 is the size (0 for directories); the timestamps and everything else are zero placeholders. A path that doesn't exist raises `OSError`. ## Filesystem Information ### `jfs.info()` Get information about the filesystem. * Returns a tuple `(total_bytes, used_bytes, free_bytes)`. **Example:** ```jython total, used, free = jfs.info() print("Filesystem Size: " + str(total / 1024) + " KB") print("Used: " + str(used / 1024) + " KB") print("Free: " + str(free / 1024) + " KB") ``` ## File I/O The `jfs` module supports standard file opening and handling using `jfs.open()` and file objects, including support for the `with` statement for automatic resource management. ### `jfs.open(path, mode='r')` Open a file and return a corresponding file object. * `path` (str): The path to the file. * `mode` (str, optional): The mode in which the file is opened. Defaults to `'r'`. * `'r'`: Read (default). * `'w'`: Write (creates a new file or truncates an existing one). * `'a'`: Append. * `'r+'`: Read and write. * `'w+'`: Write and read (creates/truncates). * `'a+'`: Append and read. At most 8 `jfs` files can be open at once - a 9th `jfs.open()` raises `OSError`. Closing files (or using `with`) frees the slots, and anything still open is closed for you when the script or REPL session ends. The example script `/python_scripts/examples/file_io_basics.py` walks through this. **Example:** ```jython # Open a file for reading f = jfs.open('config.txt', 'r') content = f.read() f.close() # Use 'with' for automatic closing with jfs.open('data.log', 'a') as log_file: log_file.write('New log entry.\n') ``` ## File Object Methods The file object returned by `jfs.open()` has the following methods: ### `file.read([size])` Read `size` bytes from the file. If `size` is omitted, reads from the current position to the end of the file in one call - there's no per-call cap. A file too big to fit in the MicroPython heap raises `MemoryError`, so read those in chunks with `f.read(n)`. ### `file.write(data)` Write the given string or bytes `data` to the file. Returns the number of bytes written. ### `file.close()` Close the file. A closed file cannot be read or written to. ### `file.seek(offset, [whence])` Change the stream position. * `offset`: The byte offset. * `whence` (optional): * `0`: Seek from the start of the stream (default). Use `jfs.SEEK_SET`. * `1`: Seek from the current position. Use `jfs.SEEK_CUR`. * `2`: Seek from the end of the stream. Use `jfs.SEEK_END`. ### `file.tell()` Return the current stream position. * **Aliases**: `file.position()` ### `file.size()` Return the total size of the file in bytes. ### `file.available()` Return the number of bytes available to be read from the current position to the end of the file. ### `file.name()` Returns the name of the file. (It's a method call, not an attribute - `f.name` gives you the bound method, not the string.) --- ## Module-Level File Operations For convenience, the `jfs` module also provides functions that operate directly on file handles returned by `jfs.open()`. This can be useful in some scripting scenarios but using file object methods is generally preferred for clarity. They're not quite the same thing though: `jfs.read()` always returns a `str` (binary mode is only honored by `f.read()`) and reads 1024 bytes by default, `jfs.write()` returns `None` instead of the byte count, and `jfs.seek()` doesn't flush buffered writes first - only `f.seek()` does. * `jfs.read(file_handle, [size])` * `jfs.write(file_handle, data)` * `jfs.close(file_handle)` * `jfs.seek(file_handle, offset, [whence])` * `jfs.tell(file_handle)` * `jfs.size(file_handle)` * `jfs.available(file_handle)` **Example:** ```jython file_handle = jfs.open('temp.txt', 'w') jfs.write(file_handle, 'some data') jfs.close(file_handle) ``` --- # Parts Tester Your Jumperless can know what's plugged into it. Tell it a chip, module, or passive is on the board and it becomes a `part`: its pins get labeled, its power gets wired for you, tapping a pin tells you what it is, and if something's wired dangerously wrong the board warns you. If the part is a little OLED, the Jumperless will even drive it. You still wire your own circuit with the probe like always, parts just make the board smarter about what's on it. The `Parts` menu has four things in it: - [`Auto Scan`](#auto-scan) - it figures out what's plugged in by itself - [`Place Part`](#placing-a-part) - tell it what's plugged in and where - [`Test Part`](#test-part) - re-measure a placed part to check it's what it says it is - [`Remove Parts`](#remove-parts) - take parts off, leg by leg or whole ## Placing a Part `Parts` > `Place Part` gives you a class picker on the breadboard LEDs: - `Logic` - 7400 / 4000 series ICs - `Analog` - 555s, op-amps, regulators - `Discrete` - resistors, caps, LEDs, diodes - `Transistors` - BJTs and MOSFETs - `Displays` - OLED panels and friends - `Modules` - BME280, MPU6050, and other breakout boards - `Remove parts` - [same thing as the menu entry](#remove-parts) Scroll with the clickwheel, click to pick a class, then pick your part the same way. ### DIP chips: two taps A DIP straddles the center line, but it can still face two ways (pin 1 bottom-left, or spun 180° with pin 1 top-right), so it gets two taps: tap the hole **pin 1** is actually in, then the corner pin diagonally opposite it. That locks the orientation, and if your second tap isn't where a chip of that size could put it, it asks again (which also catches picking the wrong size chip before anything gets placed.) Typing the row numbers in the terminal works too. ### Everything else: tap each signal Modules and SIP-header parts have **no standard pin order** - one vendor's OLED is `GND VCC SCL SDA`, the next one's is `VCC GND SCL SDA`. So instead of guessing, the Jumperless asks you to tap each signal by name: the breadboard shows `TAP VCC`, then `TAP GND`, then `TAP SCL`, and so on. Wherever you tap is where that signal is - the part can be plugged in any orientation, or even spread across fly wires (any rows in the same half of the board work). Every tap you land flashes that row in that signal's own color, and the rows you've already tapped stay lit in theirs, so you can see which row is which signal. (The flat green flash is the DIP pin 1 tap.) Tapped the wrong row? It won't let you tap the same row twice for one part, and clicking the wheel backs you out to try again. Resistors, caps, LEDs, diodes and transistors don't work that way. The prompt is just `TAP any leg` and the order doesn't matter - after the taps the board measures the part and works out for itself which leg is the anode or cathode, or the emitter, base and collector. If it can't tell, it places the part anyway in tapped-row order and says `couldn't verify pins`. A two-lead part's ends still have to be one hole on the top half and the hole directly below it on the bottom half. ### Power Pins When a part is placed, its power pins get routed to a `Rail` automatically: a `VCC` pin goes to a rail that's already on at the voltage the part wants (5V or 3.3V) if there is one, otherwise to whichever rail is on, otherwise to the rail on its own half. `GND` pins connect to ground. So you don't have to wire them up yourself. Regulator outputs and `VEE`-style pins are left for you to wire. The rails still obey **you** - nothing is hot until you turn a rail on, and the voltage is whatever you set. (Also worth knowing: most I2C modules are happiest with rails at `3.3V` because the RP2350B can only pull the I2C lines up to 3.3V, if you add external pullups it should be fine at 5V) If you tap a power pin onto a row that's already wired to a rail or to ground, the Jumperless leaves it alone - no automatic bridge either way, that row is yours. If it's the wrong polarity (VCC onto a grounded row) the part warning says so on the OLED and on serial (`vcc_to_gnd`, `gnd_to_hot`). It won't short a rail to ground for you (but be aware that it can still short through a wire or diode placed on the breadboard. Don't worry, this probably won't kill your Jumperless and you'll see the current ants go crazy.) ## Test Part `Parts` > `Test Part` shows a picker of your placed parts. Pick one and it re-measures it in place: discretes and transistors get the same electrical check the scan uses (so you can tell if it still reads like what you said it was), a display gets pinged to see if it's alive, a named chip gets a seated check - it reads the chip's protection diodes and says `chip present` / `ESD 0.65V`, or `no ESD reply` / `seated?` - and a generic `IC` record runs the full [identify](#auto-scan) and offers to rename itself to whatever the vectors say it actually is. Anything else with more than three pins says `can't test this one yet`. ## Remove Parts `Parts` > `Remove Parts` works two ways. Tap a leg of a placed part and just that leg is removed - its bridge, its net name, its entry in the part - and removing the last leg removes the part itself. Or scroll the wheel through your placed parts (each one highlights on the board with its card on the panel) and a click removes the whole highlighted part. The scroll's last stop is `All`, which clears every part (it asks first - confirm with the probe's `Connect` button). Clearing the whole board (`x`) clears its parts too. Parts are saved with your slot, so they come back after a reboot. ## Auto Scan Or skip all that and make it figure out what's on the board by itself. `Parts` > `Auto Scan` lifts all your wiring out of the way (it goes back exactly as it was when the scan exits), pokes every row, and measures anything that conducts. It also parks both rails at 0 V and turns probe power off while it runs, so a powered circuit going dark is expected - both come back when it's done. Any press stops it - either probe button, the wheel, or any key in the terminal. You can watch it work, the row it's testing sweeps down the board in rainbow and anything that conducts stays lit green. The OLED says which phase it's in. A pretty full board takes about 30 seconds. [Image: The board mid-scan, everything that conducts is lit green] [Image: OLED while scanning] Stuff it can find: - `RESISTOR 4.7k`, `LED 1.85V`, `DIODE 0.65V`, `CAPACITOR` - two-lead parts get typed and measured, with the anode lit red and the cathode blue - `BJT_PNP 0.59V` (or NPN, or FETs) - lit emitter red, base amber, collector blue - `a chip?` - it reads the chip's clamp diodes to find which rows are GND and VCC, then probes the rest of the pins against them (`row 35 conducts - a pin`) - `I2C 0x3C module` - it powers the cluster briefly and asks if anything answers on the bus (this is how an SSD1306 module shows up) - `a 7-seg display?` - all the segments light from one common pin - `rows 5-8: SSD1306? (sip module)` - a run of rows in one half that fits a SIP module in the part database (if more than one record fits you get a `Which?` picker instead) - parts you already placed just get named (`7SEG52 (placed)`), and a lone noise row gets checked and ignored [Image: The verdict - a chip across both halves, a capacitor, a PNP in E/B/C colors, and resistors] When it's done it asks about each finding, one at a time. Same gestures as everywhere else, `click` or `Connect` = yes, `hold` or `Remove` = no (or `y`/`n` in the terminal, anything else bails out of the whole confirm pass). What the prompts do: [Image: add a found chip] - `add RESISTOR rows 12-13?` - places it as a part, same as if you did it through `Place Part` - `add dip16 chip rows 33-40?` - places a chip (it already paired the span with its mirror across the middle, that's the `far side 3-10` on the second line) - `identify dip16 chip rows 33-40? powers it briefly` - offered after every chip you add. It fingerprints each pin's clamp diodes, then actually powers the chip and runs the truth tables of everything in the part database that could fit. (If it can't work out which row is the chip's ground it tells you and the chip stays a generic IC.) Whatever passes shows up in a `Which?` picker - pick one and it places with real pin names and no tap, the vectors already proved which way it's facing. Or pick `Generic IC` and it places as `IC33` with unnamed pins (`Test Part` runs the same identify on it later and offers to rename it.) If nothing passed, or you said no to identify, the `Which?` picker lists `Generic IC` plus every chip that size in the part database, and picking one of those asks you to tap pin 1 - nothing proved which way it's facing. - `wire 8-seg display (common 58) to GPIOs?` - routes each segment to its own GPIO and the common to the rail it wants, names the nets `7SEG52_S1` through `S8`, then blinks each segment in order so you can see which GPIO got which. After that you can drive it from MicroPython without touching a wire. The identify run on my 7447 looks like this: [Image: identifying] ```jython identify? dip16 chip rows 33-40 powers it briefly (y/n) vectors: trying 7447 (rotated 180) vectors: trying 74595 (rotated 180) identify fp=GGGGGGG-GGGBGGG- tried=2 pass=7447(r) ``` New parts' labels light up along the board edge for a few seconds after the scan: [Image: labels after the scan] If it refuses to scan: `board reads powered` means something is feeding the matrix and charged rows look like parts, unpower whatever it is and rescan. `no clean ADC lane` means every free ADC is being driven and there's nothing left to measure with. ## Living with placed parts **Labels.** Right after you place a part, its pins light up along the board edge in their class colors for a few seconds, then go dark. An idle board stays clean - labels come back when they're relevant (you tap the part, its net gets highlighted, or a warning is active). **Tap a pin to ask about it.** With the probe switch on `Select`, tap any row a part lives on and the OLED shows the part name, the pin's label, and its class - `NE555 pin 3 OUT`, that kind of thing. **Highlighting.** Highlight a net that lands on a part pin and the OLED says `SSD1306 SDA` instead of `Net 12`. Highlight a GPIO that's genuinely configured as I2C (checked against the actual RP2350 pin function register, not guessed) and it says `GPIO 7 SDA`. Scrolling the highlight onto a placed part stops on the whole part first, then each detent walks one of its pins. `[clickwheel] part_walk` sets the order: `z` (the default - along this side, then across to the far corner, so the wheel keeps its direction on the board), `pin_order` (round the part by pin number), or `off` (this side only). **Warnings.** The board judges every power pin by its polarity. `VCC` / `VDD` / `V+` pins expect the most positive supply, so a grounded net or a negative rail under one of them is wrong-way power (`vcc_to_gnd`, `vcc_to_neg`). `VEE` / `VSS` / `V-` pins expect the most negative supply - `GND` (single supply) and a negative rail (bipolar) are both normal there, and only a *positive* source trips `vee_to_hot`. A ground pin on a hot rail is `gnd_to_hot`, a power pin and a ground pin of the same part sharing a net is `self_short`, and a 3.3V display panel riding a rail above 3.6V is `power_overvolt`. When one trips, the offending pin pulses in the warning color and the OLED shows the part, the row that pin is on, and the reason in words (`4051` / `row 37` / `vee to hot!`) - the pin's own name is on the serial `PARTWARN` line. By default it only tells you - it won't undo your wiring - but see **Part safety** if you want it to say no. **Part safety.** `[routing] part_safety` in the config file decides whether a warning can also stop a wire. `off` (the default) only warns. `power` refuses any *new* connection that would put wrong-way power on a placed part (`vcc_to_gnd`, `vcc_to_neg`, `vee_to_hot`, `gnd_to_hot`, `self_short`). `all` refuses on every warning the board can raise. A refusal shows the part card with a `refused` line on the OLED and prints `PARTDB connect refused part="4051" pin="VEE" row=37 reason="vee_to_hot"` on serial. Loading a slot and undo/redo never go through the gate - a saved circuit is yours to keep. ## Breadboard Displays Place a small I2C OLED (the 0.91" 128x32 SSD1306 is the well-tested one) through `Parts` > `Displays`, tapping each of its pins as prompted. Then: 1. The Jumperless routes the display's `SDA`/`SCL` to two of its own GPIOs through the crossbar - you never wire data lines. 2. Power rides the rails you already wired during placement - turn a rail on (3.3V is the happy voltage). 3. The moment the panel powers up, the board finds it and the boot animation starts playing on it, ambient - it keeps running while you use menus, probe around, and measure things. The serial monitor narrates the lifecycle: `DISPLAY routed`, then `DISPLAY alive` when the panel answers. If you steal its GPIOs from a MicroPython script the display pauses (`DISPLAY paused`) and resumes when you release them. ## Terminal twins Everything above works over serial too: the part pickers echo what they're showing, any "tap a row" prompt accepts a typed row number + enter, and placements print machine-readable lines (`PARTDB place ok=NE555 row=42`, `PARTPICK sig=SDA row=8`, `PARTPIN`/`PARTWARN` for inspects and warnings) so scripts and tools can follow along. From MicroPython, `jumperless.list_parts()` gives you the placed parts as dicts (name, type, value, row, footprint, and each pin's node, connect and class), `place_part(name, row, pins_json, ...)` and `remove_part(name)` place and remove parts, and `part_identify(row1, row2[, row3])` measures a two- or three-lead part sitting on those rows. --- # Calibration Everything under `Calibration` in the click wheel menu, and which one to run when something's off. The numbers they produce live in `config.txt`, survive `` `reset `` and firmware updates, and are shown on the OLED and in the terminal while each one runs - so it's worth having a terminal or the app open when you calibrate. **Fingers off the pads.** The probe is read through a resistive voltage divider, so a finger on the pads, or on the back of the four risers that connect the probe sense boards to the main board, changes the readings. That goes double while calibrating. ## Which one do I need? | If... | Run | |---|---| | Taps light the row next to the one you touched, or the same row sometimes lights its neighbor | [`Probe Pads`](#probe-pads) | | Taps are right with the switch on `Select` but off on `Measure`, or the other way round | [`Probe Pads`](#probe-pads), with the switch in **both** positions | | The logo is the wrong color for where the switch is, `Measure` mode won't start, or the board flips modes by itself | [`Switch Thresh`](#switch-thresh) | | A rail or DAC set to `3.3V` measures something else, or ADC readings are off | [`DACs Calib`](#dacs-calib) | | The probe LED is dark, or the buttons only work sometimes | [`Probe Cable`](#probe-cable) | | A connection you made doesn't conduct | [`Xbar Route`](#xbar-route) | | Something's wrong and you don't know what | [`Full Test`](#full-test) | ## Probe Pads Open `Calibration` > `Probe Pads` **with the tip in the air** (it measures the no-touch reading in the first second). The breadboard shows `Adjust` on the left (that's the wheel) and `Tap` on the right (that's the probe). **Switch on `Select`** (towards the tip): 1. Tap row 1. The row the board *thinks* you tapped lights up blue. If it's not row 1, turn the wheel until it is. You don't have to keep the tip on the pad - it keeps re-decoding your last tap as you turn, so tap, lift, turn. 2. Tap `A5` on the nano header, then a row somewhere in 20-40. Go back and forth between the three, nudging the wheel, until all of them are spot on. 3. Check the `ADC`, `DAC` and `GPIO` pads and the logo - each lights its own LEDs. If rows are right but those are off, lift the tip and reopen the app so it re-measures the no-touch reading. **Switch on `Measure`** (away from the tip). The highlight turns purple: 1. **Hold** the tip on a row somewhere in 20-40 for about half a second and leave it there. The OLED goes `hold row` → `match..` → `ok` (the row may blink once or twice while it does this). 2. Now tap row 1, then `A5` on the nano header, then back to your row in 20-40. Go between them turning the wheel until all three are spot on. A short click of the wheel redoes step 1 if you want. **Hold the wheel** to save. The terminal prints what got written: ```jython Probe calibration saved! Returning to menu floor (both positions): probe_min = 21 select: probe_max = 4055 measure (DAC0 feed): probe_max_measure = 4134 measure (GPIO feed): probe_max_measure_gpio = 4061 (matched) select switch current (DAC0 feed, INA1): 1.42 mA thresholds 0.90 / 1.20 tip drive (fixed): measure_mode_output_voltage = 3.310 V Saving config... ``` If it adds `NOTE: that is not above the SELECT threshold - run Switch Calib.`, run [`Switch Thresh`](#switch-thresh) next. !!! note "What's going on" Every row and pad has a little contact next to it, and all of them are strung together into one long resistor ladder. The probe tip drives a voltage into whichever contact it's touching, and the voltage that comes out the bottom of the ladder says how far along the ladder you are. One ADC reading, mapped linearly onto 101 positions: rows 1-60, the rails, the nano header, the logo pads, the `ADC`/`DAC`/`GPIO` pads. A linear map needs two endpoints, and that's the whole calibration: - **The bottom** (`pad_min`) is what the ADC reads with nothing touched. It's an offset of the sense circuit itself, the same in both switch positions, and the board measures it at boot and again when you open this app. That's why the tip has to be in the air for the first second - and why the small pads at the bottom of the ladder are the ones that go wrong if it isn't. - **The top** (`pad_max` on `Select`; `pad_max_measure` and `pad_max_measure_gpio` on `Measure`) is where row 1 lands. This is what the wheel moves. Row 1 is where it has the most leverage, `A5` is near the bottom of the ladder where the no-touch reading matters most, and a row in 20-40 checks the middle. `Select` and `Measure` have separate tops because the tip is driven by different things: on `Select` it's wired straight to a pin on the RP2350; on `Measure` it's the probe's buffer, fed through the crossbar by either `DAC0` or a spare GPIO (the board uses whichever is free). The GPIO feed sags a little more under load, so `Measure` keeps one top per feed. The half-second hold is the app reading your row under both feeds and setting the GPIO top so they agree; after that the wheel moves both together so they stay agreed. On `Select` the app also pins the buffer to `DAC0` and shows its current as `sw:` - that's the number [`Switch Thresh`](#switch-thresh) uses to tell the switch position. ## Switch Thresh `Calibration` > `Switch Thresh`, then two prompts: 1. `Switch to MEASURE (AWAY from TIP)`, click the wheel. It takes 20 readings - you can watch them fill in on the breadboard. 2. `Switch to SELECT (TOWARDS TIP)`, click the wheel. Same again. ```jython === Calibration Results === MEASURE mode median: 0.012 mA (tip H ok) SELECT mode median: 1.412 mA (tip L ok) Low threshold: 0.642 mA (switch to MEASURE) High threshold: 0.782 mA (switch to SELECT) ``` Any key in the terminal aborts without saving. It also refuses to save if the switch wasn't where the prompt asked, or if the two readings are too close together (`this may mean a bad probe cable!`) - in which case run [`Probe Cable`](#probe-cable). !!! note "What's going on" The probe's slide switch has no wire to the board - the board works out where it is by what the probe *draws*. On `Select` the probe LED is powered from the buffer supply, so the buffer's current (through an INA219 in the `DAC0` path) jumps by about 1.4 mA. `Switch Thresh` measures that current in both positions and puts the decision thresholds halfway between, with a little hysteresis. It also calibrates a second, faster detector that watches how the tip line behaves when the feed blinks off for a few microseconds (the LED's capacitor holds it up on `Select`; nothing does on `Measure`). The firmware runs this once by itself after an update from a version that didn't have it. ## DACs Calib **Unplug anything connected to the rails first.** Then `Calibration` > `DACs Calib` (or `$` in the terminal). It runs on its own for about a minute and narrates in the terminal, ending in a table like this: ```jython Calibration Values DAC Zero DAC Spread ADC Zero ADC Spread DAC 0 1650 20.51 8.12 18.28 DAC 1 1651 20.49 8.09 18.30 Top Rail 1647 20.55 8.21 18.27 Bottom Rail 1652 20.50 8.15 18.31 ``` `ADC calibration failed - insufficient valid points` means something was on a rail, or the USB audio stream was holding the ADC (close the microphone on the host, or `M` to turn it off) - fix that and run it again. It runs by itself on first boot. !!! note "What's going on" The four DAC channels (`DAC0`, `DAC1`, the top rail, the bottom rail) go through a scale-and-shift stage to get their ±8 V range, and every board's is slightly different. `DACs Calib` sets each one to a series of voltages, reads them back with the INA219 (which can only see positive voltages, hence the series), and solves for the zero and full-scale numbers that make "set 3.3 V" come out as 3.3 V. Then it does the same for the ADCs, using `DAC1` as the reference: `ADC0`-`ADC3`, `ADC4` (the 0-5 V one) and `ADC7` (the probe tip). A load on a rail while it runs turns into a wrong calibration. ## Full Test `Calibration` > `Full Test` (or `` `self_test `` in the terminal) runs every hardware check: the probe cable, crossbar routing, the probe tip voltage, PSRAM and the on-board chips. Each one paints a band on the breadboard - green passed, red failed - and the terminal gets a report (`` `self_test_report `` prints it again later). Anything that fails is re-run until it passes, or until you touch something during the countdown between rounds. At the end it holds the result on the LEDs until you touch a probe button, the wheel, or a key, then restarts. The two entries below it run one check each and don't restart afterwards - the result stays on the LEDs until you touch something. ### Probe Cable Checks the TRRS cable and jack: that the two pins a good cable shorts together really are shorted (both ways, eight times, with an intermittent-contact wiggle in between), that the button line floats when nothing's pressed, and that the LED data reaches the probe. This is the one to run when the probe LED is dark or the buttons are flaky. ### Xbar Route Puts a known voltage through every breadboard row, the routable GPIOs and both rails via the crossbar and measures it on the other side. The crossbar chips can't be read back, so this is the only way to know a connection actually closed - a row that doesn't conduct is named in the report. ## Where the numbers live All of it is in `config.txt`, editable with `` ` `` or the [config editor](06-config.md). `` `reset `` keeps these; `` `reset_calibration `` puts them back to defaults, and `` `force_first_start `` wipes everything and re-runs the first-boot calibration. - `[probe]` - `pad_min` (no-touch reading), `pad_max`, `pad_max_measure`, `pad_max_measure_gpio` from `Probe Pads`; `switch_threshold_low` / `_high`, `switch_select_max_ma`, `switch_blink_hold_pct` from `Switch Thresh`; `measure_voltage`, `droop_v0`, `droop_ohms` from the self test - `[calibration]` - `dac_0_zero` / `dac_0_spread`, `dac_1_*`, `top_rail_*`, `bottom_rail_*`, `adc_0_*` through `adc_4_*` and `adc_7_*`, all from `DACs Calib` [Image: The Probe category in the config editor] --- # Debug Views Look *Inside* your Jumperless You type all of these at the terminal prompt. `n` is on the menu you always see, `b` and `c` show up once you press `e`, and `C` isn't listed anywhere but it still works. ## Crossbar Array To see what the 12 analog crossbar switches are up to, just enter `C` [Image: Crossbar View] Lowercase `c` will show a compact version [Image: Crossbar Compact] You can also set it to live updating mode with `c!`. A second `c!` turns it back off, or use `c0` and `c1` to force it off and on. Turning it on clears the screen and pins the crossbar to the top of the terminal, and everything else scrolls underneath it. The live view only draws on the main serial port. Your browser does not support the video tag. --- ## Bridge Array Enter `b`. This is generally the most helpful one for *me* to troubleshoot what's going on if your issue has anything to do with routing or connections. It probably looks like nonsense to you but I've been in it so long it makes perfect sense to me. (there's an older version of this output in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/jumperless-probelessly)) It prints your duplicate stacking settings first, then the bridge array, then the paths, then the chip status. `b0` shows every path instead of just the routed duplicates, and `b2` shows every duplicate. [Image: Screenshot 2025-05-30 at 7 04 54 AM] --- ## Net List Enter `n` to show this one. If you have an `ADC`, a `gpio` input, or a `gpio` output routed to a net, it'll stay up and live update when those readings change, or when you move the clickwheel highlight. Any key ends it, and so does a probe button press or a click of the clickwheel. That key doesn't get eaten though, it runs as your next command, so press Enter or space to get out quietly rather than a letter that does something (`x` would clear all your connections). [Image: Screenshot 2025-05-30 at 7 10 04 AM] --- ## Scan `Apps` > `Scan` on the click wheel goes through every row and prints the voltage on it, rows with nothing on them come out as `floating` (that's how you tell a floating row from one that's tied to GND, which reads 0V). It keeps looping until you type something or click the wheel. --- # 3D Printable Stand I consider this an essential part of using a Jumperless and if they could fit in the box, I would've included them. So print a stand or ask someone to print it for you. Spin the model below to have a look and switch between variants. Grab the **STL** to print right away, or the **STEP** if you'd rather tweak the design (and let me know about any improvements you make and I'll add it here): [Here are the 3D models on Printables,](https://www.printables.com/model/1249365-jumperless-stand) if you prefer that for whatever reason. [[Image: 3DStandCollage]](https://www.printables.com/model/1249365-jumperless-stand) These all should print fine without supports, the angles of the probe slot were designed so there aren't any flat overhangs, but you do you. (these work for the OG Jumperless too, I added a notch to accommodate the slightly wider OG probe.) There's also a laser cut acrylic one. Turns out designing acrylic stuff that a human can assemble and stays together is hard and also I suck at it. This will fit together, but the order of operations is super weird and kinda needs to have some hot glue shoved into all the slotted parts to feel solid. But if you have a laser and want to try it, the files are [on GitHub](https://github.com/Architeuthis-Flux/JumperlessV5/tree/main/Jumperless23V50/Stands/Acrylic). Both stands are in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/time-to-get-excited). ## Rubber Feet These [stick-on rubber feet](https://www.amazon.com/AmazonBasics-300-Piece-Adhesive-Rubber-Bumpers/dp/B087MG3G76) also make it a lot more solid on your desk (and having the different sizes lets you shim the angle by putting different ones on the front and back.) If you were wondering why there's an little square of sticky feet in your box under the FPC board, this is why. (the ones on the bottom of the Jumperless itself are 8x2.5mm, in case you want extras around for when you feel like doing any soldering on it and take them off.) ## Dimensions If you want to take a swing at designing your own stand or something, here are the dimensions (in mm): [Image: Jumperless V5 and probe dimensions in mm] Or let your computer handle the measuring and just use [the 3D model](https://github.com/Architeuthis-Flux/JumperlessV5/blob/main/Jumperless23V50/3Dmodels/JumperlessAndProbe.3mf). The shell is [in the same repo](https://github.com/Architeuthis-Flux/JumperlessV5/tree/main/Jumperless23V50/Board%20Shell) if you want to change it. I put holes on both sides of the breadboard shell to accept Legos and technic axles, in case you want to make a stand or something with that (both sides are holes, there's nothing sticking out on the other side). The other 3 holes on the sides are for cooling, the idea is to use the spring clips as cooling fins and let air flow in from the side and out through the breadboard holes. Those are both from [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/good-news-everyone-things-are-happening). --- # OG Jumperless The original Jumperless (the one with the Nano header across the top and a single LED under each row) runs the same JumperlOS firmware as the V5 now. Everything else in these docs is written for the V5. [Image: OG Jumperless] ## Getting the firmware Every JumperlOS release has an OG build next to the V5 one, called `firmware_og_backport.1.x.x.x.uf2` (the version starts with a 1 instead of a 5). It's on the [JumperlOS releases page](https://github.com/Architeuthis-Flux/JumperlOS/releases), and it should also show up on the latest release in the [old Jumperless repo](https://github.com/Architeuthis-Flux/Jumperless/releases). Hold the `USB BOOT` button (it's on the back, next to the USB port) while you plug it in, a drive called `RPI-RP2` shows up, drag the `.uf2` onto it. Open the first serial port in any terminal and type `?` to check the version. !!! note The probe stuff on this page is newer than `1.7.11.0`, so until the next release you need a firmware built from the `dev` branch for it. [Image: the back of the OG Jumperless, with the USB BOOT button, the SPI DAC, the ADC buffers, the INA219s and the crossbar chips labeled] ## What's different | | V5 | OG | |---|---|---| | Rails | 4 rails you set from the firmware, -8V to +8V | a switch under the probe header, 3.3V / 5V / ±8V, the firmware can't see it | | Probe | 2 buttons, a `Select` / `Measure` switch, sensed through pads | a needle and 1 button, sensed by a tone through the crossbar | | LEDs | 5 per row (that's how it writes text on the breadboard) | 1 per row, so the terminal is where the words go | | DACs | `DAC 0` and `DAC 1`, ±8V | `DAC 0` 0 to 4.096V, `DAC 1` about -6.9V to +7V | | ADCs | 8, ±8V | `ADC 0` to `ADC 2` 0 to 5V, `ADC 3` ±8V | | Routable GPIO | `GPIO 1` to `GPIO 8` plus UART | `GPIO 0` plus UART Tx / Rx | | Click wheel, OLED | yes | no (so none of the wheel menus, and no idle-mode stuff) | | MicroPython | 64K heap plus the PSRAM | 24K heap, no PSRAM, so keep scripts small | The `node` names are the same on both, so `+ 1-5,10-gnd` in the terminal, the [MicroPython API](09.5-micropythonAPIreference.md), slots, and the [config file](06-config.md) all work the same. Anything about rail voltages, the click wheel, the OLED, or the special function pads just doesn't apply. ## The probe The OG probe is a kit you solder up, [here's the guide](https://github.com/Architeuthis-Flux/Jumperless/blob/main/Probe_Guide.md). Plug it into the bottom 2 holes of the 4-hole header at the top left corner, labeled 18 and 19. If pressing the button puts the Jumperless in probe mode but doesn't light the LED or sense rows, the Button and Probe connections are swapped, just turn the connector around. Keep the rail switch under that header on 3.3V or 5V whenever the probe is plugged in. On ±8V a rail tap puts 8V straight into the probe input and you can damage it. There's one button, so the modes come from how long you hold it: - **short press** = `connect` mode - **long press** (hold it for 750ms) = `clear` mode The LED on the probe lights while you're in a session, and the `logo` LED tells you which mode you're in: - **pink** = `connect` mode (brighter once you're `holding` a row) - **orange** = `clear` mode - **blue** = it's asking you something, either which rows you meant or which voltage - **slowly drifting color** = idle, not in a mode (Same color code the old OG firmware used, minus the swirl. One LED cycling the whole rainbow every 3 seconds reads as a blinking light rather than a swirl, so idle drifts through a lap in about 26s instead. It's a bit less saturated than the rainbow too, though not by as much as you'd think, the `logo` LED shines up through the PCB and that filters out a lot of the color.) ## Connecting rows Short press the button, the terminal says `connect nodes`. Tap a row and its LED comes on while you're `holding` it (if that row is already in a `net` the LED can drop back to the net's color, the `logo` still shows bright pink so you know it's held), then tap another row and they're connected and the whole `net` gets a color. While you're holding a row: - **short press** drops it and you can start over (with nothing held, a short press leaves `connect` mode) - **long press** switches to `clear` mode The probe finds the needle by sending a tone through the crossbar into each row in turn, and it needs the crossbar empty to do that, so the board's connections are all lifted for the length of the session and put back when you leave. Your circuit stops while you probe. (The V5 doesn't have this problem, its probe is sensed through pads.) One more thing that falls out of that: a row that's tied to a rail through a part (a pull-up resistor to `5V`, an LED to `GND`) looks like the rail to the needle, not like a row. ## Rails The rail strips on the OG are whatever the switch says (`+` is 3.3V, 5V or +8V and `-` is ground or -8V), and the firmware has no way to read that switch, so they aren't `node`s. What it *does* have are the internal supply nodes `3V3` and `5V`, and those are what a rail tap connects you to. So when you tap a `+` rail while probing, it asks which one you want: ```jython 3.3V short press = 5V, long press = select ``` Both `+` rail strips light up in the color of the current pick (amber for `3V3`, red-orange for `5V`), **short press** flips it, **long press** selects it. Then tap the row you want it on. It remembers your last answer and offers that first, until you reboot. Tapping a `-` rail just gives you `GND`, no questions. **Why does it ask every time?** Because the switch is right there and you can flip it whenever, and the firmware would never know. Answering with the one that matches the switch means the rail strip and the rows you connect agree. If you want something other than 3.3V or 5V, that's what the DACs are for. `DAC 0` does 0 to 4.096V and `DAC 1` does about -6.9V to +7V, and they're `node`s you connect to a row like anything else: ```jython dac_set(DAC1, 2.5) connect(DAC1, 12) ``` (Or `+ DAC1-12` in the terminal.) The DAC voltages get saved with the `slot`. ## Multiple rows Real parts short rows together. Tap a row with a resistor in it and the needle sees both ends, so the firmware can't know which row you meant. When that happens all the rows it found light up pink, one brighter than the rest, and the terminal lists them. The pink wins over whatever color those rows already had, so it still reads if they're part of a `net` already: ```jython [5] 12 short press = next, long press = select ``` **short press** moves the bright one along, **long press** picks it and the session carries on with that row. Take the probe off the board first if you want, the chooser stays up until you pick something (or until you tap a different `row`, which starts over). A press right after the needle lands opens the chooser too, you don't have to wait for the rows to light up. (Pressing at the same instant you touch down is different, the button shorts the probe tip while it's held so nothing can be sensed until you let go.) The rail voltage question works the same way, poke the rail and then answer it with the probe off the board. (The firmware watches the row for about 45ms before it decides, because one pass of the tone doesn't reliably see both ends of a short. If a pair still comes up as a single row, lmk and I'll stretch that window.) ## Clearing rows Long press the button (or long press from `connect` mode), the terminal says `clear nodes`. Tap a row and it gets disconnected from whatever it was bridged to. Same as the V5, it only removes that `node`'s own bridges, not the whole `net`. In `clear` mode a **short press** leaves, a **long press** goes back to `connect`. A session times out on its own after 80s of nothing, and typing anything in the terminal ends it too. ## Measuring To read a voltage (the OG probe has no `Measure` switch), connect one of the ADCs to the row (`ADC 3` is the ±8V one, the other 3 are 0 to 5V) and read it with `adc_get(3)` from MicroPython. Both INA219 current sensors are there too, `ina_get_current(0)` is the one in the crossbar's `I_P` / `I_N` path (connect those two `node`s in series with what you're measuring), `ina_get_current(1)` sits on the DAC output. --- # Odds and Ends ` - **Encoder-based connections** - Use the clickwheel to scroll through and select nodes without touching the probe - **Current sensing marching ants** - Animated visual feedback showing current flow direction between I+ and I- connections - **Python context switching** - Toggle between `global` and `python` connection contexts in the MicroPython REPL The JumperlOS firmware repo is at [https://github.com/Architeuthis-Flux/JumperlOS](https://github.com/Architeuthis-Flux/JumperlOS) --- --> ## Safety Info Here's an image of the little card that should have been inside your box [Image: Safety info Never put voltages above +9V or below -9V anywhere on this board. Don't use unpowered, the crossbars need power to block voltage too. Don't power externally, use the internal power supplies (rails / DACs). It can be powered from the 5V and GND pins on the Nano header or the FPC adapter instead of USB. External signals are okay, as long as the board remains powered.This board gets fairly warm in normal operation from the LEDs, if it ever gets hot, unplug it immediately and let me know. When the switch on the probe is set to Select Mode, it should only be used on the gold probe sense pads.The probe tip in Select Mode is always at 3.3V. Don't stab yourself or others with the probe, unless it's in self-defense. Do not eat your Jumperless V5. When in doubt, don't hesitate to ask!] - Never put voltages above +9V or below -9V anywhere on this board. - Don't use unpowered, the crossbars need power to block voltage too. - Don't power externally, use the internal power supplies (rails / DACs). - It can be powered from the 5V and GND pins on the Nano header or the FPC adapter instead of USB. - External signals are okay, as long as the board remains powered. - This board gets fairly warm in normal operation from the LEDs, if it ever gets hot, unplug it immediately and let me know. - When the switch on the probe is set to Select Mode, it should only be used on the gold probe sense pads. - The probe tip in Select Mode is always at 3.3V. - Don't stab yourself or others with the probe, unless it's in self-defense. - Do not eat your Jumperless V5. - When in doubt, don't hesitate to [ask!](https://discord.gg/bvacV7r3FP) There are a lot of exceptions to these if you know what you're doing. It's pretty hard to permanently damage this board. Some things (usually external power with the Jumperless off) can cause lockup on the [analog CMOS switches](https://tinyurl.com/24xrspea), but the current limiting resistors on their power supply pins generally keep them from drawing so much current that they permanently break. In situations where one chip is getting crazy hot, the first thing to try is to unplug the Jumperless, let it cool down, and try it again (obviously, change whatever you think was causing it). Most of the time they go back to normal after some rest. Don't let any of this scare you, I'd rather you just pretend it's indestructible and use it with reckless abandon. So if you manage to break anything, just let me know and I'll send out a fresh one and a return label, no questions asked*. *Actually, a ton of questions asked, so we can figure out how it happened and maybe prevent it from happening to someone else. But the point is I don't care if it's clearly your fault and not some manufacturing defect, I will make sure you have a working Jumperless. It's even printed on the box --- ## Adapter Boards There are two little boards in the box with your Jumperless, the SBC adapter and the FPC adapter (on rev 5 boards the OLED plugs into the SBC adapter, that's on the [OLED page](04-oled.md)). Neither of these are particularly importany [Image: a Raspberry Pi, the SBC adapter and a Jumperless V5 with an OLED on it] ### SBC Adapter This one plugs into the Nano header and maps it to the GPIO pins on any Raspberry Pi, so the Pi's pins show up as `node`s you can route like anything else. The Pi's GPIO numbers are printed on it (the BCM ones, not the header positions). Yes, the Raspberry Pi's 40 pin GPIO port has some very silly pin numbering, so I had to kinda follow that. The Pi's `TXD` and `RXD` (14 and 15 on the adapter, pins 8 and 10 on the Pi) land on `D0` and `D1`, so `A` connects them to the Jumperless's routable UART and you can have the Pi control the Jumperless over the UART lines for fully remote Jumperless-ing, the tags for that are on the [Arduino page](05-arduino.md#commands-from-routable-uart). Or don't press `A` and route them wherever you want on the breadboard. There's a little 2 pad solder jumper on it by the `5V` label in the `Tx`/`Rx` corner (`JP3` in the KiCad files, it comes open) that you can bridge to connect the 5V busses together and power your Jumperless from the Raspberry Pi. This is kinda why I didn't want to mess with USB-C Power Delivery or anything, it's kinda cool to just be able to shove in 5V from wherever, as long as it can provide 500-1000mA. The 4 pin column at the bottom left (with the Pi header at the top) is where the OLED goes, it's on `D2` and `D3`, which is the `gpio_7_8` connection on the [OLED page](04-oled.md). The OLED friction-fits onto the board with wiggly offset holes so you can always remove it to read the pin mappings for the Pi. I also threw in some universal-ish SMD footprints on the top, between the header rows. Also note that the SMD pads with the blobby extensions aren't connected to anything, I'm really shoving a square peg in an Arduino Nano shaped hole here, so some weirdness was inevitable. I talked about these in [my first update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/single-board-computer-fans-rejoice), and there are actual pictures instead of renders in [this one](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/good-news-everyone-things-are-happening). ### FPC Adapter The ribbon cable goes into the 20 pin FPC connector on the back of the Jumperless and brings the routable GPIO 1-8, the routable UART `Tx` and `Rx`, ADC 0-3, DAC 0 and 1, and 5V and GND out to pin headers on this board so you can clip a scope or meter to them. GPIO (or RP) 6 and 7 (`RP6` and `RP7` on the silkscreen) are on there too, but they only go to the RP2350, they're not on the crossbar (they're the `rp6_rp7` OLED connection on the [OLED page](04-oled.md)). (note: the GPIO numbers on the silkscreen start at 0, so 0 on the adapter is GPIO 1 on the Jumperless.) It has 2 Qwiic / STEMMA QT ports. You hook their `SDA` and `SCL` to any of the routable GPIO (or `Tx`/`Rx`/`RP6`/`RP7`) with that weird, wiggly footprint in the middle of the back side, one column is `SDA` and the other is `SCL`, put a solder blob on each one where you want it (they don't go anywhere until you do). You can also connect each port to a different pair of GPIO by cutting it somewhere in the middle. They come with 3.3V power (there's a little regulator on the board for it), the three-way solder jumper with `3V` and `5V` next to it (`JP1` in the KiCad files) switches that, cut the `3V` side that comes bridged and blob the `5V` side. [Image: the back of the FPC adapter with the solder blob spots marked] The column of double pads (on the left from the front, on the right in the back-side photo) fits a [Bus Pirate](https://buspirate.com/) cable, its IO pins land on the routable GPIO and its `Vout` on the `Ax` pad. Blob `Ax` to whichever ADC or DAC you want `Vout` on, same deal as the Qwiic lines. If you want to see exactly where all those traces go before you start blobbing or cutting, here's the layout from KiCad with each copper layer highlighted: The Jumperless can be powered from the 5V and GND pins on here instead of USB, same as the Nano header (that's on the [safety card](#safety-info) above). The pads along one edge are for daisy chaining a second Jumperless, there's no firmware for that yet. This one's in [that same update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/good-news-everyone-things-are-happening) too. --- ## Joom You can get the .uf2 file here: [https://github.com/Architeuthis-Flux/joom/releases/download/0.0.1/joom_full.uf2](https://github.com/Architeuthis-Flux/joom/releases/download/0.0.1/joom_full.uf2) You'll need to put the Jumperless in bootloader mode (unplug it, press the button on the back side of the USB port, plug it back in, then drag this UF2 file onto the drive called `RP2350` that pops up) Connect a speaker between the lower `RST` pin (the one closer to the breadboard) on the Nano header and `GND` for sound. When you're done playing Doom in a blindness simulator, just reload the regular firmware the same way as above. [https://github.com/Architeuthis-Flux/JumperlessV5/releases/latest](https://github.com/Architeuthis-Flux/JumperlessV5/releases/latest) --- ## Bandwidth Michael has done some [awesome work characterizing the bandwidth of the Jumperless](https://codeberg.org/multiplex/jumperless-wigglyvolts). The TL;DR is just the physical breadboard puts the 3dB roll-off at ~13MHz, and a signal passing through the crossbar matrix brings it down to around ~8MHz. It makes sense these are pretty high, these CH446Qs were originally made for switching video signals so bandwidth was pretty important when they were designing them. Keep in mind this isn't a hard limit, it's just where the signal gets attenuated by the (arbitrarilyish) defined 3dB, so your signal's amplitude is reduced by √2. --- [Image: HeroNew] ## Animations The Jumperless uses LED animations to show the state of different components on the breadboard. ### Rail Animations If it's a rail, those are animated and should be a continuous slow pulsing toward the top or bottom depending on the rail. They pulse red when the rail is set positive and blue when it's set negative. ### ADC Animations `ADCs` are green at 0V, and go through the spectrum to red at +5V, and get whiter hot pink toward +8V. Negative voltages are kinda blue/icy and do that same thing with the "cold" colors towards -8V. ### GPIO Animations ### Input Mode `GPIO` as inputs are a dim blue/white when floating, red for high, green for low ### Output Mode `GPIO` outputs will be either green or red depending on their state --- ## What's that `BUFFER_IN - DAC_0` bridge that's always there? That gets added to power the `probe LEDs`, it's kinda weird, but to multiplex 3.3V, GND, LED data, 2 buttons, and a +-9V tolerant analog line over the 4 wires on a TRRS cable, the line powering those LEDs is shared. The `connect`/`measure` switch is a Dual Pole Dual Throw (DPDT) switch. The probe tip needs to be at a steady 3.3V to be read by the `probe sense pads` which is a big resistive divider sensed by a single `ADC`. When you have it in `select` mode, the probe tip is getting 3.3V from a `GPIO` on the RP2350B driven `high`, and the LEDs get their power from the analog line, which is `ROUTABLE_BUFFER_IN` connected to `DAC 0` set to 3.3V. When you switch to `measure` mode, those roles get swapped, the LEDs are powered by that `GPIO`, and the probe tip is now `ROUTABLE_BUFFER_IN`. So in `measure` mode the tip is just a buffered analog line: tap a node and the Jumperless shows you that node's voltage on the OLED and in the terminal. The `probe sense pads` still work in that mode too, because the pad readings get scaled to whatever the tip is actually sitting at. ##### A side effect of needing a crossbar connection to light the probe is that the LEDs in `Select` Mode act as a test of whether the Jumperless is properly making connections. ### Why am I using one of the precious two DACs and not another GPIO? The answer is switch position sensing. You may notice there's no obvious way for the Jumperless to know where the switch is set, so I had to get creative on this one. `DAC 0`'s output is hardwired to go through a `current sense` shunt resistor, so when `DAC 0` is powering the `probe LEDs`, they'll be drawing some current I can measure with `INA1`, and therefore I can be reasonably confident that the switch is in the `select` position. If you need both `DAC`s, you don't have to do anything. Connect `DAC 0` to something (or set it outside 2.8V - 3.9V) and the firmware drops that feed and re-powers the probe from a free `GPIO` instead, starting at `GPIO 8` and working down. Switch sensing still works on a `GPIO` feed. If you'd rather it never touch `DAC 0` at all, set `[probe] power_source` to `gpio_first`, and `[probe] auto_connect` to `off` turns the probe feed off entirely. --- ## AI Generated Wiki If you want to read a wiki generated by AI and ask it questions about how this thing works and how to use it, [**DeepWiki**](https://deepwiki.com/Architeuthis-Flux/JumperlessV5/1-overview) was surprisingly accurate (enough.) The docs on this site are more about how to *use* your Jumperless, this is more geared toward helping understand the circuitry and code. --- ## Onboard Help Use `help` (or just `h`) for onboard documentation, `help [category]` for one section (the overview lists the categories), and `[command]?` for a single command's help. [Image: Screenshot 2025-07-04 at 5 52 32 PM] --- ## [GitHub Releases](https://github.com/Architeuthis-Flux/JumperlessV5/releases) If you want more info about each feature when I was particularly excited about it, I usually write about the new features in the [Release notes on Github](https://github.com/Architeuthis-Flux/JumperlessV5/releases). --- ## Schematic Here's the schematic that's printed on the inner flap of the box [Image: the open box with the schematic printed inside the lid] (the story of the box is in [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/time-to-get-excited)) If you want look at the schematic and PCB together and don't feel like downloading the whole thing and opening it in KiCad, [you can open it in the browser with KiCanvas here](https://kicanvas.org/?github=https://github.com/Architeuthis-Flux/JumperlessV5/blob/main/Jumperless23V50/MainBoard/JumperlessV5r6/JumperlessV5r6.kicad_pro) There are a bunch of solder jumpers on the back for hardware options, they're all labeled on the schematic. The Nano header's `5V`, `3V3`, `VIN` and both `GND` pads can each be cut off their supply and put on a spare GPIO instead, the two `RESET` pads can be swapped for the current sense pins, and the backpower diodes on the Nano `5V` and `3V3` pads are bypassed by default (`5V BP` and `3V BP`), cut those bridges if you're going to power a Nano from its own USB and don't want it feeding the Jumperless (that also stops the [SBC adapter](#sbc-adapter) powering it from a Pi). Those came out of [this Crowd Supply update](https://www.crowdsupply.com/architeuthis-flux/jumperless-v5/updates/good-news-everyone-things-are-happening). ## Writing Native apps Writing an app is just writing a function in the main firmware. The whole walkthrough is on the [Writing Apps](11-WritingApps.md) page. --- ## LLM Tool Specification for Jumperless V5 If you want to drive the Jumperless from a script or an LLM, that all lives on the [Automation & LLM Tools](07.5-automation.md) page. --- # Glossary of Terms ## Basic Concepts `net` = a group of all the `node`s that are connected together (enter `n` to see the list) `node` = anything the crossbar array can connect to, which includes everything on the breadboard and Nano header, as well as the internal `special function` `node`s like `routable GPIO`, `ADC`s, `DAC`s `row` = *kinda* the same thing as `node` but I generally use it to mean stuff on the breadboard (so special function things like `routable GPIO`, `ADC`s, `DAC`s that don't have a set location are excluded) `rail` = I use this to refer to the 4 horizontal power rails on the top and bottom (`top_rail`, `bottom_rail`, `gnd`), I will never call a vertical `row` a `rail`. (I know they're columns but it's easier to say a lot) `bridge` = a pair of exactly two `node`s (this is what you're making when you connect stuff with the probe, enter `b` to see the bridge array) `path` = the set of crossbar connections needed to make a single `bridge`, so it can have multiple `hop`s if it doesn't have a direct connection and needs to make a `bounce` through an intermediate `chip` (enter `c` to see the crossbar array) ## Hardware `chip` = shorthand for the CH446Qs specifically, lettered A-L. The first 8 (A-H) are considered "breadboard `chips`", and the last 4 (I-L) are considered "special function" chips (enter `c` to see their connections) `menu` = I generally mean the onboard clickwheel `menu` when I say this (`click` the wheel to enter those and `scroll` around.) Sometimes I mean the `main menu` which is the list of single character command that gets presented over serial. ## Slots and Files `slot` = one of **8** saved circuit configurations (slots 0-7) that you can switch between. Type ` `Load` > `0-7` (it previews each one as you scroll). `Slots` > `Save to` > `0-7` copies the active slot into another, and `Slots` > `Clear` > `0-7` empties one. `slot file` = a YAML file on the filesystem that stores a complete circuit configuration including bridges, power settings, and colors. Located at `/slots/slotN.yaml` where N is 0-7. These files are human-readable and can be edited directly! See [State File Structure](06-config.md#state-file-structure) for what's in one. `active slot` = the context that's actually loaded onto the hardware. Usually that's one of the numbered slots, but it can also be a project's `wiring.yaml` opened from the Files browser or with `z `. Enter `Q` to see which. When you make connections with the probe, they're saved to whatever's active automatically. ## Slot Management Commands - `<` = cycle to next slot (0→1→2...→7→0), or `