This file contains 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
import os | |
import time | |
def run_pump(id=1, duration=0): | |
relay_on(id) | |
time.sleep(duration) | |
relay_off(id) | |
def relay_on(id=1): | |
os.system('usbrelay 5291D_'+str(id)+'=1') |
This file contains 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
import serial | |
from serial.tools import list_ports | |
ser = serial.Serial(list_ports.comports()[1].device, 9600) | |
while True: | |
print(ser.readline()) |
This file contains 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
//**THIS CODE WILL WORK ON ANY ARDUINO** | |
//This code was written to be easy to understand. | |
//Modify this code as you see fit. | |
//This code will output data to the Arduino serial monitor. | |
//Type commands into the Arduino serial monitor to control the pH circuit. | |
//An Arduino UNO was used to test this code. | |
//This code was written in the Arduino 1.8.5 IDE | |
//This code was last tested 1/2018 |
This file contains 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_AM2315.h> | |
/*************************************************** | |
This is an example for the AM2315 Humidity + Temp sensor | |
Designed specifically to work with the Adafruit BMP085 Breakout | |
----> https://www.adafruit.com/products/1293 | |
These displays use I2C to communicate, 2 pins are required to |
This file contains 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_AM2315.h> | |
/*************************************************** | |
This is an example for the AM2315 Humidity + Temp sensor | |
Designed specifically to work with the Adafruit BMP085 Breakout | |
----> https://www.adafruit.com/products/1293 | |
These displays use I2C to communicate, 2 pins are required to | |
interface | |
Adafruit invests time and resources providing this open source code, |
This file contains 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
import numpy as np | |
import imutils | |
import cv2 | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
# Defined bounds using https://github.com/jrosebr1/imutils/blob/master/bin/range-detector | |
leaf_lower = (29, 0, 0) | |
leaf_upper = (255, 255, 128) |
This file contains 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_AM2315.h> | |
/*************************************************** | |
This is an example for the AM2315 Humidity + Temp sensor | |
Designed specifically to work with the Adafruit BMP085 Breakout | |
----> https://www.adafruit.com/products/1293 | |
These displays use I2C to communicate, 2 pins are required to |
This file contains 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
# USAGE | |
# python save_key_events.py --output output | |
# import the necessary packages | |
from greenthumb.note import Note | |
from uuid import getnode as get_mac | |
from io import BytesIO | |
from picamera import PiCamera | |
import datetime | |
import imutils |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder