Page 1 of 1

NXC: Dexter pressure sensor

Posted: 14 Nov 2010, 18:22
by HaWe
out of an old nxtasy thread:
NXC: polling the value of the Dexter pressure sensor (70 psi version):

Code: Select all

task main(){
  int val = SensorValue[port];
  pressure = ((val / 1023)  - 0.04) / 0.0018;
}