oled calibrate
This commit is contained in:
parent
e65c347deb
commit
8a0149efca
@ -78,3 +78,34 @@ void oledShowText(const char* line1, const char* line2) {
|
||||
display.println(line2);
|
||||
display.display();
|
||||
}
|
||||
|
||||
// ===== Calibration =====
|
||||
|
||||
void oledShowCalibration() {
|
||||
display.clearDisplay();
|
||||
|
||||
// Заголовок (верхняя строка)
|
||||
display.fillRect(0, 0, SCREEN_WIDTH, 16, SSD1306_WHITE);
|
||||
display.setTextColor(SSD1306_BLACK);
|
||||
display.setCursor(2, 4);
|
||||
display.setTextSize(1);
|
||||
display.println("CALIBRATION");
|
||||
|
||||
// Основная область
|
||||
display.setTextColor(SSD1306_WHITE);
|
||||
display.setCursor(0, 16);
|
||||
display.println("Line 1: y=16");
|
||||
display.setCursor(0, 26);
|
||||
display.println("Line 2: y=26");
|
||||
display.setCursor(0, 36);
|
||||
display.println("Line 3: y=36");
|
||||
display.setCursor(0, 46);
|
||||
display.println("Line 4: y=46");
|
||||
display.setCursor(0, 56);
|
||||
display.println("Line 5: y=56");
|
||||
|
||||
// Границы
|
||||
display.drawRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, SSD1306_WHITE);
|
||||
|
||||
display.display();
|
||||
}
|
||||
|
||||
@ -9,3 +9,6 @@ void oledShowMode(const char* mode);
|
||||
|
||||
// универсально (2 строки)
|
||||
void oledShowText(const char* line1, const char* line2);
|
||||
|
||||
// калибровка
|
||||
void oledShowCalibration();
|
||||
|
||||
@ -16,6 +16,7 @@ void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
oledInit();
|
||||
oledShowCalibration();
|
||||
servoInit();
|
||||
ultrasonicInit();
|
||||
// faceInit();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user