Skip to content

Instantly share code, notes, and snippets.

View elizabethn119's full-sized avatar

Elizabeth Adams elizabethn119

View GitHub Profile
#!/usr/bin/python
# ----------------------------------------------------------------------------
# BoatMonitor Version 1.0 May 2017
# This is a Python 2.7.9 script for sending data from
# from a Raspberry Pi 3 and an interface board.
# It reports on various parameters
# on a boat under these conditions which are checked every 5min:
# 1. if shore power is off
# 2. if batteries are below 12vdc
#include <WiFi.h>
#include <HTTPClient.h>
#include "DHT.h"
#define DHTPIN 4 // Digital pin connected to the DHT sensor
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
//-------- User Settings -----------
const char* ssid = "SSID";
import time
import board
import busio
import adafruit_bme280
from ISStreamer.Streamer import Streamer
# Create library object using our Bus I2C port
i2c = busio.I2C(board.SCL, board.SDA)
bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)