Kobayashi Akihiro / ActiveCaster

Dependents:   ActiveCaster_ ActiveCaster_2

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LpmsMe1Peach.h Source File

LpmsMe1Peach.h

00001 #ifndef LPMS_ME1_h
00002 #define LPMS_ME1_h
00003 
00004 #include "mbed.h"
00005 //#include <Arduino.h>
00006 //#include "RZ_A1H.h"
00007 
00008 class LpmsMe1{
00009 public:
00010     LpmsMe1(Serial*);
00011     void goto_command_mode();
00012     void set_transmit_data();
00013     void set_filter_mode();
00014     void set_offset();
00015     void reset_orientation_offset();
00016     void get_sensor_data();
00017     float get_z_angle();  
00018     int recv_proc(int);
00019     int init();
00020 
00021 private:
00022     Serial* serial;
00023     unsigned char buffer[25];
00024     float anglex, angley, anglez;
00025     float pre_rawanglex, pre_rawangley, pre_rawanglez;
00026     bool init_ignore;
00027     bool init_done; // 初期化が終わったかどうか
00028 };
00029 
00030 #endif
00031