Scientific task box V1
Dependents: Scientific_RTOS Scientific_RTOS
Diff: BOX.h
- Revision:
- 0:01deb85101c9
- Child:
- 2:f8120bb54b69
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BOX.h Mon May 13 13:55:19 2019 +0000 @@ -0,0 +1,37 @@ +#ifndef BOX_H +#define BOX_H + +#include "mbed.h" +#include "HX711.h" +#include "DS18B20.h" + + + +class BOX +{ +public: + BOX (PinName pinCLK_HX711, PinName pinDAT_HX711,PinName pin_temp, PinName pin_cond,int HX711_coefficent); + float get_temp(); //return temperature from DS18B20 + int get_weight(); //return weight in g from hx711 + int get_resistance();//return soil resistance + void tare(unsigned char times=20); //sets tare on HX711 library + + +//virtual ~BOX(); + + + +private: + +PinName _pinCLK; +PinName _pinDAT; +PinName _pintemp; +PinName _pincond; +int _coefficent; +float _tmp; +DS18B20 therm; // Dallas 1-wire +HX711 balance; + +}; + +#endif \ No newline at end of file