rushabhcodes/desk-fidget-counter
A PLA desk fidget counter assembly houses an F1 PCB, 1.28-inch LCD with harness, rotary knob/bearing mechanism, button cap, and screw-secured base/display mount.
- Version
- 6.0.16
- License
- MIT
- Stars
- 0
Use with the tscircuit CLI
tsci is the tscircuit CLI. Install it with npm install -g tscircuit.
tsci clone rushabhcodes/desk-fidget-counter # download the package files into ./desk-fidget-counter
tsci add rushabhcodes/desk-fidget-counter # add it to your project as @tsci/rushabhcodes.desk-fidget-counterIn a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.
firmware/board.h
// SPDX-License-Identifier: MIT
#pragma once
#include <stdbool.h>
#include <stdint.h>
typedef enum { LCD_RESET, LCD_BACKLIGHT, LCD_SELECT, LCD_DATA } LcdSignal;
void board_init(void);
uint32_t board_millis(void);
void board_delay_ms(uint32_t ms);
bool board_button_pressed(void);
void board_peripherals(bool enabled);
uint16_t board_encoder_count(void);
bool board_encoder_ok(void);
void board_idle(bool awake);
bool board_i2c_transfer(uint8_t addr, const uint8_t *write, unsigned wn,
uint8_t *read, unsigned rn);
void board_lcd_setup(void);
void board_lcd_shutdown(void);
void board_lcd_signal(LcdSignal signal, bool high);
bool board_lcd_byte(uint8_t value);
bool board_lcd_finish(void);