Stub out OLED changes.

This commit is contained in:
mattbk 2024-01-25 21:14:13 -06:00
parent b2345cf54e
commit 833bf317c7
2 changed files with 24 additions and 0 deletions

View File

@ -15,3 +15,5 @@ framework = arduino
lib_deps =
etherkit/Etherkit Si5351@^2.1.4
paulstoffregen/Encoder@^1.4.4
adafruit/Adafruit GFX Library@^1.11.9
adafruit/Adafruit SSD1306@^2.5.9

View File

@ -11,8 +11,18 @@
#include <Wire.h>
//#include <LiquidCrystal.h>
#include <si5351.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
//----------- OLED ------------------
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
//----------- Variables & Declarations ---------------
/*
* The current and desired LISTENING FREQUENCY, which is not always the frequency being output by the Si5351.
@ -315,6 +325,18 @@ char getPermission(){
}
void setup(){
Serial.begin(9600); // This program won't work unless baud is 9600...why?
// SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println("SSD1306 allocation failed");
for(;;); // Don't proceed, loop forever
}
// Clear the buffer
display.clearDisplay();
display.drawPixel(10, 10, WHITE);
// inialize LCD, display welcome message
//lcd.begin(20, 4);
//delay(250);