Hi,
I'm new to Netduino 2, I want to make a temperature control with VB and TMP36.
So I downloaded the toolbox. "NET Micro Framework Toolbox v0.2" and I'm trying the demo program. When starting it gives me an error saying: "unhandled type 'System.ArgumentException' in Microsoft.SPOT.Hardware.dll Exception" .
We are currently working with microsoft visual studio 2010 professional because we have a license, so I downloaded the following:
2.NET Micro Framework SDK v4.2
3. Netduino SDK v4.2.2.0 (32-bit)
here I leave the code I'm using:
Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports SecretLabs.NETMF.Hardware
Imports SecretLabs.NETMF.Hardware.Netduino
Imports Toolbox.NETMF.Hardware
Module Module1
Sub Main()
' The Tmp36-sensor is connected to analog pin 4
Dim TemperatureSensor As Tmp36 = New Tmp36(New Netduino.ADC(Pins.GPIO_PIN_A4))
Do
Dim celcius As Double = TemperatureSensor.Temperature
Dim kelvin As Double = celcius + 273.15
Dim fahrenheit As Double = (celcius * 1.8) + 32.0
Debug.Print("Current temperature: " + celcius.ToString() + " celcius / " + kelvin.ToString() + " kelvin / " + fahrenheit.ToString() + " fahrenheit")
Thread.Sleep(1000)
Loop
End Sub
End Module