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.

Bill's Content

There have been 3 items by Bill (Search limited from 28-April 23)


By content type

See this member's

Sort by                Order  

#3428 Problem with Analog input on Shield

Posted by Bill on 03 October 2010 - 10:55 PM in Netduino 2 (and Netduino 1)

Yep, they had them at radio shack and now everything is working great. Thanks again for all the help!



#3415 Problem with Analog input on Shield

Posted by Bill on 03 October 2010 - 04:17 PM in Netduino 2 (and Netduino 1)

Thanks for your post. I don't suppose you have a link to an example of wires with a spring loaded hook? Something to go off of when I wander around the local hardware store/radio shack? As to testing the output of the shield, should I just use a multimeter on the shields connector pins and see what it reads? Thanks again for the info!



#3411 Problem with Analog input on Shield

Posted by Bill on 03 October 2010 - 02:24 PM in Netduino 2 (and Netduino 1)

I just recently purchased my netduino, and being fairly new to electronics purchased this starter kit for it. Using the shield included I've managed to hook up the LCD and digital add-ons and use them just fine. Currently I have a program that just displays the various inputs to the LCD. This works fine for the digital and serial ports, but I can't get a proper value form the analog ports.

When I read from the analog ports I always get 1023 as an output. Sometimes the value will flicker briefly but it is always less than a second and goes right back to 1023. I've tried the angle sensor, light sensor, and thermistor and no matter which analog port I use I always have an output of 1023.

Searching this board and the internet I saw that a common problem was cross wiring the AREF to the in use voltage, but given that this shield chassis uses all pins I don't really know what to try. Additionally, using analog ports 2-5 on the shield gives the output of 1023, but using the analog port 1 gives a runtime error while debugging. Here is an example of the code, currently using analog 5. If I change it to 0 or 1 I get a run time error. I guess I'm not really sure how the pins 0-5 are mapped to 1-5.

            AnalogInput tempSensor = new AnalogInput(Pins.GPIO_PIN_A5);

            // set up the LCD's number of columns and rows: 
            lcd.Begin(16, 2);

            // Print a message to the LCD.
            lcd.Write("Input:");

            while (true)
            {
                // set the cursor to column 0, line 1
                lcd.SetCursorPosition(0, 1);
                
                // print the number of seconds since reset:
                lcd.Write(tempSensor.Read().ToString());

                Thread.Sleep(100);
            }

I'm sure it's probably some newbie error, so I appreciate any help or suggestions anyone has to offer, hopefully I'm not making a glaring RTM mistake.




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.