during the study,I meet some problems.I use the following code to debug.But I havent light senor,so i use the voltage division circuit instead of it. There are two questions:
first,shall I change the name like lightSenor into batteryVoltage in the code?
second," Debug.Print(lightSensorReading.ToString());" does it mean dispaly the output to the debug window in C#? Why i dont see the results?
Thanks.
using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.FEZ;
using GHIElectronics.NETMF.Hardware;
namespace MFConsoleApplication1
{
public class Program
{
public static void Main()
{
AnalogIn lightSensor = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.An3);
lightSensor.SetLinearScale(0, 100);
int lightSensorReading = 0;
while (true)
{
lightSensorReading = lightSensor.Read();
Debug.Print(lightSensorReading.ToString());
Thread.Sleep(500);
}
}
}
}