Oopic Temperature Sensor and Omath object

13 views
Skip to first unread message

Paul Edney

unread,
Mar 28, 2014, 7:42:01 AM3/28/14
to oopic...@googlegroups.com
Hi, 

I want to measure temperature and have the value converted to a celsius value

Firstly, Ive created a simple circuit with a temperature sensor and input using oA2D and getting a value of 150 (actual temp is 23 celsius) so I want to use a simple offset of -127 to get the Celsius value (getting an actual value using Integers seemed too complicated) and I only want to measure approx temperature in a greenhouse so the offset calculation seemed much simpler.

I can get an updated oByte value of degress = tempvalue - 127 if I use some procedural code using While/End but I want to use a vc object instead so I looked to oMath to do this with Input1 from the oA2D value with a mode 1 cvsubtract value of 127 but I'm getting wildly fluctuating values on the Omath Output and Im really at a loss. 

Can anyone help?
I can email/post the code if required

Thanks

Paul

Reply all
Reply to author
Forward
0 new messages