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.

lvw

Member Since 26 Feb 2012
Offline Last Active Jan 27 2013 11:29 PM
-----

Topics I've Started

Using both Analog and Digital on same pin

02 December 2012 - 11:20 PM

Hi all,

A little background information;

I'm currently working on a project that uses a Analog/Digital MUX breakout from SparkFun.

The main problem I'm having is that each of these boards have 1 'signal' i/o pin. Since the board can handle both analog and digital signals, I would like to make use of one of the analog pins on the N+.

I tried some short code to switch accordingly between analog and digital, disposing the previous instance of the port before initializing a new one.

After a few times of switching I'm getting 'An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.dll'

I'm properly disposing the port object AFTER I've retrieved the state/value of the input using the Dispose method of the ports. Im suspecting that somewhere along the way, the object isnt disposed properly in code that is out of my reach (in the .NET framework perhaps).

So my main question is,is there any limitation (think speed wise, number of times, or other..) using this method?
Is this possible at all ( I know it works a few times, but is it possible to have this as permanent solution?)

Thanks

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.