ARDUINO Gear Indicator - Ino
ARDUINO Gear Indicator - Ino
const unsigned char upir_logo [] PROGMEM = { 0xEA, 0x3A, 0xAA, 0x28, 0x6A, 0x1A,
0x26, 0x2A, }; // upir logo
pinMode(A0, INPUT); // set pin A0 as input to read analog voltage from the Hall
Sensor
pinMode(A1, INPUT); // set pin A1 as input to read analog voltage from the Hall
Sensor
pinMode(A2, INPUT); // set pin A2 as input to read analog voltage from the Hall
Sensor
pinMode(A3, INPUT); // set pin A3 as input to read analog voltage from the Hall
Sensor
int hall_0_value = analogRead(A0); // read the analog value on pin A0, value will
be between 0 - 1023
int hall_1_value = analogRead(A1); // read the analog value on pin A1, value will
be between 0 - 1023
int hall_2_value = analogRead(A2); // read the analog value on pin A2, value will
be between 0 - 1023
int hall_3_value = analogRead(A3); // read the analog value on pin A3, value will
be between 0 - 1023
mode = digitalRead(3); // set the screen layout based on the value on pin3: 0 =
debug, 1 = fullscreen images
u8g2.setCursor(0, 20 + 32);
u8g2.print(percentage_value_1);