零件清单
- Pycom WiPy 开发板
- Pycom PyTrack 扩展板
- USB移动电源
- USB 数据线
代码: 全选
GPS = L76GNSS(Pycoproc(Pycoproc.PYTRACK), timeout=30)
while True:
location = GPS.coordinates()
latitude = location[0]
longitude = location[1]
代码: 全选
GPS_Store = ''
while True:
location = GPS.coordinates()
if location == GPS_Store:
time.sleep(5)
continue
latitude = location[0]
longitude = location[1]
代码: 全选
FileNo = 0
FileName = ''
while True:
try:
FileName = '/sd/' + str(FileNo) + '.csv'
FileNo = FileNo + 1
open(FileName, 'r')
except:
break
f = open(FileName, 'a')
f.write('Name,' + 'Latitude,' + 'Longitude' + '\r\n')
f.close()
github