Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (temperature,pressure)=readBmp180()
- print("Temperature : {0} C".format(temperature))
- print("Pressure : {0} mbar".format(pressure))
- data = {
- "cisnienie": pressure,
- "temperatura" : temperature
- }
- req = urllib2.Request('serwer')
- req.add_header('Content-Type', 'application/json')
- response = urllib2.urlopen(req, json.dumps(data))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement