diff --git a/arduino/DeskAttendant/DeskAttendant.ino b/arduino/DeskAttendant/DeskAttendant.ino index 2e6ea8a..d079548 100644 --- a/arduino/DeskAttendant/DeskAttendant.ino +++ b/arduino/DeskAttendant/DeskAttendant.ino @@ -74,7 +74,6 @@ unsigned long turned_on_at = 0L; Button pressers press the momentary switches on the treadmill and the A/V receiver. */ boolean take_action = true; // affect the treadmill, press buttons, and fire relays if true; otherwise just change status LEDs -ButtonPresser receiver_power("RECEIVER POWER", receiver_button_servo_pin, receiver_servo_delay, receiver_servo_starting_angle, receiver_servo_target_angle); /* Treadmill and subclasses let you control a treadmill by turning it on or off. @@ -154,11 +153,6 @@ void status_communication_setup() { rgb_blink(); } -// Initialize the ButtonPresser for the A/V receiver. -void button_presser_setup() { - receiver_power.setup(); -} - // Prepare the fan relay to be controlled by pin fan_relay_pin. void fan_relay_setup() { // this pin can throw the relay that lets power go to the fan @@ -183,7 +177,6 @@ void setup() { // If we're configured to act on changes in walker status, initialize the A/V receiver's button presser // and set up the Treadmill object for use. if (take_action) { - button_presser_setup(); // Prepare the fan relay to be controlled by pin fan_relay_pin. fan_relay_setup(); @@ -299,7 +292,6 @@ void process_status_loop() { Serial.println(on); } if ((*treadmill).set_state(on)) { // this may or may not succeed due to the underlying hardware - receiver_power.toggle_button(); set_fan_relay(on); status = new_status; turned_on_at = millis(); diff --git a/arduino/libraries/SoleF85Treadmill/SoleF85Treadmill.h b/arduino/libraries/SoleF85Treadmill/SoleF85Treadmill.h index 37b491e..edca749 100644 --- a/arduino/libraries/SoleF85Treadmill/SoleF85Treadmill.h +++ b/arduino/libraries/SoleF85Treadmill/SoleF85Treadmill.h @@ -57,13 +57,13 @@ const int STOP_button_servo_pin = 10; const int servo_starting_angle = 0; // the START button's servo moves to this angle and back to servo_starting_angle -const int START_servo_target_angle = 10; +const int START_servo_target_angle = 20; // the STOP button's servo moves to this angle and back to servo_starting_angle -const int STOP_servo_target_angle = 8; +const int STOP_servo_target_angle = 26; // for each degree moved, wait this many ms to ensure that the servo actually reaches the target position -const int ms_per_degree_delay = 12; +const int ms_per_degree_delay = 6; const int START_servo_delay = ms_per_degree_delay * (START_servo_target_angle - servo_starting_angle); const int STOP_servo_delay = ms_per_degree_delay * (STOP_servo_target_angle - servo_starting_angle);