Skip to content

Instantly share code, notes, and snippets.

View Isaac-the-Man's full-sized avatar
🎯
Focusing

Yu-Kai "Steven" Wang Isaac-the-Man

🎯
Focusing
View GitHub Profile
[Unit]
Description=Service to start webUpdater.py
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/dev/weatherStation/build/webUpdater.py
Restart=always
[Install]
[Unit]
Description=Service to start dbWriter.py
After=multi-user.target
[Service]
Type=idle
ExecStart=/usr/bin/python3 /home/pi/dev/weatherStation/build/dbWriter.py
Restart=always
[Install]
/*
* Sharp Optical Dust Sensor GP2Y1014AU0F
* By Steven Wang @simplycodebased.org
* 7/9/2019
*/
int measurePin = A5;
int ledPower = 12;
unsigned int samplingTime = 280;
/*
* GY8511 UV sensor
* By Steven Wang @simplycodebased.org
* 7/9/2019
*/
//Hardware pin definitions
int UVOUT = A0; //Output from the sensor
int REF_3V3 = A1; //3.3V power on the Arduino board
/*
* BME680 multi-function sensor
* By Steven Wang @simplycodebased.org
* 7/9/2019
*/
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include "Adafruit_BME680.h"
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);
void setup(void)
{
Serial.begin(9600);
Serial.println("Pressure Sensor Test"); Serial.println("");
#include "U8g2lib.h"
// change to your own constructor
U8G2_SH1106_128X64_NONAME_1_SW_I2C oled(U8G2_R0, A5, A4);
// replace this array with your own xbm array
static unsigned char new_logo_bits[] = {
0x00, 0x00, 0x00, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00,
0x00, 0x00, 0x7f, 0x00, 0xe0, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00,
#include "U8g2lib.h"
// declare the OLED of your choice
U8G2_SH1106_128X64_NONAME_1_SW_I2C oled(U8G2_R0, A5, A4);
void setup(void) {
oled.begin();
}
void loop(void) {
#include <dht.h> // essential library for DHT11
#define DHT11_PIN 7
dht DHT;
void setup(){
Serial.begin(9600);
}
# script for tuning parameters
import cv2
import numpy as np
import argparse
# parse argument
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required = True, help = "Path to the image")
args = vars(ap.parse_args())