本來以為蠻熟得, 結果還是弄了很久
https://gary-dalton.github.io/RaspberryPi-projects/rpi3_gps.html
https://learn.adafruit.com/adafruit-ultimate-gps-on-the-raspberry-pi
https://www.raspberrypi.org/forums/viewtopic.php?t=172893&p=1105715
2017年6月7日 星期三
[JavaScript] Google Map API
趕快惡補一下, 在地圖上標示幾個點
https://wrightshq.com/playground/placing-multiple-markers-on-a-google-map-using-api-3/
要顯示在 google map
google.com/maps/?q=,
google.com/maps/?q=-15.623037,18.388672
https://wrightshq.com/playground/placing-multiple-markers-on-a-google-map-using-api-3/
要顯示在 google map
google.com/maps/?q=
google.com/maps/?q=-15.623037,18.388672
[RPi] 解決 GlobalStat BU-353-S4 亂碼問題
在 FAQ 裡寫得很清楚:
37Q) I am seeing strange characters being outputed on GPSInfo & the red LED isn't on. How can I fix this?
37A) Please follow these steps:
1. Download and install this software: http://www.usglobalsat.com/store/downloads/SiRFDemo387.zip
2. Run the Sirf Demo software.
3. Connect your device, choose the correct COM port, and select the 4800 baud rate.
4. Go to Action > Open Data Source.
5. Next, go to Action > Synchronize Protocol & baud rate.
6. Then, go to Action > Switch to NMEA Protocol.
7. In the pop-up window, select the 4800 baud rate under the Baud Rate and click Send.
8. Close the Sirf Demo software.
測試程式
如果在執行 cgps -s 以後, 再執行測試程式以後可能會變成亂碼, 一個方法就是透過上面的 GPSInfo 修改, 另一個方法就是透過指令列修改
順帶一提, 這邊有不錯的範例程式
https://www.raspberrypi.org/forums/viewtopic.php?t=172893&p=1105715
reference:
* https://askubuntu.com/questions/30569/how-to-use-gps-receiver-bu-353
37Q) I am seeing strange characters being outputed on GPSInfo & the red LED isn't on. How can I fix this?
37A) Please follow these steps:
1. Download and install this software: http://www.usglobalsat.com/store/downloads/SiRFDemo387.zip
2. Run the Sirf Demo software.
3. Connect your device, choose the correct COM port, and select the 4800 baud rate.
4. Go to Action > Open Data Source.
5. Next, go to Action > Synchronize Protocol & baud rate.
6. Then, go to Action > Switch to NMEA Protocol.
7. In the pop-up window, select the 4800 baud rate under the Baud Rate and click Send.
8. Close the Sirf Demo software.
測試程式
import serial
ser = serial.Serial("/dev/ttyUSB0", 4800, timeout=0.5)
while True:
try:
str = ser.readline()
print str
except Exception as e:
print(e)
pass
如果在執行 cgps -s 以後, 再執行測試程式以後可能會變成亂碼, 一個方法就是透過上面的 GPSInfo 修改, 另一個方法就是透過指令列修改
sudo pkill gpsd sudo stty 4800 > /dev/ttyUSB0 sudo gpsd -b /dev/ttyUSB0 cat /dev/ttyUSB0 # CTRL+c to stop
順帶一提, 這邊有不錯的範例程式
https://www.raspberrypi.org/forums/viewtopic.php?t=172893&p=1105715
reference:
* https://askubuntu.com/questions/30569/how-to-use-gps-receiver-bu-353
2017年6月6日 星期二
2017年6月5日 星期一
2017年6月4日 星期日
[RPi] PiTFT Plus 使用腳位
雖然原廠就有寫了, 但實測之後發現使用到的腳位是實體腳位的 3,5(I2C), 19, 21, 23, 24(SPI), 4(5V),17(3.3V), 20(GND), 還有 18 和 22
https://www.adafruit.com/product/2423
https://www.adafruit.com/product/2423
訂閱:
文章 (Atom)
