Scientific task box V1
Dependents: Scientific_RTOS Scientific_RTOS
BOX.h
- Committer:
- Alessio_Zaino
- Date:
- 2019-06-10
- Revision:
- 2:f8120bb54b69
- Parent:
- 0:01deb85101c9
- Child:
- 3:442e7d2ab496
File content as of revision 2:f8120bb54b69:
#ifndef BOX_H #define BOX_H #include "mbed.h" #include "HX711.h" #include "DS1820.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 void initialize(); virtual ~BOX(); private: PinName _pinCLK; PinName _pinDAT; PinName _pintemp; PinName _pincond; int _coefficent; float _tmp; DS1820 ds1820; // Dallas 1-wire HX711 balance; bool check; }; #endif