TVShow S01E16 Arduino Wave Generator Tank




Welcome me matey to Davy Jones' miniature locker. To analyze yer wave and buoyancy mechanics while we plunder wenches, drink Rum and supplement with vitamin C, we rigged an Arduino Micro, (2) servos and potentiometer with if and for codes to generate various wave frequencies upon the sovereign seas (in a small acrylic case cast from a picture frame). Arrr--gh!

Written, Directed and Heave Ho'd by TVMiller
Filmed through 20,000 Leagues and Droid Razr

// Arduino Wave Tank
// TVMiller

#include <Servo.h>

Servo left;
Servo right;

int pos = 20;
int post = 160;
int back = 20;
int forward = 160;

int red = 6;
int green = 5;
int blue = 4;

int slow = 8;
int fast = 4;

void setup() {

Serial.begin(9600);

left.attach(2);
right.attach(3);

pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(blue, OUTPUT);

left.write(back);
right.write(back);

digitalWrite(green, HIGH);
delay(1000);
digitalWrite(green, LOW);
delay(1000);
digitalWrite(red, HIGH);
delay(1000);
digitalWrite(red, LOW);
delay(1000);

}

void loop() {

int pent = analogRead(A0);
Serial.println(pent);

if (pent < 200) {
digitalWrite(blue, HIGH);
digitalWrite(red, LOW);
digitalWrite(green, LOW);
for (pos = back; pos <= forward; pos += 1) {
left.write(pos);
right.write(pos);
delay(slow);
}
for (pos = forward; pos >= back; pos -= 1) {
left.write(pos);
right.write(pos);
delay(slow);
}
}
else if (pent > 200 && pent < 450) {
digitalWrite(blue, LOW);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
for (pos = back; pos <= forward; pos += 1) {
left.write(pos);
right.write(pos);
delay(fast);
}
for (pos = forward; pos >= back; pos -= 1) {
left.write(pos);
right.write(pos);
delay(fast);
}
}
else if (pent > 450 && pent < 700) {
digitalWrite(blue, LOW);
digitalWrite(red, LOW);
digitalWrite(green, HIGH);
for (pos = back; pos <= forward; pos += 1) {
post = map(pos, 20, 160, 160, 20);
left.write(pos);
right.write(post);
delay(slow);
}
for (pos = forward; pos >= back; pos -= 1) {
post = map(pos, 160, 20, 20, 160);
left.write(pos);
right.write(post);
delay(slow);
}
}
else if (pent > 700 && pent < 1023) {
digitalWrite(blue, LOW);
digitalWrite(red, HIGH);
digitalWrite(green, LOW);
for (pos = back; pos <= forward; pos += 1) {
post = map(pos, 20, 160, 160, 20);
left.write(pos);
right.write(post);
delay(fast);
}
for (pos = forward; pos >= back; pos -= 1) {
post = map(pos, 160, 20, 20, 160);
left.write(pos);
right.write(post);
delay(fast);
}
}

}

Archive
HackADay.io - Arduino Wave Generator Tank
Hackster.io - Arduino Wave Generator Tank
TVMiller - Arduino Wave Generator Tank (Speed Adjustable Only)
TVShow S01E14 Mobile Coeur d'Alene Floating 14th Hole




The elite Coeur d'Alene Resort is an exquisite luxurious encounter nestled on a lake in Idaho. I live in a shack; thus the odds of entertaining such a blessed experience are currently, null. In an attempt to bring this hedonistic wealth home, we have reproduced (maked) golf's now infamous floating 14th.

The scaled golf green sits upon an Arduino Uno and Seeed Studio Relay controlled motor array affixed by a bluetooth that interacts with an Android phone application created in MIT App Inventor to much like the parent object, adjust distance relative to user. Steering is automated to control center by an Arduino Micro and 2 ultrasonic sensors spitting out distance to elevated impediments. It's a glorified chipping mat folks!

It should be noted that TVMiller won the HackADay Golf Tournament by 4 strokes. That's what she said.

Written, Directed and Sub Parred by TVMiller
Guest Starring TVMiller
Filmed with a Fade and Droid Razr

Arduino MCDL14 Drive Sketch

// MCDL14 Drive
// TVMiller

#include <SoftwareSerial.h>

