Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem WIZnetInterface mbed
readsensor.h
00001 /* 00002 * readsensor.h 00003 * 00004 * 00005 */ 00006 00007 #ifndef READSENSOR_H 00008 #define READSENSOR_H 00009 00010 #include "mbed.h" 00011 #include <stdint.h> 00012 00013 #include "readsensor.h" 00014 00015 class ReadSensor { 00016 00017 public: 00018 ReadSensor(PinName pin); 00019 ~ReadSensor(); 00020 00021 /** Create sensor object 00022 * 00023 */ 00024 00025 // virtual int sensor_initialize(); 00026 // virtual int sensor_status(); 00027 // virtual int sensor_read(uint8_t * buffer, uint64_t block_number); 00028 int readData(); 00029 int readPower(); 00030 00031 private: 00032 time_t _lastReadTime; 00033 float _lastTemperature; 00034 float _lastHumidity; 00035 00036 PinName _pin; 00037 bool _firsttime; 00038 00039 00040 int initialise_sensor(); 00041 00042 int _read(uint8_t * buffer, uint32_t length); 00043 00044 00045 // DigitalOut _cs; 00046 }; 00047 00048 #endif
Generated on Wed Jul 20 2022 07:39:25 by
1.7.2