TVShow S02E11X54 Meditation


No zen was harmed in the making of this film.
Written, Directed and Rama Llamaed by TVMiller
TVShow S02E10X53 Arduino Licorice Launcher
Voice Activated
Room Tracking
Catapult Launching
Magazine Reloading
Arduino Licorice Launcher



NATO Red Vines Original Standard Issue

Arduino Cuhode
// Arduino Licorice Launcher @TVMiller
// RF Tracking @ Warner K. robowarner.com

#include <EEPROM.h>
#include <Servo.h>

// Centering
// Too small adjusts too frequently
// Too large will pass over signal
#define buffering 26
// Output Pin
#define ANT_WAVEFORM_OUT 8
// Input Pin
#define SPEAKER_FROM_WALKIETALKIE A1
// Calibration Pin
#define CALIBRATE_IN 11

// Variables
uint16_t caliset = 0;
uint16_t voltage = 0;
int state = 1;

// Servo Assignment
Servo turn;
int turnpin = 6;
Servo loader;
int loaderpin = 9;
Servo fire;
int firepin = 10;
Servo arm;
int arm = 11;

// LED Pins
int red = 3;
int blue = 4;

void setup() {

analogReference(DEFAULT);

turn.attach(turnpin);
loader.attach(loaderpin);
fire.attach(firepin);
arm.attach(armpin);

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

digitalWrite(red, LOW);
digitalWrite(blue, LOW);

Serial.begin(9600);

delay(6000); // Allow Power Up

pinMode(ANT_WAVEFORM_OUT, OUTPUT);
pinMode(SPEAKER_FROM_WALKIETALKIE, INPUT);
pinMode(CALIBRATE_IN, INPUT);
digitalWrite(CALIBRATE_IN, HIGH);

// Read EEPROM
byte HByte = EEPROM.read(1);
byte LByte = EEPROM.read(2);
caliset = word(HByte, LByte);
Serial.print("EEPROM Calibration number: ");
Serial.println(caliset);

// Calibration Check and Delay
// Aim Receiver and Clear Area
if (digitalRead(CALIBRATE_IN) == LOW) {
delay(10000);
}
}

void loop() {

if (state == 1) {
// Engage Licorice Weapon
digitalWrite(red, HIGH);
// Trigger Position Open
fire.write(45);
delay(1000);
// Arm Launcher
arm.write(180);
delay(1500);
// Lock Trigger
fire.write(90);
// Load Launcher
loader.write(180);
delay(330);
// Stall Position
loader.write(88);
// Remove Arm
arm.write(40);
// Licorice Launcher is Hot
digitalWrite(red, LOW);
digitalWrite(blue, HIGH);
state = 2;

} else {
// Hold for Command from JACOB
if (Serial.available()) {
char ser = Serial.read();
switch (ser) {
case 'L':
load();
break;
case 'F':
fire();
break;
}
}
}
}

void load() {
// Load Launcher
loader.write(180);
delay(330);
loader.write(88);
}

void fire() {

// Antenna Switching Waveform
digitalWrite(ANT_WAVEFORM_OUT, HIGH);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, LOW);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, HIGH);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, LOW);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, HIGH);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, LOW);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, HIGH);
delay(1);
digitalWrite(ANT_WAVEFORM_OUT, LOW);
delay(1);

// Read Speaker Voltage
voltage = analogRead(SPEAKER_FROM_WALKIETALKIE);

// If in Calibration Mode
// Store to EEPROM
if (digitalRead(CALIBRATE_IN) == LOW) {
caliset = voltage;
byte HByte = highByte(caliset);
byte LByte = lowByte(caliset);
EEPROM.write(1, HByte);
EEPROM.write(2, LByte);
delay(5000);
endprogram();
}

// Stall Turning
if (voltage > (caliset - buffering) && voltage < (caliset + buffering)) {
// Fire
launch();
}
// Turn Left
if (voltage > (caliset + buffering)) {
turn.write(180);
delay(15);
Serial.print("In, Cal\t");
Serial.print(voltage);
Serial.print("\t");
Serial.println(caliset);
// Return Cycle
fire();
}
// Turn Right
if (voltage < (caliset - buffering)) {
turn.write(0);
delay(15);
Serial.print("In, Cal\t");
Serial.print(voltage);
Serial.print("\t");
Serial.println(caliset);
// Return Cycle
fire();
}

delay(5);
Serial.print("In, Cal\t");
Serial.print(voltage);
Serial.print("\t");
Serial.println(caliset);
}

void launch() {
// Release Trigger
fire.write(45);
delay(1000);
// Reset
state = 1;
break;
}

void endprogram() {
Serial.print("Calibrated to: ");
Serial.print(caliset);
loopy:
goto loopy;
}

Notable thanks to hackerspace @MakerBar in Hoboken, New Jersey.

Additional notable thanks to @RoboWarner for the RF tracking schematics and code.

Notation
Indeed, this should have implemented a WIFI module how ever at the moment I did not have a MKR1000 on premises, thus the resulted Uno and PC connected USB. Should a MKR1000 be made available, it would be altered to suit. In conclusion, pft.

Archive
HackADay - Licorice Launcher Locks on to your Voice
HackADay.io - Arduino Licorice Launcher
HackerSpace - MakerBar.com
RF Tracking - Radio Homing Robot DIY by RoboWarner
TVShow S02E09X52 Trends


That...that explains why.
Written, Directed and Yolo'd by TVMiller
Personalized Golf Tees

Collaborating a small gift for the parental units, experimenting with golf tee variables and exploiting a 3D printer I had abandoned because, CNC, am I right?!, and...no, no that is it.

Two of the first set of tees are initials while the third is an experiment of a pointer tee. There are numerous more designs that will be added as we go along, including the obligatory HackADay golf tee. Stay tuned.


Archive
HackADay.io - Personalized Golf Tees
TVShow S02E08X51 Liberty Mutual


Accident Forgiveness
Written, Directed and Assured by TVMiller
Last PageNext Page