Skip to content

Instantly share code, notes, and snippets.

@ramicaza
ramicaza / GT511-C1 and ATtiny
Last active October 22, 2015 15:07
This is a sketch that allows the ATtiny line of micro controllers to interface with the GT511-C1/3 fingerprint sensor from Sparkfun. The advantage of this sketch is that it requires no libraries and thus works on any board that can be programmed with the Arduino IDE. The sketch initializes the connection with the sensor, turns the sensors in-bui…
#define greenLed 4 //this lights up when a registered user places their thumb
#define redLed 3 //this is on until a registerd user places their thumb
#define relay 2 //this pin goes HIGH when the registered thumb is placed
#define rxPin 0 //this goes to the TX pin of the FP sensor
#define txPin 1 //this goes to the RX pin of the FP sensor
#include <SoftwareSerial.h>;
SoftwareSerial mySerial(rxPin, txPin);
byte zero = 0;
@ramicaza
ramicaza / crup.py
Created October 9, 2017 06:59
Crups and displays your face using OpenCV 3
#!/usr/bin/python3
import cv2
import numpy as np
def transformBound(rect,xs,ys):
x,y,w,h = rect
xt = int(round(x + (w-w*xs)/2))
wt = int(round(w*xs))
yt = int(round(y + (h-h*ys)/2))
ht = int(round(h*ys))