/*
ESP32 128x64 OLED Write Text Example
http:://www.electronicwings.com
*/
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "PropellerRight.h"
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
#define Oilpressure 15 // Olitryk maler
String OilPressure_read = "Oil pressure OK";
#define EngineTemperature 16 //Engine temperaure switch
String EngineTemperature_read = "Engine Temperature OK";
#define VoltAnalogInput 35 //Volt input analog
float volt_calculation = 0.0;
float volt_real = 0.0;
float R1 = 30000.0; //30k
float R2 = 8300.0; //7500 ohm resistor, I tweaked this 8300
int Value_Volt_read = 0; //Volt calculation because V_input has to be below 3.3v
int propeller_RPM = 10;
#define GearInForward 32
#define GearInBackward 33
// 'alarm', 128x64px https://javl.github.io/image2cpp/
const unsigned char epd_bitmap_alarm [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x1f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xe0, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x07, 0xff, 0xff,
0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0x00, 0x01, 0xff, 0xff,
0xff, 0xfe, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x7f, 0xff,
0xff, 0xf8, 0x00, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x1f, 0xff,
0xff, 0xe0, 0x01, 0xff, 0xf8, 0x03, 0xff, 0x80, 0x01, 0xff, 0xc0, 0x1f, 0xff, 0x80, 0x07, 0xff,
0xff, 0xc0, 0x07, 0xff, 0xc0, 0x01, 0xff, 0x80, 0x01, 0xff, 0x80, 0x03, 0xff, 0xe0, 0x03, 0xff,
0xff, 0x00, 0x1f, 0xfe, 0x00, 0x01, 0xff, 0x80, 0x01, 0xff, 0x80, 0x00, 0x7f, 0xf8, 0x00, 0xff,
0xfe, 0x00, 0x7f, 0xf8, 0x00, 0x07, 0xff, 0x80, 0x01, 0xff, 0xe0, 0x00, 0x1f, 0xfe, 0x00, 0x7f,
0xfc, 0x00, 0xff, 0xe0, 0x00, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0x00, 0x07, 0xff, 0x00, 0x3f,
0xf8, 0x01, 0xff, 0x80, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x01, 0xff, 0x80, 0x1f,
0xf0, 0x03, 0xfe, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x7f, 0xc0, 0x0f,
0xe0, 0x07, 0xfc, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x3f, 0xe0, 0x07,
0xe0, 0x0f, 0xf8, 0x01, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x80, 0x1f, 0xf0, 0x07,
0xc0, 0x1f, 0xf0, 0x03, 0xff, 0xc0, 0x00, 0xff, 0xff, 0x00, 0x03, 0xff, 0xc0, 0x0f, 0xf8, 0x03,
0x80, 0x3f, 0xe0, 0x07, 0xff, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0xff, 0xe0, 0x07, 0xfc, 0x01,
0x80, 0x3f, 0xe0, 0x0f, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xfc, 0x00, 0x7f, 0xf0, 0x07, 0xfc, 0x01,
0x80, 0x7f, 0xc0, 0x1f, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x3f, 0xf8, 0x03, 0xfe, 0x01,
0x00, 0x7f, 0xc0, 0x1f, 0xf8, 0x03, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xf8, 0x03, 0xfe, 0x00,
0x00, 0x7f, 0xc0, 0x3f, 0xf0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x0f, 0xfc, 0x03, 0xfe, 0x00,
0x00, 0x7f, 0x80, 0x3f, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xfc, 0x01, 0xfe, 0x00,
0x00, 0x7f, 0x80, 0x3f, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xfc, 0x01, 0xfe, 0x00,
0x00, 0x7f, 0x80, 0x3f, 0xe0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xfc, 0x01, 0xfe, 0x00,
0x00, 0x7f, 0xc0, 0x3f, 0xe0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xfc, 0x03, 0xfe, 0x00,
0x00, 0x7f, 0xc0, 0x1f, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xf8, 0x03, 0xfe, 0x00,
0x80, 0x7f, 0xc0, 0x1f, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xf8, 0x03, 0xfe, 0x01,
0x80, 0x3f, 0xe0, 0x0f, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xf0, 0x07, 0xfc, 0x01,
0xc0, 0x3f, 0xf0, 0x1f, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x07, 0xf8, 0x0f, 0xfc, 0x03,
0xc0, 0x1f, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x03, 0xff, 0xff, 0xf8, 0x03,
0xe0, 0x1f, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x03, 0xff, 0xff, 0xf8, 0x07,
0xf0, 0x3f, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x03, 0xff, 0xff, 0xfc, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x03, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xfe, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x7f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xfc, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x7f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xe0, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x07, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x80, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x01, 0xff, 0xff, 0xff,
0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xf8, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x1f, 0xff, 0xff,
0xff, 0xff, 0xf8, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xff, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff,
0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x3f, 0xfc, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x1f, 0xf8, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0x80, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int epd_bitmap_allArray_LEN = 1;
const unsigned char* epd_bitmap_allArray[1] = {
epd_bitmap_alarm
};
// 'Temperature', 128x64px
const unsigned char epd_bitmap_Temperature [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfb, 0xdf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe3, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe8, 0x17, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xa0, 0x05, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x80, 0x01, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x80, 0x01, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xd8, 0x1b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int epd_bitmap_allArray_LEN1 = 1;
const unsigned char* epd_bitmap_allArray1[1] = {
epd_bitmap_Temperature
};
// 'OilPressure1', 128x64px
const unsigned char epd_bitmap_OilPressure1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xe0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xc0, 0x03, 0xff, 0xfe, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xc2, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x83, 0x80, 0x3f, 0xfe, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff,
0xff, 0x07, 0xe0, 0x07, 0xfe, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x07, 0xff,
0xff, 0x0f, 0xf8, 0x01, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x07, 0xff,
0xfe, 0x0f, 0xfe, 0x00, 0x7f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x03, 0xff,
0xfc, 0x1f, 0xff, 0xc0, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x43, 0xff,
0xfc, 0x3f, 0xff, 0xf0, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0xc3, 0xff,
0xf8, 0x3f, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x01, 0xe1, 0xff,
0xf0, 0x7f, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x03, 0xe1, 0xff,
0xf0, 0x7f, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x07, 0xe1, 0xff,
0xe0, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x02, 0x0f, 0xe0, 0xff,
0xc1, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x0e, 0x0f, 0xf0, 0xff,
0xc1, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x7c, 0x1f, 0xff, 0xff,
0x80, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf8, 0x01, 0xf8, 0x3f, 0xff, 0xff,
0x80, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x07, 0xf0, 0x7f, 0xff, 0xff,
0xc0, 0x07, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x3f, 0xf0, 0x7f, 0xfb, 0xff,
0xf8, 0x01, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0xff, 0xe0, 0xff, 0xfb, 0xff,
0xfe, 0x00, 0x3f, 0xfc, 0x3f, 0xff, 0xff, 0xfe, 0x0f, 0xf0, 0x03, 0xff, 0xc1, 0xff, 0xf9, 0xff,
0xff, 0xc0, 0x07, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0x07, 0xc0, 0x0f, 0xff, 0x83, 0xff, 0xf1, 0xff,
0xff, 0xf0, 0x01, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0x82, 0x00, 0x7f, 0xff, 0x83, 0xff, 0xf1, 0xff,
0xff, 0xfe, 0x00, 0x38, 0x3f, 0xff, 0xff, 0xff, 0xc0, 0x01, 0xff, 0xff, 0x07, 0xff, 0xf1, 0xff,
0xff, 0xff, 0x80, 0x08, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0x07, 0xff, 0xfe, 0x0f, 0xff, 0xe0, 0xff,
0xff, 0xff, 0xf0, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xe0, 0x3f, 0xff, 0xfc, 0x1f, 0xff, 0xe0, 0xff,
0xff, 0xff, 0xfc, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xf0, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xe0, 0x7f,
0xff, 0xff, 0xff, 0x80, 0x3f, 0xff, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xc0, 0x7f,
0xff, 0xff, 0xff, 0xf0, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0x80, 0x3f,
0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0x84, 0x1f,
0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0x04, 0x1f,
0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xfe, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xfc, 0x1f, 0x07,
0xff, 0xff, 0xff, 0xfc, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0xf8, 0x1f, 0x83,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0xff, 0xf8, 0x3f, 0x81,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x0f, 0xff, 0xf0, 0x7f, 0xc1,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x1f, 0xff, 0xf0, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x3f, 0xff, 0xe0, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xe1, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x7f, 0xff, 0xe1, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xe1, 0xff, 0xf0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xf0, 0xff, 0xe0,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xf0, 0x7f, 0xc1,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xf0, 0x1f, 0x01,
0xff, 0xff, 0xff, 0xf8, 0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xf8, 0x00, 0x03,
0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xfc, 0x00, 0x07,
0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0x00, 0x0f,
0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xe0, 0x7f,
0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1040)
const int epd_bitmap_allArray_LEN2 = 1;
const unsigned char* epd_bitmap_allArray2[1] = {
epd_bitmap_OilPressure1
};
void setup() {
pinMode(Oilpressure, INPUT_PULLUP);
pinMode(EngineTemperature, INPUT_PULLUP);
pinMode(VoltAnalogInput, INPUT);
pinMode(GearInForward, INPUT_PULLUP);
pinMode(GearInBackward, INPUT_PULLUP);
Serial.begin(9600);
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;); // Don't proceed, loop forever
}
delay(2000); // Pause for 2 seconds
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE);// Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("Hello, world!"));
display.setCursor(0,15);
display.println(F("OilPressure_read"));
display.setCursor(0,30);
display.println(F("Engine Temp_read"));
display.setCursor(0,45);
display.println(F("Voltage_read"));
display.display();
delay(2000);
}
void loop() {
int Oilp=digitalRead(Oilpressure);
if (Oilp==LOW){
OilPressure_read = "Oilpressure Low";
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_OilPressure1,128,64, WHITE);
display.display();
tone(18,262,1000);
delay(2000);
}
else OilPressure_read = "Oilpressure ok";
int EngineT=digitalRead(EngineTemperature);
if (EngineT==LOW){
EngineTemperature_read = "EngineTemp High";
//epd_bitmap_Temperature
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_Temperature,128,64, WHITE);
display.display();
tone(18,150,1000);
delay(2000);
}
else EngineTemperature_read = "EngineTemperature ok";
int GearInForwardRead= digitalRead(GearInForward);
if (GearInForwardRead ==HIGH){
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop0propeller1_turning0,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop10propeller1_turning10,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop20propeller1_turning20,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop30propeller1_turning30,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop40propeller1_turning40,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop50propeller1_turning50,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop60propeller1_turning60,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop70propeller1_turning70,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop80propeller1_turning80,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop90propeller1_turning90,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop100propeller1_turning100,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop110propeller1_turning110,128,64, WHITE);
display.display();
delay(propeller_RPM);
/*
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop0propeller1_turning0,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop10propeller1_turning10,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop20propeller1_turning20,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop30propeller1_turning30,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop40propeller1_turning40,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop50propeller1_turning50,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop60propeller1_turning60,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop70propeller1_turning70,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop80propeller1_turning80,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop90propeller1_turning90,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop100propeller1_turning100,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop110propeller1_turning110,128,64, WHITE);
display.display();
delay(propeller_RPM);
*/
}
int GearInBackwardRead= digitalRead(GearInBackward);
if (GearInBackwardRead ==LOW){
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop110propeller1_turning110,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop100propeller1_turning100,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop90propeller1_turning90,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop80propeller1_turning80,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop70propeller1_turning70,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop60propeller1_turning60,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop50propeller1_turning50,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop40propeller1_turning40,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop30propeller1_turning30,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop20propeller1_turning20,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop10propeller1_turning10,128,64, WHITE);
display.display();
delay(propeller_RPM);
display.clearDisplay();
display.drawBitmap(0,0,epd_bitmap_prop0propeller1_turning0,128,64, WHITE);
display.display();
delay(propeller_RPM);
}
Value_Volt_read = analogRead(VoltAnalogInput);
volt_calculation = (Value_Volt_read*5)/1024;
volt_real = volt_calculation/ (R2/(R1+R2));
//float volt_calculation = 0.0;
//float volt_real = 0.0;
/*
delay(2000); // Pause for 2 seconds
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE);// Draw white text
display.setCursor(0,0); // Start at top-left corner
display.println(F("Volvo Penta MD22"));
display.setCursor(0,15);
display.println(OilPressure_read);
display.setCursor(0,30);
display.println(EngineTemperature_read);
display.setCursor(0,45);
display.println(F("Voltage= "));
display.setCursor(52,45);
display.println(volt_real);
display.setCursor(84,45);
display.println(F("Volt"));
display.display();
delay(2000);
*/
}
/*
Check at motor kører
Hvis motor kører og ikke i gear->alarm
//void setup() {
// put your setup code here, to run once:
// Serial.begin(115200);
// Serial.println("Hello, ESP32!");
//}
//void loop() {
// put your main code here, to run repeatedly:
//delay(10); // this speeds up the simulation
//}