Skip to content

Instantly share code, notes, and snippets.

@scott-kloud
Created October 22, 2014 12:16
Show Gist options
  • Save scott-kloud/d29d124647176d1c40bf to your computer and use it in GitHub Desktop.
Save scott-kloud/d29d124647176d1c40bf to your computer and use it in GitHub Desktop.
public Thermometer(FEZ_Pin.AnalogIn pin, int interval, int min, int max)
{
// Set reading parameters
_interval = interval;
_minScale = min;
_maxScale = max;
// Initialise thermometer sensor
_sensor = new AnalogIn((AnalogIn.Pin)pin);
_sensor.SetLinearScale(_minScale, _maxScale);
// Set sensor id
_sensorId = "An" + pin.ToString() + _sensorType;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment