Skip to content

Instantly share code, notes, and snippets.

View stilldavid's full-sized avatar
💽
minidisc'in

David Stillman stilldavid

💽
minidisc'in
View GitHub Profile
-----BEGIN PGP MESSAGE-----
Version: Keybase OpenPGP v2.0.1
Comment: https://keybase.io/crypto
wcFMA7AC4f3uc32DAQ/+KWcGlgJij9Z/+0HoRQoexaIUNI3q37JuyOR3RNwvfhEC
aiEOsUiSuDu8OFOPDL7yuNi0XEall/p74zOs6szu5vIljAH/79S1SEm4OKYXHZD9
JTRXIplQwjQpftquS4oU16MSPlr5UZT6ftFcNkoELq7g6LKCi/xdQILX6lfOgmuy
Eg4RLE8xHqrbgvaxSGUlUCJPX5DQc4A+u+RO4xcuaWGuhK/oUUBGcJw5avmoOIJZ
Uq3NiUsVfU2Bvqg5c9wEvmOUxDJ8sDjclq0B9zsmAzt7K9ztHWRhyWB18dqqcKxF
mGIowsf35glg4LG/s9Ju+Kxrqg5Tp1v5r9L8PSsGIHBPav3Lg75SJLKnjUZ1DQTT
@stilldavid
stilldavid / oct-27-class.md
Last active November 15, 2017 14:45
Class notes from the October 28th Arduino class

Arduino Class 10/28

Thanks for attending the Arduino class!

You might be wondering what the little circuit board your child brought home is and what it's good for. The board is called an Arduino and it's a programmable microcontroller, which is just a fancy way of saying it's a little computer.

During class we all programmed them together to take a reading from a light sensor and activate a servo motor if a threshold was reached. In practice, this made for a super simple motion detector to make a head turn or a pumpkin move if it 'sensed' a shadow. The code is written in an Arduino variant of C++ that we uploaded using the Arduino IDE. The entirety of it is as follows:

#include <Servo.h>
_ _
__ _| |_ __ _ __ _ (_)___
/ _` | __/ _` |/ _` | | / __|
| (_| | || (_| | (_| |_ | \__ \
\__, |\__\__,_|\__, (_)/ |___/
|___/ |___/ |__/
js?id=UA-38312895-1:80 Processing commands (0)
js?id=UA-38312895-1:80 Processing commands (1)
@stilldavid
stilldavid / HttpProxy.go
Created December 19, 2022 19:43 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)