I create a Gadgeteer 4.2 project and connect the FEZ Connect Shield to Cerbuino Bee.
I want to read the value of E-block sensor.
The AnalogInput code in my domino works well,but I don’t know how transfer it to the Cerbuino Bee.
In my domino code
static AnalogIn thermometer;
static AnalogIn lightSensor;
thermometer = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.An2);
thermometer.SetLinearScale(-22, 56);
lightSensor = new AnalogIn((AnalogIn.Pin)FEZ_Pin.AnalogIn.An3);
lightSensor.SetLinearScale(0, 100);
I modify it to Cerbuino Bee:
AnalogIn thermometer;
static AnalogIn lightSensor;
thermometer = new AnalogInput((Cpu.AnalogChannel)GHI.OSHW.Hardware.FEZCerbuino.Pin.AnalogIn.A2);
thermometer.SetLinearScale(-22, 56);
lightSensor = new AnalogInput((Cpu.AnalogChannel)GHI.OSHW.Hardware.FEZCerbuino.Pin.AnalogIn.A3);
lightSensor.SetLinearScale(0, 100);
But VS shows that does not contain the SetLinearScale method.
What class I am missing? or what namespace or reference do I need to add?