I hereby claim:
- I am robotto on github.
- I am robotto (https://keybase.io/robotto) on keybase.
- I have a public key ASAY0jDlqVXaQ10QkSF8BFBZy8fgdAfXbW6J86uacbWIbQo
To claim this, I am signing this object:
#!/usr/bin/env python | |
import requests | |
ip='90.185.22.1' | |
url='http://ipinfo.io/%s/loc'%ip | |
request = requests.get(url) |
static int servo_minimum = 0; | |
static int servo_maximum = 180; | |
static unsigned int filter_alpha = 10; | |
#include <Servo.h> | |
Servo finger1, finger2, finger3, finger4, finger5; | |
int servoPin1 = 5; | |
int servoPin2 = 6; |
class Power{ | |
public static void main(String[] args) | |
{ | |
Power runner = new Power(); | |
int x = Integer.parseInt(args[0]); | |
int n = Integer.parseInt(args[1]); | |
System.out.println(runner.F(x,n)); | |
} |
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
public class BinomialApplet extends JApplet { | |
//init the two binomial algorithms: | |
private Binomial1 algo1 = new Binomial1(); | |
private Binomial2 algo2 = new Binomial2(); |
#include <Wire.h> | |
#define GYRO_ADDRESS ((int) 0x68) // 0x68 = 0xD0 / 2 | |
// Arduino backward compatibility macros | |
#if ARDUINO >= 100 | |
#define WIRE_SEND(b) Wire.write((byte) b) | |
#define WIRE_RECEIVE() Wire.read() | |
#else | |
#define WIRE_SEND(b) Wire.send(b) |
// Arrays to save our results in | |
unsigned long start_time; | |
unsigned long stop_time; | |
unsigned int dX; | |
unsigned int dY; | |
unsigned int lastX; | |
unsigned int lastY; | |
unsigned int currentX; | |
unsigned int currentY; | |
unsigned int filterAlpha=16; |
/* | |
This code runs on an ESP8266 wifi module, compiled/programmed through the Arduino IDE. | |
The specific hardware in this case is a NodeMCU v0.9 module | |
The ESP hosts a webserver on port 80, with event listeners for access on / , /unlock, and /buzzToggle, | |
it also listens on UPD port 1337 for the (newline terminated) string "SESAME" | |
it broadcasts itself as "door" on Mdns, so that devices on LAN can access it via http://door.local (unless it's an android device, because fuck that.) | |
Hand coded http response and body are in the handleroot() function. | |
Door unlock and buzzer toggle is physically handled with solidstate relays, so all this code needs to do is toggle I/O pins |
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <WiFiClient.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
//Function declarations: | |
void handleRoot(); | |
void handleToggle(); |
//exponentialFilter.ino | |
//example sketch to pull and filter measurements from eg. an ADC | |
//the filter has a beta value which determines the weight of new values. | |
//A high beta value will filter more noise but slow down the response of the filter. | |
static float filterBeta=32; //1, 2 , 4, 8, 16, 32, 64, 128 and so on... | |
//where is the data coming from? | |
static unsigned int adcPin=A0; | |
//the filtered value for printing or whatever: |
I hereby claim:
To claim this, I am signing this object: