This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sharp Optical Dust Sensor GP2Y1014AU0F | |
* By Steven Wang @simplycodebased.org | |
* 7/9/2019 | |
*/ | |
int measurePin = A5; | |
int ledPower = 12; | |
unsigned int samplingTime = 280; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* BME680 multi-function sensor | |
* By Steven Wang @simplycodebased.org | |
* 7/9/2019 | |
*/ | |
#include <Wire.h> | |
#include <Adafruit_Sensor.h> | |
#include "Adafruit_BME680.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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(""); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <dht.h> // essential library for DHT11 | |
#define DHT11_PIN 7 | |
dht DHT; | |
void setup(){ | |
Serial.begin(9600); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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()) |
NewerOlder