// 6.25 Inch Rotation
// 5.76 Rotations Per Yard
// 1.25 Seconds Per Rotation
// 7.2 Seconds Per Yard

SoftwareSerial btsend(11, 10);

const int alive = 13;

//Forward
const int posfwd = 4;
const int negfwd = 6;

//Backward
const int posbak = 5;
const int negbak = 7;

// Last Position
int pos = 0;
int rot = 0;
char btrec;

// Run Time (Ref.)
int zero = 0;
int forty = 5555;
int fifty = 6944;
int sixty = 8333;
int seventy = 9722;
int eigthy = 11111;
int ninety = 12500;

void setup() {
Serial.begin(9600);
btsend.begin(9600);

pinMode(alive, OUTPUT);
pinMode(posfwd, OUTPUT);
pinMode(negfwd, OUTPUT);
pinMode(posbak, OUTPUT);
pinMode(negbak, OUTPUT);
}

void loop() {

// Bluetooth Coms
while (btsend.available()) {
btrec = btsend.read();

Serial.println(btrec);
Serial.println(pos);

// 40 Yards
if (btrec == '1') {
if (pos > forty) {
rot = pos - forty;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = forty;
}
else if (pos < forty) {
rot = forty - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = forty;
}
else if (pos == forty) {
halt();
pos = forty;
}
}

// 50 Yards
if (btrec == '2') {
if (pos > fifty) {
rot = pos - fifty;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = fifty;
}
else if (pos < fifty) {
rot = fifty - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = fifty;
}
else if (pos == fifty) {
halt();
pos = fifty;
}
}

// 60 Yards
if (btrec == '3') {
if (pos > sixty) {
rot = pos - sixty;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = sixty;
}
else if (pos < sixty) {
rot = sixty - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = sixty;
}
else if (pos == sixty) {
halt();
pos = sixty;
}
}

// 70 Yards
if (btrec == '4') {
if (pos > seventy) {
rot = pos - seventy;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = seventy;
}
else if (pos < seventy) {
rot = seventy - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = seventy;
}
else if (pos == seventy) {
halt();
pos = seventy;
}
}

// 80 Yards
if (btrec == '5') {
if (pos > eigthy) {
rot = pos - eigthy;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = eigthy;
}
else if (pos < eigthy) {
rot = eigthy - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = eigthy;
}
else if (pos == eigthy) {
halt();
pos = eigthy;
}
}

// 90 Yards
if (btrec == '6') {
if (pos > ninety) {
rot = pos - ninety;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = ninety;
}
else if (pos < ninety) {
rot = ninety - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = ninety;
}
else if (pos == ninety) {
halt();
pos = ninety;
}
}

// Home
if (btrec == '7') {
if (pos > zero) {
rot = pos - zero;
Serial.println(rot);
backward();
delay(rot);
halt();
pos = zero;
}
else if (pos < zero) {
rot = zero - pos;
Serial.println(rot);
forward();
delay(rot);
halt();
pos = zero;
}
else if (pos == zero) {
halt();
pos = zero;
}
}
}
}
void backward() {
Serial.println("backward");
digitalWrite(posbak, HIGH);
digitalWrite(negbak, HIGH);
digitalWrite(alive, HIGH);
}
void forward() {
Serial.println("forward");
digitalWrite(posfwd, HIGH);
digitalWrite(negfwd, HIGH);
digitalWrite(alive, HIGH);
}
void halt() {
Serial.println("stop");
digitalWrite(posfwd, LOW);
digitalWrite(negfwd, LOW);
digitalWrite(posbak, LOW);
digitalWrite(negbak, LOW);
digitalWrite(alive, LOW);
}

Archive
HackADay - Mobile Mini Green Recreates Coeur díAleneís Floating 14th Hole
HackADay.io - Mobile Coeur d'Alene Floating 14th Hole
Hackster.io - Mobile Coeur d'Alene Floating 14th Hole
Seeed Studio - Mobile Coeur d'Alene Floating 14th Hole
TVMiller - Mobile Coeur d'Alene Floating 14th Hole (The End)
TVShow S01E12 Magician's Assistant (Jacob)


Practicing prestidig...prestidigiti...illusions requires one to take another in to one's confidence...or...

