believe me, I'm trying my best to help you
. I'll try to explain in detail how it should work.
There are two AnalogIn classes, one of Microsoft (Microsoft.SPOT.Hardware.AnalogInput) and one of SecretLabs (SecretLabs.NETMF.Hardware.AnalogInput). In the last code you gave, you import both of these namespaces, you now can not use AnalogIn without specifying it's full name. Otherwise the compiler does not know which class to use (ambiguous).
I am using the one supplied by Microsoft, for this you only need references to the following:
I made a small program with nothing more than the code as shown below. Just to make sure that there are no conflicts in imports, I used the full names of the classes:
AanalogIn > Microsoft.SPOT.Hardware.AnalogInput
ANALOG_PIN_A0 > SecretLabs.NETMF.Hardware.NetduinoPlus.AnalogChannels.ANALOG_PIN_A0
The AnalogIn class contains the functionality of sampling an analog input. But Microsoft does not know anything about the Netduino Plus. Therefor SecretLabs made a nice little class to map the Netduino's PINs to the ones expected by the AnalogIn class.
Option Explicit On
Option Strict On
Public Module Module1
Dim potMeter As New Microsoft.SPOT.Hardware.AnalogInput(SecretLabs.NETMF.Hardware.NetduinoPlus.AnalogChannels.ANALOG_PIN_A0)
For i As Integer = 1 To 50
Debug.Print("Value: " & potMeter.Read().ToString())
A few lines of the debug output:
O one last thing I can think of, do you have firmware 4.2 on your Netduino? The one's I just bought arrived with firmware 4.1 on it.
Hope this helps!
OK, scratch that about the firmware, you've said that already in your first post
Edited by Kem, 20 September 2012 - 07:13 PM.