61 OLED.print(F(
"Init Error"));
64 for (uint8_t i = 0; i < 3; i++) {
78 uint8_t FWmajorVersion, FWminorVersion;
79 uint8_t FWVersion_dotIndex = FWVersion_S.indexOf(
'.');
80 if (FWVersion_dotIndex != -1) {
81 FWmajorVersion = FWVersion_S.substring(0, FWVersion_dotIndex).toInt();
82 FWminorVersion = FWVersion_S.substring(FWVersion_dotIndex + 1).toInt();
83 if (FWmajorVersion < 3 || (FWmajorVersion == 3 && FWminorVersion < 40)) {
86 OLED.print(F(
"Firmware Outdated!"));
88 OLED.print(F(
"-Press UP to Skip-"));
90 for (uint8_t i = 0; i < 3; i++) {
Handling the Lower MCU (STM32) communication.
MatrixMiniR4 MiniR4
The MiniR4 Main Object.
Header file for the MatrixMiniR4 system, integrating various hardware modules such as motors,...
#define MATRIXMINIR4_OLED_ADDRESS
#define SSD1306_WHITE
Draw 'on' pixels.
#define SSD1306_SWITCHCAPVCC
Gen. display voltage from 3.3V.
void setTextSize(uint8_t s)
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger.
void setTextColor(uint16_t c)
Set text font color with transparant background.
void setCursor(int16_t x, int16_t y)
Set text cursor location.
Class that stores state and functions for interacting with SSD1306 OLED displays.
void display(void)
Push data currently in RAM to SSD1306 display.
bool begin(uint8_t switchvcc=SSD1306_SWITCHCAPVCC, uint8_t i2caddr=0, bool reset=true, bool periphBegin=true)
Allocate RAM for image buffer, initialize peripherals and pins.
void clearDisplay(void)
Clear contents of display buffer (set all pixels to off).
RESULT GetFWVersion(String &version)
RESULT Init(uint32_t timeout_ms=1000)
Main class for the MatrixMiniR4 system.
MiniR4RC< 3 > RC3
Port RC3 RC 5V Servo.
MiniR4DC< 1 > M1
Port M1 DC 5V Motor.
MiniR4RC< 4 > RC4
Port RC4 RC 5V Servo.
PS2X PS2
MJ2 or PS2 (4p DAT CMD to D2, 2p CS CLK to D3)
MiniR4DC< 2 > M2
Port M2 DC 5V Motor.
MiniR4LED LED
Built-in RGB LED.
MiniR4RC< 2 > RC2
Port RC2 RC 5V Servo.
MiniR4DC< 4 > M4
Port M4 DC 5V Motor.
MiniR4BTN< 2 > BTN_UP
Up Button.
Adafruit_SSD1306 OLED
Built-in OLED.
bool begin()
Initialize the MatrixMiniR4 system and its components.
MiniR4DC< 3 > M3
Port M3 DC 5V Motor.
MiniR4RC< 1 > RC1
Port RC1 RC 5V Servo.
MiniR4BUZZER Buzzer
Built-in Buzzer.
bool getState(void)
Retrieves the current state of the button.
void Tone(uint16_t frequency, uint32_t duration)
Generates a tone at the specified frequency for a given duration.
void NoTone(void)
Stops the tone on the buzzer.
void begin(uint8_t pin)
Initializes the buzzer by setting the pin number. (Built Buzzer at Uno Pin 6)
bool begin(void)
Initializes the DC motor settings.
bool setColor(uint8_t idx, uint32_t rgb)
Sets the color of the LED.
void begin(uint8_t pin)
Initializes the LED. (Built-in at Uno Pin 7)
bool begin(void)
Initializes the servo with a default angle range.
byte config_gamepad(uint8_t, uint8_t, uint8_t, uint8_t)
Configures the gamepad.