The assistant makes use of an optic to discretion between light and dark then store and reference the variance for a pass-fail search. The mechanical function is operated by an Arduino Uno and communicated by our resident artificial automation Jacob.

Written, Directed and Jazz Hands by TVMiller
Guest Starring Jacob
Filmed with Hypnosis and Droid Razr

Update
Seeing as it was noted in a comment, the card coincidentally at the bottom is NOT the card Jacob chose if you look closely. I am no hack...see what I did there?!

Archive
HackADay.io - Magician's Assistant
Hackster.io - Magician's Assistant
Adafruit - Make A Magicianís Assistant With Arduino
Magnetic Experiment 002
TVShow S01E09 Prong Saver



Written, Directed and Squelched by TVMiller
Filmed Through Malaise and Droid Razr

Archive
HackADay - Act Now and Receive the Prong Saver for Only 0.00$
HackADay.io - Prong Saver
Imgur - Vacuum Prong Saver
Dr. Jack and Mr. O'Lantern



While carving a pleasant little pumpkin for the children to find glee and adulation, I accidentally swallowed a pumpkin seed. Laced with Nature's poison, I succumbed to it's decay as neurons tangled, my skin tensed, my blood boiled, I changed. I awoke much later to find this wretched thing before me, unaware of how I built it or why. I am cursed...or...

A rushed build for All Hallows Eve which left improvements like a more generous smoke tray, refined blower, water pump, ambient sound and FLAMES, aborted.

// Dr. Jack Mr. O'Lantern
// TVMiller

#include <Servo.h>
Servo jack;
Servo pour;

const int red = 4;
const int blue = 5;
const int fan = 2;

const int sensor = A0;
// Trigger Distance in CM
const int dist = 90;

void setup() {
jack.attach(7);
jack.write(0);
pour.attach(3);
pour.write(10);

pinMode(red, OUTPUT);
pinMode(blue, OUTPUT);
pinMode(fan, OUTPUT);

Serial.begin(9600);

digitalWrite(red, HIGH);
digitalWrite(blue, LOW);
delay(2500);
digitalWrite(red, LOW);
digitalWrite(blue, HIGH);
delay(2500);
}

void loop() {

jack.write(0);
pour.write(10);
digitalWrite(red, HIGH);
digitalWrite(blue, LOW);
digitalWrite(fan, LOW);
delay(20);
digitalWrite(red, LOW);
delay(40);
digitalWrite(red, HIGH);

long prox, proxcm;
pinMode(sensor, OUTPUT);
digitalWrite(sensor, HIGH);
delayMicroseconds(6);
digitalWrite(sensor, LOW);
pinMode(sensor, INPUT);
prox = pulseIn(sensor, HIGH);
proxcm = mtc(prox);
Serial.println(proxcm);

if (proxcm < dist) {
digitalWrite(red, LOW);
pour.write(75);
jack.write(130);
delay(100);
digitalWrite(fan, HIGH);
delay(2000);
digitalWrite(blue, HIGH);
delay(10000);
}

delay(100);
}

long mtc(long ms) {
return ms / 29 / 2;
}

Archive
HackADay.io - Dr. Jack and Mr. O'Lantern
HackADay.io - Halloween Hack List
Imgur - HackOWeen - Dr. Jack and Mr. O'Lantern
FollowTV (1)
Frequently shifting position in my laboratory viewing solution utilizing (3) ultrasonic sensors, (3) servos, an Arduino Uno and an excessive amount of averaging (see below) to lessen interference.
(Advice) Never buy HC-SR04 sensors, blech, double blech.



// FollowTV
// TVMiller

#include <Servo.h>

const int atpin = 2;
const int aepin = 3;
const int btpin = 4;
const int bepin = 5;
const int ctpin = 6;
const int cepin = 7;

// For Cycle
const int num = 15;
int i = 0;
// Limit Distance
const int limit = 5500;
int hold = 500;

long adur, atot, afix;
long bdur, btot, bfix;
long cdur, ctot, cfix;

Servo lfs; // Left Front Speaker
const int lfsout = 69;
const int lfsin = 92;

Servo mon; // Monitor
const int monl = 145;
const int monc = 91;
const int monr = 45;

