Skip to main content

Arduino Library

The Soldered Inputronic GRID library talks to the ATtiny404 on the board over I2C. Include InputronicGrid.h, create one InputronicGrid object and call begin(); then you read the pads and set the LEDs with short function calls.

Not installed yet? Follow Quick Start before using the functionality pages.

How pads and LEDs are numbered​

  • By row and column. readPad(row, col) and the six-argument setLED(row, col, r, g, b, intensity) take a row from 0 to 3 (top to bottom) and a column from 0 to 3 (left to right). Both point at the same pad.
  • By index. readButton(index) counts the buttons row by row: index = row * 4 + col. The five-argument setLED(index, r, g, b, intensity) counts the LEDs in the order they sit on the data line, which runs left to right on even rows and right to left on odd rows. On rows 1 and 3 the two index numbers therefore point at different pads; use the row and column form when you want a button and its LED to match.
  • As a 16-bit mask. readAllPads() returns bit i for button i, counted row by row. setLEDMask(mask, r, g, b) lights LED i in data-line order for bit i, the same numbering as the five-argument setLED(), and turns every other LED off. On rows 1 and 3, a bit in the readAllPads() mask and the same bit in the setLEDMask() mask point at different pads.

readButton(), readAllPads() and setLEDMask() are in the library at this commit, but no example uses them yet.

Functionality​

Each page starts with one verified library example and explains every function the example uses to get that result.