Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import time # Library for delays
import RPi.GPIO as GPIO # Library for using the GPIO ports
from math import log1p,exp,log10 # Library for math functions. No need for it if you'll get the raw data from the sensors
from ubidots import ApiClient # Ubidots Library
import Adafruit_DHT # Library from Adafruit to simplify the use of DHT sensor.
# Set up the SPI interface pins. Through SPI we can connect to the ADC MCP3008
SPICLK = 18