“GPS.lastNMEA()”的版本间的差异
Machine1987(讨论 | 贡献) (创建页面,内容为“<pre style="color:green"> Microduino_GPS.lastNMEA() </pre> *'''作用''':<br> 获取最近收到的一组NMEA数据 *'''参数''':无<br> *'''返回值''':最近...”) |
Machine1987(讨论 | 贡献) |
||
| 第35行: | 第35行: | ||
*[[GPS.available()|available()]] | *[[GPS.available()|available()]] | ||
*[[GPS.data|各项数据]] | *[[GPS.data|各项数据]] | ||
| + | *[[GPS.read()|read()]] | ||
| + | *[[GPS.newNMEAreceived()|newNMEAreceived()]] | ||
| + | *[[GPS.parse()|parse()]] | ||
<br> | <br> | ||
[[https://wiki.microduino.cn/index.php/GPS_Reference 返回GPS库语法手册]] | [[https://wiki.microduino.cn/index.php/GPS_Reference 返回GPS库语法手册]] | ||
2017年7月28日 (五) 07:44的版本
Microduino_GPS.lastNMEA()
- 作用:
获取最近收到的一组NMEA数据
- 参数:无
- 返回值:最近收到的一组NMEA数据
- 例子:这里以硬串口通讯为例
#include <Microduino_GPS.h>
Microduino_GPS GPS(&Serial1);
void setup(){
GPS.begin(38400);
Serial.begin(9600);
}
void loop(){
char c = GPS.read();
if (GPS.newNMEAreceived()) {
Serial.println(GPS.lastNMEA());
}
}
其他