#print ("Duraction is %8.2f minutes" % (duration/60)) #print(dist) SEGMENT = 229781 mysegment = client.get_segment(SEGMENT) #client.get_segment(,6795950158) url = "https://www.strava.com/api/v3/segments/starred" #response = urllib.urlopen(url) #print(response) print("My segment is {}".format(mysegment.name)) types = ['time', 'latlng', 'altitude', 'heartrate', 'temp', ] streams = client.get_segment_streams(SEGMENT, types=types, resolution='high') #streams = client.get_activity_streams(ACTIVITY, types=types, resolution='high') # Result is a dictionary object. The dict's key are the stream type. #if 'latlng' in streams.keys(): # print(streams['latlng'].data) if __name__ == '__main__': gpsp = GpsPoller() # create the thread try: gpsp.start() # start it up while True: #It may take a second or two to get good data #print gpsd.fix.latitude,', ',gpsd.fix.longitude,' Time: ',gpsd.utc GPIO.output(25,GPIO.HIGH) os.system('clear')