GPS module (GYSFDMAXB) 57600 bps
Dependents: HAPS_GPS_Test_0001
GYSFDMAXB GPSセンサーGYSFDMAXBのライブラリ 57600 bps
手順 [1] シリアルピンを設定 GYSFDMAXB gps(tx_pin, rx_pin); [2] 零点を設定する(NED座標系における零点) gps.Initialize(); [3] 自動的にデータを受信しては更新していくので、適宜メンバ変数を読み込んで使う
Diff: GYSFDMAXB.cpp
- Revision:
- 9:8595608c56ca
- Parent:
- 6:db9f8d2afab7
--- a/GYSFDMAXB.cpp Fri Apr 23 12:34:55 2021 +0000 +++ b/GYSFDMAXB.cpp Fri Apr 23 17:14:46 2021 +0000 @@ -7,7 +7,7 @@ #define M_PI 3.14159265358979f GYSFDMAXB::GYSFDMAXB(PinName tx, PinName rx) - :serial(tx, rx), receive_flag(false), start_index(0), uart_index(0) + :serial(tx, rx, 57600), receive_flag(false), start_index(0), uart_index(0) { for (int i = 0; i < uart_size; i++) { @@ -17,7 +17,6 @@ { uart_start[i] = NULL; } - serial.baud(57600); serial.attach(this, &GYSFDMAXB::Receive, Serial::RxIrq); timer.attach(this, &GYSFDMAXB::Punctuate, 0.1); }