Servo rfs; // Right Front Speaker
const int rfsin = 63;
const int rfsout = 78;

void setup() {
Serial.begin(9600);

pinMode(atpin, OUTPUT);
pinMode(aepin, INPUT);
pinMode(btpin, OUTPUT);
pinMode(bepin, INPUT);
pinMode(ctpin, OUTPUT);
pinMode(cepin, INPUT);

lfs.attach(8);
mon.attach(9);
rfs.attach(10);

digitalWrite(atpin, LOW);
digitalWrite(btpin, LOW);
digitalWrite(ctpin, LOW);

lfs.write(lfsin);
mon.write(monc);
rfs.write(rfsin);

}

void loop() {

atot = 0;
for (i=0; i <= num; i++){
digitalWrite(atpin, HIGH);
delayMicroseconds(10);
digitalWrite(atpin, LOW);
adur = pulseIn(aepin, HIGH);
if (adur > limit) {
adur = limit;
}
atot = atot + adur;
}
afix = atot / num;

btot = 0;
for (i=0; i <= num; i++){
digitalWrite(btpin, HIGH);
delayMicroseconds(10);
digitalWrite(btpin, LOW);
bdur = pulseIn(bepin, HIGH);
if (bdur > limit) {
bdur = limit;
}
btot = btot + bdur;
}
bfix = btot / num;

ctot = 0;
for (i=0; i <= num; i++){
digitalWrite(ctpin, HIGH);
delayMicroseconds(10);
digitalWrite(ctpin, LOW);
cdur = pulseIn(cepin, HIGH);
if (cdur > limit) {
cdur = limit;
}
ctot = ctot + cdur;
}
cfix = ctot / num;

Serial.print(afix);
Serial.print(" ");
Serial.print(bfix);
Serial.print(" ");
Serial.println(cfix);

if (afix < bfix && afix < cfix) {
// Position 2
lfs.write(lfsout);
mon.write(monl);
rfs.write(rfsin);
}
else if (bfix < afix && bfix < cfix) {
// Position 1 and 3
lfs.write(lfsin);
mon.write(monc);
rfs.write(rfsin);
}
else if (cfix < afix && cfix < bfix) {
// Position 4
lfs.write(lfsin);
mon.write(monr);
rfs.write(rfsout);
}
else if (afix == limit && bfix == limit && cfix == limit) {
// Position Open
lfs.write(lfsout);
mon.write(monc);
rfs.write(rfsout);
}

delay(hold);
}

Archive
HackADay.io - FollowTV
Imgur - imgur.com/gallery/XbKaLmx
@HackADay - twitter.com/hackaday/status/652597228264161280
Imgur Mouse
Coke Shot
Addictions are absolute. How perverse they are can depend on your character. Alcohol, heroin, feet. We here at TVMiller prefer the unhealthy consumption of Coca~Cola. When delving deeper in to methodology, we all quickly learn two superior qualities; the aluminum can and the short brief intensity (the ahh) of an initial taste. We attempted to confine those elements in to a machine that sources three methods of activation; a button, a remote control and Jacob, our developing artificial intelligence.





// CokeShot
// TVMiller

#include <IRremote.h>

int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

int red = 8;
int green = 9;
int pour = 10;

int timepour = 10000;
int timeend = 3000;

void setup() {

Serial.begin(9600);

pinMode(red, OUTPUT);
pinMode(green, OUTPUT);
pinMode(pour, OUTPUT);

irrecv.enableIRIn();

}

void loop() {

digitalWrite(red, LOW);
digitalWrite(green, LOW);
digitalWrite(pour, LOW);

// Jacob
if (Serial.available()) {
char ser = Serial.read();
switch (ser) {
case 'C':
coke();
break;
}
}
// Remote (Any)
else if (irrecv.decode(&results)) {
coke();
irrecv.resume();
}

}

void coke() {
digitalWrite(pour, HIGH);
digitalWrite(green, HIGH);
delay(timepour);
digitalWrite(pour, LOW);
digitalWrite(green, LOW);
digitalWrite(red, HIGH);
delay(timeend);
}

Archive
HackADay.io - Coke Shot
Github - Arduino IRRemote Library
Resistance Theory - Wave Cube


Miscellaneous > Resistance Theory