Skip to content

Instantly share code, notes, and snippets.

View raspberrycoulis's full-sized avatar

Wesley Archer raspberrycoulis

View GitHub Profile
@pbojinov
pbojinov / blinkt-weather.py
Last active June 11, 2018 14:34 — forked from brentajones/blinkt-weather.py
A weather status script for the Raspberry Pi and Blinkt module - https://blog.bjones.net/2018/02/04/pi-blinkt-weather-status/
import json, time, os.path
import blinkt, requests
status_colors = {'current':[1,1,1],'high':[1,0,0],'low':[0,0,1],'precip':[0,1,0]}
blinkt.set_clear_on_exit()
blinkt.set_brightness(.1)
def getForecast(key,lat,lng):
url = 'https://api.darksky.net/forecast/' + key + '/' + str(lat) + ',' + str(lng)