18 #define LEVEL_HIGH (30)
21 #define CH0_OFFSET (40 - LEVEL_HIGH/2)
22 #define CH1_OFFSET (CH0_OFFSET + 40 * 1)
23 #define CH2_OFFSET (CH0_OFFSET + 40 * 2)
24 #define CH3_OFFSET (CH0_OFFSET + 40 * 3)
29 static uint8_t ch0_data = LEVEL_LOW;
30 static uint8_t ch1_data = LEVEL_LOW;
31 static uint8_t ch2_data = LEVEL_LOW;
32 static uint8_t ch3_data = LEVEL_LOW;
37 dbSerialPrintln(
"setup done");
42 static uint32_t started = 0;
43 if (millis() - started >= 2000)
46 if (LEVEL_HIGH == ch0_data)
52 ch0_data = LEVEL_HIGH;
56 ch1_data = ch0_data + random(0, 2);
57 ch2_data = ch0_data + random(0, 5);
58 ch3_data = ch0_data + random(0, 8);
60 s0.
addValue(0, CH0_OFFSET + ch0_data);
61 s0.
addValue(1, CH1_OFFSET + ch1_data);
62 s0.
addValue(2, CH2_OFFSET + ch2_data);
63 s0.
addValue(3, CH3_OFFSET + ch3_data);
bool nexInit(void)
Init Nextion.
The header file including all other header files provided by this library.