// Include LIBS, Identify Oled ,Setup TempSensor
//Temperature
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2
// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
//Oled
#include <Arduino.h>
#include <U8g2lib.h>
#include <Wire.h>
U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* Reset=*/U8X8_PIN_NONE);
#include <HardwareSerial.h>
HardwareSerial UART1(1); // for RX1 TX1 // 27,26
// Define Pinout_Relate
const int ARGBPowerLedPin_IntArray[] = { 25, 33, 32 };
const int RGBIndicatorLedPin_IntArray[] = { 23, 18, 19 };
const int ButtonPin_IntArray[] = { 14, 27, 26 };
const int RelayPin_Int = 13;
//Boolean
bool ON_OFFCurrent_Bool = true;
bool ON_OFFBefore_Bool = false;
bool StateChangedCurrent_Bool= false;
bool StateChangedBefore_Bool= true;
bool DrawSolid_Bool = false;
bool ButtonState_BoolArray[] = { true, true, true };
bool ButtonStateBefore_BoolArray[] = { false, false, false };
String ON_OFF_String;
//Timings_Define
unsigned long RefreshCurrent_UL;
unsigned long RefreshBefore_UL = 0;
int RefreshInterval_Int = 10000;
// Define String Info
String Button_StringArray[] = { "Add Desired ", "Subtract Desired ", " Toggle ON/OFF" };
//Temperature Settings
unsigned long DesiredTemp_UL = 25;
unsigned long Hysteresis_UL = 1.5;
//Float
float tempC;
float CurrentTemp_F;
//State
int State_Int;
oid 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
}