I cannot seem to get my very simple netduino program to write to the debug console; VS throws an error
The name 'Console' does not exist in the current context
Any ideas what might cause it to not exist?
using System;
using System.Text;
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.NetduinoPlus;
namespace LumenReader
{
public class Program
{
public static void Main()
{
AnalogInput photoResistor = new AnalogInput(Pins.GPIO_PIN_A0);
int photoVolt;
while (true)
{
photoVolt = photoResistor.Read();
Console.WriteLine(photoVolt);
}
}
}
}
Debug.Print
does work
There is no Console on embedded devices. Hence, as you found, you must use Debug.Print.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With