Working with my father (in his lab), He drew up some quick code to get data back from our 100psi pressure sensor.

Sample of the magic parts …

voltkt = voltkt >> 3 'divide by 8 to get average voltage
low led
serout Rs232Out, n2400, [10,13, "Raw count ", #voltkt]
volts = 5*voltkt
serout Rs232Out, n2400, [10,13, "Voltage x 1000 = ", #volts]
if voltkt < 49 then
  psi = 0
  else
    PSI = (13*voltkt) - 667
  endif
serout Rs232Out, n2400, [10,13, "PSI X 100 = ", #PSI]

Leave a Reply

Your email address will not be published.