Are all pins capable of adc?
no, please see brochure for the analog pins. Of course I do not know which product your talking about.
g120…i think i found out…is see there are pins AD1-AD7 which are the ADC pins
Looking at the analog input example i should be able to use lightSensor.SetLinearScale(0, 100); but it is not recognised
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
namespace change_this_to_your_namespace
{
public class Program
{
public static void Main()
{
AnalogInput lightSensor = new AnalogInput((Cpu.AnalogChannel)Cpu.AnalogChannel.ANALOG_7);
double lightSensorReading = 0;
while (true)
{
lightSensor.SetLinearScale(0, 100); //method not recognised
lightSensorReading = lightSensor.Read();
Debug.Print(lightSensorReading.ToString());
Thread.Sleep(500);
}
}
}
}
That is an old 4.1 API
Check this thread:
https://www.ghielectronics.com/community/forum/topic?id=12902