#garfield Logs

Mar 18 2023

#garfield Calendar

11:16 PM rue_shop4: so I'm havin some fun
11:26 PM rue_shop4: using some DIY IR range sensors
11:26 PM rue_shop4: on either side of a ring, thats on a motorized track
11:26 PM rue_shop4: the idea is you can put your hand in it, and it keeps the ring centered on your hand
11:26 PM rue_shop4: I have an error in my ADC code tho...
11:26 PM rue_shop4: oh wait, maybe not
11:26 PM rue_shop4: yep, user error
11:26 PM rue_shop4: its working fine
11:32 PM rue_shop4: aha!
11:32 PM rue_shop4: its reading the same damn sensor
11:33 PM rue_shop4: } else if (!countdown) { LEDOn(); countdown = rate; ADMUX = ( 2 << MUX0 ); // reset count, LED ON
11:33 PM rue_shop4: } else if (countdown == ((rate*2)/3)+1) { level1L = ADC; ADMUX = ( 3 << MUX0 );
11:33 PM rue_shop4: } else if (countdown == ((rate*2)/3)) { level2L = ADC;
11:33 PM rue_shop4: } else if (countdown == (rate/2)) { LEDOff(); ADMUX = ( 2 << MUX0 ); // LED OFF
11:33 PM rue_shop4: } else if (countdown == (rate/3)+1) { level1H = ADC; ADMUX = ( 3 << MUX0 );
11:42 PM rue_shop4: adc wont switch channels
11:45 PM rue_shop4: ADATE
11:47 PM rue_shop4: aha!