Orefatoi
/
afero_poc15_171201
POC1.5 prototype 2 x color sensor 2 x LM75B 3 x AnalogIn 1 x accel
Embed:
(wiki syntax)
Show/hide line numbers
edge_accel.h
00001 #ifndef _EDGE_ACCEL_H_ 00002 #define _EDGE_ACCEL_H_ 00003 #include "mbed.h" 00004 #include "edge_sensor.h" 00005 #include "MMA8451Q.h" 00006 00007 class edge_accel : public edge_sensor { 00008 public: 00009 edge_accel(MMA8451Q *accel) ; 00010 ~edge_accel(void) ; 00011 virtual void reset(void) ; 00012 virtual void prepare(void) ; 00013 virtual void sample(void) ; 00014 virtual int deliver(void) ; 00015 virtual void send_config(void) ; /* send config data to cloud */ 00016 virtual void recv_config(void) ; /* receive config data from cloud */ 00017 00018 int accum(void) ; 00019 void clear_value(void) ; 00020 float get_value(void) ; 00021 00022 private: 00023 MMA8451Q *_accel ; 00024 int32_t _sample_count ; 00025 int32_t _accumulation ; 00026 int16_t _prev_x ; 00027 int16_t _prev_y ; 00028 int16_t _prev_z ; 00029 } ; 00030 00031 #endif /* _EDGE_ACCEL_H_ */
Generated on Tue Jul 12 2022 21:13:41 by 1.7.2