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.
Dependents: ActiveCaster_ ActiveCaster_2
Diff: LpmsMe1Peach.h
- Revision:
- 0:5e4f1e288e2a
diff -r 000000000000 -r 5e4f1e288e2a LpmsMe1Peach.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/LpmsMe1Peach.h Mon Jan 24 03:12:54 2022 +0000
@@ -0,0 +1,31 @@
+#ifndef LPMS_ME1_h
+#define LPMS_ME1_h
+
+#include "mbed.h"
+//#include <Arduino.h>
+//#include "RZ_A1H.h"
+
+class LpmsMe1{
+public:
+ LpmsMe1(Serial*);
+ void goto_command_mode();
+ void set_transmit_data();
+ void set_filter_mode();
+ void set_offset();
+ void reset_orientation_offset();
+ void get_sensor_data();
+ float get_z_angle();
+ int recv_proc(int);
+ int init();
+
+private:
+ Serial* serial;
+ unsigned char buffer[25];
+ float anglex, angley, anglez;
+ float pre_rawanglex, pre_rawangley, pre_rawanglez;
+ bool init_ignore;
+ bool init_done; // 初期化が終わったかどうか
+};
+
+#endif
+