From c64a31a32f1d60100821f563fcabfc334ffd9e90 Mon Sep 17 00:00:00 2001 From: AKautz Date: Mon, 18 Mar 2019 15:13:24 -0400 Subject: [PATCH] blink running LEDs --- HexapodCodeV4/c_loop.ino | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/HexapodCodeV4/c_loop.ino b/HexapodCodeV4/c_loop.ino index f3562d7..77ca1b3 100644 --- a/HexapodCodeV4/c_loop.ino +++ b/HexapodCodeV4/c_loop.ino @@ -71,12 +71,9 @@ void loop() { #endif //Blink the running LED - if(time_1%500<150){ - digitalWrite(LED_RUNNING,HIGH); - } - else{ - digitalWrite(LED_RUNNING,LOW); - } + uint8_t led_state= abs((time_1%510)-255); + analogWrite(LED_RUNNING,led_state); + analogWrite(LED_RGB_BLU,led_state); //Handle error LED patterns if(error_state & B00000001){//DXL Error