25 #include <Adafruit_SSD1306.h>
32 Adafruit_SSD1306 display(128, 32, &Wire, -1);
39 display.clearDisplay();
56 return digitalRead(button) == LOW;
69 Wire.write((
int)(addr >> 8));
70 Wire.write((
int)(addr & 0xFF));
73 Wire.endTransmission();
80 Wire.write((
int)(addr >> 8));
81 Wire.write((
int)(addr & 0xFF));
83 Wire.endTransmission();
94 return Wire.endTransmission(
The PortaMob Arduino Shield Library.
#define PORTAMOB_KEY_5
Digital pin number for button 5.
#define PORTAMOB_KEY_6
Digital pin number for button 6.
#define PORTAMOB_KEY_2
Digital pin number for button 2.
#define PORTAMOB_KEY_1
Digital pin number for button 1.
#define PORTAMOB_KEY_9
Digital pin number for button 9.
#define PORTAMOB_EEPROM_ADDR
EEPROM I2C address.
#define PORTAMOB_KEY_8
Digital pin number for button 8.
#define PORTAMOB_KEY_3
Digital pin number for button 3.
#define PORTAMOB_KEY_7
Digital pin number for button 7.
#define PORTAMOB_SCREEN_ADDRESS
OLED screen I2C address.
#define PORTAMOB_KEY_4
Digital pin number for button 4.
static void init_i2c()
Initializes the I2C communication.
static Adafruit_SSD1306 portamob_display(void(*on_error)())
Initializes the PortaMob display.
static void init_buttons(void)
Initializes the push buttons on the PortaMob Shield.
static bool is_button_pressed(uint8_t button)
Checks if a specific button is pressed.
static void eeprom_write(uint8_t addr, uint8_t value)
Writes a value to the EEPROM memory.
static bool has_eeprom()
Checks if the EEPROM memory is present.
static uint8_t eeprom_read(uint8_t addr)
Reads a value from the EEPROM memory.