Skip to content

Instantly share code, notes, and snippets.

Dan Oved oveddan

Block or report user

Report or block oveddan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@oveddan
oveddan / index.html
Created May 9, 2018
PoseNet in P5 - Multiple Poses Estimation
View index.html
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<!-- Load TensorFlow.js -->
<script src="https://unpkg.com/@tensorflow/tfjs"></script>
<!-- Load Posenet -->
<script src="https://unpkg.com/@tensorflow-models/posenet"></script>
<script src="sketch.js"></script>
</head>
@oveddan
oveddan / index.html
Last active May 25, 2018
PoseNet in P5 - Single Pose Estimation
View index.html
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/addons/p5.dom.min.js"></script>
<!-- Load TensorFlow.js -->
<script src="https://unpkg.com/@tensorflow/tfjs"></script>
<!-- Load Posenet -->
<script src="https://unpkg.com/@tensorflow-models/posenet"></script>
<script src="sketch.js"></script>
</head>
@oveddan
oveddan / lunar_lander_controller.ino
Created Jan 31, 2018
Lunar Lander Game Controller Code
View lunar_lander_controller.ino
#include <Keyboard.h>
#include <Mouse.h>
const int Y_PIN = A0;
const int LEFT_PIN = 2;
const int RIGHT_PIN = 3;
const int START_PIN = 6;
void setup() {
// put your setup code here, to run once:
@oveddan
oveddan / index.js
Last active Oct 30, 2017
Japanese Weather Diorama Arduino and Node.js code - oveddan.github.io/blog/posts/physical_computing/weather-diorama/
View index.js
const SerialPort = require('serialport');
const request = require('request');
const myKey = '12312314';
const moment = require('moment')
const Readline = SerialPort.parsers.Readline;
const thirtyMinutesInSeconds = 60 * 60
const SUNRISE = 0
@oveddan
oveddan / cellular_zoetrope.pde
Last active Oct 26, 2017
Cellular Voronoi Zoetrope Generator
View cellular_zoetrope.pde
PShader frag;
int frames = 33;
float frameTheta = 2. * PI / frames;
int h = 520;
int w = 520;
float base = 2 * tan(frameTheta / 2.)* h;
int renderSize = ceil(base);
@oveddan
oveddan / light_loop.ino
Created Oct 12, 2017
Light feedback loop Arduino code
View light_loop.ino
/*
Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register
*/
int latchPin = 5;
int clockPin = 6;
int dataPin = 4;
byte leds[2];
@oveddan
oveddan / zoetrope_flasher_test.ino
Last active Oct 12, 2017
Controls the flashing speed of an analog RGB led strip. The on duration is 10%. For use with a zoetrope
View zoetrope_flasher_test.ino
#define LOWER_READ 143
#define UPPER_READ 940
#define INTERVAL_PIN A0
#define REDPIN 5
#define GREENPIN 6
#define BLUEPIN 9
#define ON_PERCENTAGE .1
@oveddan
oveddan / logReader.js
Created Jul 25, 2012
TDD callback testing sample
View logReader.js
var fs = require('fs');
var logReader = {
getLogEntries : function(logDate, callback){
if(!(logDate instanceof Date))
throw new Error('date must be of type Date');
var logFileName = logDate.toDateString() + '.log';
fs.readFile(logFileName, function(err, data){
You can’t perform that action at this time.