Skip to content

Instantly share code, notes, and snippets.

@scott-kloud
Last active August 29, 2015 14:07
Show Gist options
  • Save scott-kloud/2be0b1aedbeaffd5214d to your computer and use it in GitHub Desktop.
Save scott-kloud/2be0b1aedbeaffd5214d 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