Netduino home hardware projects downloads community

Jump to content


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 16-October 20)


By content type

See this member's

Sort by                Order  

#2319 Analog Input problem

Posted by andrewq2 on 14 September 2010 - 11:52 PM in Netduino 2 (and Netduino 1)

Thank you for explaining now i understand. Time to play with my netduino!



#2317 Analog Input problem

Posted by andrewq2 on 14 September 2010 - 11:23 PM in Netduino 2 (and Netduino 1)

You would need another resister to 3.3Vdc to develop a voltage divider. There is no pull-up in the An-in.

I'm confused would it look like
AREF+3.3v->resistor(what resistance?)->ground?->photo resistor->A0?



#2315 Analog Input problem

Posted by andrewq2 on 14 September 2010 - 11:02 PM in Netduino 2 (and Netduino 1)

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);
            }

        }

    }




home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.