diff --git a/firmware/main.c b/firmware/main.c index e1d4df8..1af7e2e 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -31,6 +31,10 @@ /* variables */ volatile uint8_t state_portD; // the state of port D +volatile bool scale_on = false; // is the scale on (based on the SCALE_ON PIN) +volatile bool pwm_high = false; // is the PWM for the last weight measurement high +volatile bool measurement_flag = false; // is a PWM measurement value ready +volatile uint16_t measurement_value = 0; // the PWM measurement value from the timer /* switch off LED */ void led_off(void) @@ -57,8 +61,10 @@ ISR(PCINT2_vect) { if ((state_portD&(1<