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.
Fork of ds3_si by
ds3_si.h
00001 /* 00002 n1 n2 n3 n4 n5 n6 00003 d 0 0 d64 - - - - 00004 1 □ ↑ >64 L3→ L3↓ R3→ R3↓ 00005 2 L1 ↓ <64 L3← L3↑ R3← R3↑ 00006 4 L2 → 00007 8 R1 ← 00008 16 R2 △ 00009 32 - × 00010 64 - 〇 00011 */ 00012 00013 #ifndef ds3_si_H 00014 #define ds3_si_H 00015 00016 #include "mbed.h" 00017 #include <iostream> 00018 #include <queue> 00019 00020 #define PI 3.141 00021 #define square 1 00022 #define L1 2 00023 #define L2 4 00024 #define R1 8 00025 #define R2 16 00026 #define up 129 00027 #define down 130 00028 #define right 132 00029 #define left 136 00030 #define triangle 144 00031 #define cross 160 00032 #define circule 192 00033 #define L 1 00034 #define R 2 00035 #define L3x 3 00036 #define L3y 4 00037 #define R3x 5 00038 #define R3y 6 00039 #define NONE_angle 10 00040 class ds3_si 00041 { 00042 private: 00043 Serial serial; 00044 char in[8]; 00045 00046 public: 00047 ds3_si(PinName tx, PinName rx, int baudrate = 2400); 00048 void serialin(); 00049 bool buttonstate(short order); 00050 int analogstate(short order); 00051 int getinputdata(short order); 00052 double getangle(short order); 00053 }; 00054 #endif
Generated on Fri Jul 15 2022 09:53:26 by
1.7.2
