Files
libGravity/peripherials.h
Adam Wonak d12764313b Introduce StateManager to persist state between power cycles (#6)
- add reset state menu option to return all settings back to default values.
- add reverse encoder menu option and save state
- make saving to EEPROM safer by wrapping put calls with noInterrupts()
- improve save state behavior by using a mutex flag and update check with debounce in main loop
- refactor gravity.h global const definitions to be static and more readable.
- improve usage of EncoderDir in ISR with pointer to instance and static isr() method.
- reduce u8g2 memory usage by using single page buffer

Reviewed-on: https://git.pinkduck.xyz/adam/libGravity/pulls/6
Co-authored-by: Adam Wonak <adam.wonak@gmail.com>
Co-committed-by: Adam Wonak <adam.wonak@gmail.com>
2025-06-16 02:47:25 +00:00

43 lines
794 B
C

/**
* @file peripherials.h
* @author Adam Wonak (https://github.com/awonak)
* @brief Arduino pin definitions for the Sitka Instruments Gravity module.
* @version 0.1
* @date 2025-04-19
*
* @copyright Copyright (c) 2025
*
*/
#ifndef PERIPHERIALS_H
#define PERIPHERIALS_H
// OLED Display config
#define OLED_ADDRESS 0x3C
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
// Peripheral input pins
#define ENCODER_PIN1 17 // A3
#define ENCODER_PIN2 4
#define ENCODER_SW_PIN 14 // A0
// Clock and CV Inputs
#define EXT_PIN 2
#define CV1_PIN A7
#define CV2_PIN A6
#define PULSE_OUT_PIN 3
// Button pins
#define SHIFT_BTN_PIN 12
#define PLAY_BTN_PIN 5
// Output Pins
#define OUT_CH1 7
#define OUT_CH2 8
#define OUT_CH3 10
#define OUT_CH4 6
#define OUT_CH5 9
#define OUT_CH6 11
#endif