Awesome, thanks for the help! I got it all working now using the new firmware. Here's the code that I used in case someone else has the same problem:
using System.Net;using System.Net.Sockets;using System.Threading;using Microsoft.SPOT;using Microsoft.SPOT.Hardware;using SecretLabs.NETMF.Hardware;using SecretLabs.NETMF.Hardware.Netduino;//Make sure to add the 4.2.2 assemblies to your references if you're not on the 4.2.2 sdk.namespace Light_Pot{ public class Program { public static void Main() { // write your code here OutputPort led = new OutputPort(Pins.ONBOARD_LED, false); SecretLabs.NETMF.Hardware.AnalogInput pot = new SecretLabs.NETMF.Hardware.AnalogInput(Pins.GPIO_PIN_A0); pot.SetRange(100, 250); int potValue = 0; while (true) { potValue = pot.Read(); //read the value of the potentiometer //blink the led based on the potentiometer's value led.Write(true); Thread.Sleep(potValue); led.Write(false); Thread.Sleep(potValue); } } }}
- Dan Olson likes this