Skip to content

Instantly share code, notes, and snippets.

View nickbalch's full-sized avatar
🎯
Focusinging

nickbalch

🎯
Focusinging
View GitHub Profile
@nickbalch
nickbalch / homie-3-wemos-co2
Created June 26, 2021 17:12
Homie esp8266 arduino sketch for MHZ-16
#include <Homie.h>
#include <SoftwareSerial.h>
/***************************************************
* Infrared CO2 Sensor 0-50000ppm(Wide Range)
* ****************************************************
* The follow example is used to detect CO2 concentration.
* @author lg.gang([email protected])
@nickbalch
nickbalch / googledirections.py
Last active August 16, 2021 22:28
Google API directions extractor. I have a need to export Google turn directions into a structured format so that they can be presented as printouts. Google Python reference is here: https://googlemaps.github.io/google-maps-services-python/docs/. Google's github for the python lib - https://github.com/googlemaps/google-maps-services-python which …
# https://stackoverflow.com/questions/13206695/json-parsing-of-google-maps-direction-api-in-python
import re
import csv
from googlemaps import Client
mapService = Client(key='')
directions = mapService.directions('start','end',waypoints'one|two|three')
directions = directions[0]