New answers tagged


The ADC input has a really high impedance (100 Meg). All you need to do to get a consistent reading (of zero) is to connect it to ground through a suitable resistor. 100K will probably be fine, and you might be able to get away with 1 Meg. It should be at least 10x bigger than your pot to avoid loading it when connected.


The input stage of the analog-to-digital converter is a sample-and-hold capacitor. When you take an analog reading, the capacitor is connected to the input pin, it is charged to the voltage you want to measure, then it is disconnected from the input and it “holds” the voltage while the conversion is in progress. You can leverage this capacitor to detect ...


Take some number of analog readings over some period of time and look at the variation among the samples. Do this both with, and without, a potentiometer connected. You should see very stable readings with it connected, ranging over a few counts or less. Without it connected, the readings are likely to cover nearly the entire range A/D range. A simple way to ...


This will work. No Arrays or difficult stuff about cross blabla. The code is in within 4-5 micros int mic1 = 2;// using leonardo for external interrupts on theese pins. int mic2 = 3; int mic3 = 7; volatile unsigned long tid1 = 0; //Var to store time-stamp in micros in. volatile unsigned long tid2 = 0; volatile unsigned long tid3 = 0; volatile int stop1 = 0;/...

Top 50 recent answers are included