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
#! /usr/bin/python | |
# import the necessary packages | |
from imutils.video import VideoStream | |
from imutils.video import FPS | |
import face_recognition | |
import imutils | |
import pickle | |
import time | |
import cv2 |
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 telepot | |
from picamera import PiCamera | |
import RPi.GPIO as GPIO | |
import time | |
from time import sleep | |
import datetime | |
from telepot.loop import MessageLoop | |
from subprocess import call | |
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
#! /usr/bin/python | |
# import the necessary packages | |
from imutils.video import VideoStream | |
from imutils.video import FPS | |
import face_recognition | |
import imutils | |
import pickle | |
import time | |
import cv2 |
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 <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 20, 2); // set the LCD address to 0x27 for a 16 chars and 2 line display | |
#include <Keypad.h> | |
const byte ROWS = 4; | |
const byte COLS = 4; | |
char keys [ROWS] [COLS] = { | |
{'1', '2', '3', '+'}, |
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 array, time | |
from machine import Pin | |
import rp2 | |
from rp2 import PIO, StateMachine, asm_pio | |
# Configure the number of WS2812 LEDs. | |
NUM_LEDS = 8 | |
@asm_pio(sideset_init=PIO.OUT_LOW, out_shiftdir=PIO.SHIFT_LEFT, | |
autopull=True, pull_thresh=24) |
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 cv2 | |
import numpy as np | |
img = cv2.imread("Cover.jpg") | |
gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
template = cv2.imread("Raspberry Pi.jpg", 0) | |
w, h = template.shape[::-1] | |
count = 0 | |
res = cv2.matchTemplate(gray_img, template, cv2.TM_CCORR_NORMED ) | |
#methods = ['cv.TM_CCOEFF', 'cv.TM_CCOEFF_NORMED', 'cv.TM_CCORR','cv.TM_CCORR_NORMED', 'cv.TM_SQDIFF', 'cv.TM_SQDIFF_NORMED'] |
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
#define TRIGPIN1 2 | |
#define ECHOPIN1 3 | |
#define TRIGPIN2 5 | |
#define ECHOPIN2 6 | |
#define PIEZO 8 | |
// defines variables | |
long Duration1; | |
int Distance1; | |
long Duration2; |
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 telepot | |
import RPi.GPIO as GPIO | |
import time | |
import datetime | |
from telepot.loop import MessageLoop | |
PIR = 17 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BCM) |
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
/* | |
Project: CUnlock the Soenoid Door Lock Using A Keypad and Maker Nano #ArduinoNano | |
Board: Arduino Nano (Maker Nano) | |
Connections: | |
Nano | Relay | |
GND – GND | |
5V – VCC | |
A0 – SIG | |
Nano | Keypad |
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
#define BUTTON 2 // the number of the pushbutton pin | |
#define RELAY 3 // the number of the relay pin | |
// variables will change: | |
int buttonState = 0; // variable for reading the pushbutton status | |
void setup() { | |
// initialize the LED pin as an output: | |
pinMode(RELAY, OUTPUT); | |
// initialize the pushbutton pin as an input: |
NewerOlder