sudo apt update
sudo apt install mjpg-streamer-opencv-python
Create filter file. (/home/debian/opencv_filter.py)
import cv2
import numpy as np
| // Enviromental Managment System | |
| // Pins: | |
| // LCD - 2,3,4,5,6,7 | |
| // DHT11/22 - 8 | |
| // Sprayer - 9 | |
| // Vent Servo - 10 | |
| // Fan - 11 | |
| // Buzzer - 12 |
| int ON_BUTTON = 13; | |
| void setup() { | |
| pinMode(ON_BUTTON, OUTPUT); | |
| } | |
| void loop() { | |
| delay(5000); | |
| digitalWrite(LED_BUILTIN, HIGH); | |
| delay(1000); |
| /*************************************************** | |
| This is an example for the TMP006 Barometric Pressure & Temp Sensor | |
| Designed specifically to work with the Adafruit TMP006 Breakout | |
| ----> https://www.adafruit.com/products/1296 | |
| These displays use I2C to communicate, 2 pins are required to | |
| interface | |
| Adafruit invests time and resources providing this open source code, | |
| please support Adafruit and open-source hardware by purchasing |
| #include <Wire.h> | |
| static uint8_t nunchuck_buf[6]; // array to store nunchuck data, | |
| void setup(){ | |
| Serial.begin(115200); | |
| nunchuck_setpowerpins(); // use analog pins 2&3 as fake gnd & pwr | |
| nunchuck_init(); // send the initilization handshake | |
| } |
| /* | |
| * NunchuckPrint | |
| * | |
| * 2007 Tod E. Kurt, http://todbot.com/blog/ | |
| * | |
| * Change log: | |
| * | |
| * Mark Tashiro - Changed Wire.read to Wire.write | |
| * Changed Wire.receive to Wire.read | |
| * Added code for servos |
| #include <SPI.h> | |
| #include <WiFi.h> | |
| char wifi_name[] = "WI-FI DSTR Data"; | |
| char wifi_password[] = "dstrdstr"; | |
| unsigned int localPort = 3553; // local port to listen on | |
| WiFiUDP Udp; | |
| char packetBuffer[255]; //buffer to hold incoming packet | |
| char ReplyBuffer[] = "acknowledged"; // a string to send back |
| /* | |
| MATH | |
| Raw Values | |
| int joy_x_axis = nunchuck_buf[0]; | |
| int joy_y_axis = nunchuck_buf[1]; | |
sudo apt update
sudo apt install mjpg-streamer-opencv-python
Create filter file. (/home/debian/opencv_filter.py)
import cv2
import numpy as np
cd /usr/local/lib/python3.7/dist-packages/pptk/libs
mv libz.so.1 libz.so.1.old
sudo ln -s /lib/x86_64-linux-gnu/libz.so.1
Based off fix at pptk issue #3
| import heartrate; heartrate.trace(browser=True) | |
| import time | |
| x = 0 | |
| while x < 100: | |
| print("Hello World\t", x) | |
| time.sleep(0.1) | |
| x+=1 | |
| exit() |