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
# -*- coding: utf-8 -* | |
# mode: 1..hand control, 2..find green area, 3..find squares and recognize, 4..found | |
# 41..right_step1, 42..rs2, 43..rs3, ... | |
# 51..left_step1, 52..ls2, 53..ls3, ... | |
# 61, 62, 63 ... back to the middle | |
from megapi_python3 import * | |
import numpy as np | |
import imutils | |
import cv2 | |
from imutils.video import VideoStream |
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
<html> | |
<head> | |
<title>Pi Video Surveillance</title> | |
<script type="text/javascript"> | |
document.onkeypress = keypressed; | |
function sendstop(){ | |
server = "/stop"; | |
request = new XMLHttpRequest(); | |
request.open("GET", server, true); | |
request.send(null); |
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
/********************************************************************* | |
This is an example for our nRF51822 based Bluefruit LE modules | |
Pick one up today in the adafruit shop! | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
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
/********************************************************************* | |
This is an example for our nRF51822 based Bluefruit LE modules | |
Pick one up today in the adafruit shop! | |
Adafruit invests time and resources providing this open source code, | |
please support Adafruit and open-source hardware by purchasing | |
products from Adafruit! |
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
down_2 | |
#!/usr/bin/env python | |
from __future__ import division | |
import time | |
import subprocess | |
with open('/etc/motioneye/vert_pos_2', 'r') as f: | |
vert_pos_2 = int(f.readline()) | |
print vert_pos_2 |
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
int bluePin = 2; //IN1 on the ULN2003 Board, BLUE end of the Blue/Yellow motor coil | |
int pinkPin = 3; //IN2 on the ULN2003 Board, PINK end of the Pink/Orange motor coil | |
int yellowPin = 4; //IN3 on the ULN2003 Board, YELLOW end of the Blue/Yellow motor coil | |
int orangePin = 5; //IN4 on the ULN2003 Board, ORANGE end of the Pink/Orange motor coil | |
//going up | |
//Keeps track of the current step. | |
//We'll use a zero based index. | |
int currentStep = 0; | |
void setup() { |
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
int A = D1; //EN1 | |
int B = D2; //EN2 | |
int C = D3; //IN1 | |
int D = D4; //IN3 | |
long del = 15000; | |
void setup() { | |
pinMode(A, OUTPUT); | |
pinMode(B, OUTPUT); | |
pinMode(C, OUTPUT); |
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
// defines pins numbers | |
const int stepPin = 3; | |
const int dirPin = 4; | |
void setup() { | |
// Sets the two pins as Outputs | |
pinMode(stepPin,OUTPUT); | |
pinMode(dirPin,OUTPUT); | |
} | |
void loop() { |
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 "Arduino.h" | |
#include "SoftwareSerial.h" | |
#include "DFRobotDFPlayerMini.h" | |
#include <Adafruit_NeoPixel.h> | |
#define BUTTON_1 2 // white | |
#define BUTTON_2 4 // yellow | |
#define BUTTON_3 6 // red small | |
#define BUTTON_4 8 // blue small | |
#define BUTTON_5 10 // red big |
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
int A = D1; //EN1 | |
int B = D2; //EN2 | |
int C = D3; //IN1 | |
int D = D4; //IN3 | |
long del = 2000; | |
void setup() { | |
pinMode(A, OUTPUT); | |
pinMode(B, OUTPUT); | |
pinMode(C, OUTPUT); |
NewerOlder