The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
andrewq2's Content
There have been 3 items by andrewq2
(Search limited from 19-June 23)
I just got my netduino and I'm starting to try to get analog input and I always get 0 when I read my pin(A0). Do you see anything I did wrong?
My setup looks like this
3.3->AREF
A0->Photo Resistor->GND
public class Program
{
public static void Main()
{
// write your code here
InterruptPort tester = new InterruptPort(Pins.GPIO_PIN_A0, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);
tester.Dispose();
AnalogInput apin0 = new AnalogInput(Pins.GPIO_PIN_A0);
apin0.SetRange(0, 100);
int test = 0;
while (true)
{
Thread.Sleep(250);
test = apin0.Read();
Debug.Print("Test: " + test);
}
}
}