Skip to content

Instantly share code, notes, and snippets.

View photo-exif.txt
{
'YResolution': (72, 1),
'ResolutionUnit': 2,
'Make': u 'Apple',
'Flash': 16,
'SceneCaptureType': 0,
'GPSInfo': {
1: u 'N',
2: ((40, 1), (41, 1), (4204, 100)),
3: u 'W',
@brunokruse
brunokruse / template.html
Created Sep 22, 2017
simple html / javascript
View template.html
<html>
<head>
<style>
body {
background: #FF00AA
}
@brunokruse
brunokruse / template.html
Created Sep 22, 2017
simple html / javascript
View template.html
<html>
<head>
<style>
body {
background: #FF00AA
}
@brunokruse
brunokruse / fw-ppg-heartbeat
Created Jul 30, 2017
floating workshjops esp32 ppg + neopixel (the blinking is kinda shitty but it works)
View fw-ppg-heartbeat
/*
Optical Heart Rate Detection (PBA Algorithm) using the MAX30105 Breakout
By: Nathan Seidle @ SparkFun Electronics
Date: October 2nd, 2016
https://github.com/sparkfun/MAX30105_Breakout
This is a demo to show the reading of heart rate or beats per minute (BPM) using
a Penpheral Beat Amplitude (PBA) algorithm.
It is best to attach the sensor to your finger using a rubber band or other tightening
View esptool-fix.py
#!/usr/bin/env python
#
# ESP8266 & ESP32 ROM Bootloader Utility
# Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton, Espressif Systems (Shanghai) PTE LTD, other contributors as noted.
# https://github.com/espressif/esptool
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later version.
#
View ANALOG_SENSOR_IN.txt
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(11, GPIO.IN) #Read output from PIR motion sensor
GPIO.setup(3, GPIO.OUT) #LED output pin
while True:
i=GPIO.input(11)
if i==0: #When output from motion sensor is LOW
print "No intruders",i
@brunokruse
brunokruse / angleLerp.js
Created Mar 20, 2016 — forked from shaunlebron/angleLerp.js
The best way to interpolate 2D angles
View angleLerp.js
/*
2D Angle Interpolation (shortest distance)
Parameters:
a0 = start angle
a1 = end angle
t = interpolation factor (0.0=start, 1.0=end)
Benefits:
1. Angles do NOT need to be normalized.
View charlieplex example
/* Charliplexing 6 LEDs
--------------------------------------------------------------------------------
Row 1 (R1): Arduino Pin 13
Row 2 (R2): Arduino Pin 12
Row 3 (R3): Arduino Pin 11
--------------------------------------------------------------------------------
variable pinMode state
L OUTPUT LOW
H OUTPUT HIGH
Z INPUT LOW
@brunokruse
brunokruse / Ambient Light Sensor Smoothing
Created Mar 17, 2015
Ambient Light Sensor Smoothing - Based off Arduino Example
View Ambient Light Sensor Smoothing
/*
ARDUINO to UNITY3D Smooth data example
Based off Arduino smoothing code by:
David A. Mellis and Tom Igoe
This example code is in the public domain.
*/