TVShow 3X16 Flashing Light Prize (5) IoT Pacing
Stress shd be more stressful.
Button(s) to NodeMCU ESP8266 to Al Gore to .php to .txt to
Processing to Arduino to Relay to Alligator Clips to the Future...


Ingredients
1. NodeMCU ESP-12E
2. Arduino Uno
3. HC-06 Bluetooth Module
4. (2) Momentary Buttons
5. 5V Relay
6. NPN Transistor
7. 1K Resistor
8. Alligator Clips

Notation(s)
1. Originally intended on bluetooth communication between Processing and Arduino Uno with HC-06 module -- how and ever, Processing consistently stalled despite a perceived stable port of call and there is suspicion this was as result of an incompatible native bluetooth.

2. 'status' and 'state' are not like the other. Check your values! Sigh. Thx, Jason Harper.

3. TVShow is shot before no live studio audience...or crew. Often times focus is considered a victory -- here, there is one scene in defeat. We are not DC, we reshoot nothing!

4. A few necessary corrections to the dialog followed by an abundance of totally unnecessary changes in order to preserve the perception that there was no careless thievery. Even the impression could hardly be considered professional -- sigh.

NodeMCU Sktepch
// Flashing Light Prize (5) IoT Pacing
// Step Code
// VijeMiller

// NodeMCU ESP-12E 1.0
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

// WIFI Network Access
const char* ssid = "networkID";
const char* password = "networkpassword";
WiFiServer server(80);

// Buttons
const int left = D2;
const int right = D3;

// Buttons State
int lstate;
int rstate;
int state = 0;
int led = D0;

void setup() {

pinMode(left, INPUT);
pinMode(right, INPUT);
pinMode(led, OUTPUT);

Serial.begin(9600);
while (WiFi.status() != WL_CONNECTED) {
WiFi.begin(ssid, password);
delay(5000);
}
Serial.println("Connected");
digitalWrite(led, HIGH);
server.begin();
}

void loop() {
// Read Buttons
lstate = digitalRead(left);
rstate = digitalRead(right);

// Declare Task
HTTPClient http;
int httpCode;

if (lstate == HIGH && rstate == LOW) {
// Prevent Excess
if (state == 0) {
Serial.println("L");
// Load .php that writes to .txt
http.begin("http://website.com/flp/flp.php?state=1");
httpCode = http.GET();
http.end();
state = 1;
} else {
// Nothing
}
} else if (rstate == HIGH && lstate == LOW) {
if (state == 1) {
Serial.println("R");
http.begin("http://website.com/flp/flp.php?state=0");
httpCode = http.GET();
http.end();
state = 0;
} else {
// Nothing
}
} else if (lstate == HIGH && rstate == HIGH) {
// Zilch
} else if (lstate == LOW && rstate == LOW) {
// Nope
}

delay(100);
}

Arduino Doodle
// Flashing Light Prize (5) IoT Pacing
// VijeMiller

// Relay Pin
int relay = 2;
// Serial Data
char data;

void setup() {
Serial.begin(9600);
pinMode(relay, OUTPUT);
}

void loop() {
// Communication?
if (Serial.available() > 0) {
// Whad' It Say?!
data = Serial.read();
// Off?
if (data == 'F') {
digitalWrite(relay, HIGH);
}
// On?
if (data == 'U') {
digitalWrite(relay, LOW);
}
}
}

Processing Process
// Flashing Light Prize (5) IoT Pacing
// Processing to Bluetooth
// VijeMiller

import processing.serial.*;
Serial port;

void setup() {
println(Serial.list());
port = new Serial(this, "COM3", 9600);
frameRate(4);
}
void draw() {
// Internet Address .txt File
String onoroff[] = loadStrings("http://website.com/flp/flp.txt");
// Prints .txt File Contents
print(onoroff[0]);
if (onoroff[0].equals("1") == true) {
println("Flash");
port.write('F');
} else if (onoroff[0].equals("0") == true) {
println("Unflash");
port.write('U');
} else {
}
}

PHP-p-ing
<?php
$onoroff = $_GET["state"];
$textfile = "flp.txt";
$fileLocation = "$textfile";
$fh = fopen($fileLocation, 'w ') or die("Crap!");
$stringToWrite = "$onoroff";
fwrite($fh, $stringToWrite);
fclose($fh);
?>

Archive
https://hackaday.io/project/26022-flashing-light-prize-5-iot-pacing
http://flashinglightprize.com
https://sindrelindstad.com/projects/how-to-led-arduino-php-proc/
https://vid.me/vUrEh
A/C Vent Hack for Cities That Shd Fall
Providing that this site caters to the hacking of items so as to improve upon -- and being that I currently temporarily reside in a place clustered with archaic dwellings, I thought it generous in passing to relate a means to resolve for an engineering issue many likely suffer from when living in elder metropolises.

Numerous residents are required to dangle a/c units from their windows this time of year and often times the misalignment of windows, bcz the buildings were designed and constructed by cretins, results in inefficient distribution of air.


Here, as follows, is a method to improve upon the efficiency of your air conditioning by employing nothing more than scrap cardboard, a ruler, pencil and tape.

Realize that shd some one come across this, recognize the opportunity and subsequently are able to increase the efficiency of their a/c unit, resource use may be ever so slightly reduced and the planet, saved...ish.

Hackaday.io
https://hackaday.io/project/26019-ac-vent-hack-for-cities-that-shd-fall
TVShow 3X15 Flashing Light Prize (4) Arduino Horror
Bwahahahaha and ha.
[Sinistering Intensifies]


Ingredients
1. Arduino Uno
2. HiLetgo Pulse Sensor Module
3. 5V Relay
4. Heart (4$/eBay)
5. Blair Witch Project
6. 10K Pot
7. 1K Resistor
8. NPN Transistor

Notation(s)
1. Opted to disregard specialized code/software for the reasons of code-illiteracy -- the contradiction being that the native code for the pulse sensor blinks an LED. Meh.

2. Bcz the sensor is placed on a finger with very little to ensure consistent application, the analog values varied giving irregular peak values. To adjust per each application, we (me) added a pot to adjust the peak triggering value (high).

3. The Blair Witch Project is best served when watched alone. To accompany another is to give an identifiable secured surrounding relieving the immersive stresses permitted by the film's atmosphere. It is a superb horror film you nay saying butt holes!

Cardio Pulmonary Resketchiation
// Flashing Light Prize (4) Arduino Horror
// VijeMiller

int led = 13;
int relay = 2;
int pulse = A0;

int val;
int tot;
int nxt;
int high;

int potpin = A5;
int potval;

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

pinMode(relay, OUTPUT);
pinMode(led, OUTPUT);

// Get Comfortable
for (int i = 0; i <= 5; i++) {
digitalWrite(led, HIGH);
delay(500);
digitalWrite(led, LOW);
delay(500);
}

}

void loop() {

// Reset Value
tot = 0;

// Smoothing
for (int i = 0; i <= 25; i++) {
val = analogRead(pulse);
tot = val + tot;
delay(2);
}
nxt = tot / 25;
Serial.println(nxt);

// To Solve Pulse Reading Inconsistency
// Adjust the Relay Trigger Peak Value
potval = analogRead(potpin);
high = map(potval, 0, 1023, 520, 570);

if (nxt > high) {
digitalWrite(relay, HIGH);
digitalWrite(led, HIGH);
} else {
digitalWrite(relay, LOW);
digitalWrite(led, LOW);
}

delay(5);
}

Archive
https://hackaday.io/project/25916-flashing-light-prize-4-arduino-horror
http://flashinglightprize.com
https://vid.me/tmCw0
Arduino Vije Rev. 1.0
TVShow 3X14 Flashing Light Prize (3) Arduino Scat
Sparkfun sound detector triggered by the relay triggers the relay, rinse, repeat.
Skiddily bee bop ba doo bop skiddily dee bip boop bop, yeah.



Ingredients
1. Arduino Uno
2. Sparkfun Sound Detector
3. 5V Relay
4. NPN Transistor
5. 1K Res
6. (2) Candle Incandescent Bulbs
7. Cuhlness

Notation(s)
1. Special guest mouth hornist, Vije Miller -- the horniest.
2. Zappa dee doo blip blop biddily doo wap be zah.

Sketchity Zoopity Zow
// Flashing Light Prize (3) Arduino Scat
// VijeMiller

// Sound Detector Pins
#define PIN_GATE_IN 2
#define IRQ_GATE_IN 0
#define PIN_LED_OUT 13
#define PIN_ANALOG_IN A0

// Relay Pin
int relay = 7;

// Sound Value
int val;

// SparkFun Sound Detector Interrupt
void soundISR()
{
int pin_val;
pin_val = digitalRead(PIN_GATE_IN);
digitalWrite(PIN_LED_OUT, pin_val);
}

void setup()
{
// Testing
Serial.begin(9600);
// Sound Detector Pin Assignment
pinMode(PIN_LED_OUT, OUTPUT);
pinMode(PIN_GATE_IN, INPUT);
// Relay Pin Assignment
pinMode(relay, OUTPUT);
// Sound Decector Interrupt
attachInterrupt(IRQ_GATE_IN, soundISR, CHANGE);
}

void loop()
{

// Read Sound
val = analogRead(PIN_ANALOG_IN);
// Testing
Serial.println(val);
// If Sound Exceeds X
if (val > 55) {
digitalWrite(relay, HIGH);
delay(600);
digitalWrite(relay, LOW);
delay(200);
} else {
digitalWrite(relay, LOW);
}

delay(10);
}

Archive
https://hackaday.io/project/25869-flashing-light-prize-3-arduino-scat
https://www.flashinglightprize.com/
https://vid.me/FQyIO
TVShow 3X13 Flashing Light Prize (2) Rubber Ducky
Never...never going to give you up.
This attempt, how ever, shd have been.

Original project had intention of dispensing compressed air in bursts to disrupt the flow...I uh, do/did not have access to such spare equipment. I welcome another with shop to give it a shot.

Special guest hallucinated appearance by @RealSexyCyborg. If (pause) only.

One animal (human) was harmed in the making of this film.


Ingredients
1. Arduino Uno
2. Rubber Ducky
3. Servo
4. Vinyl Tubing
5. Water Fountain Pump
6. Exposed 120 Volts
7. 40W 120V Light Bulb
8. Salted Water
9. String

Notation(s)
1. Meh.

2. Minor adjustment to the servo delay would have drastically improved the flash rate -- how ever, timing (space use) and operational alterations tested one's patience beyond the threshold of interest (see Notation 3).

3. Moving on...

Archive
https://hackaday.io/project/25815-flashing-light-prize-2-rubber-ducky
https://vid.me/9srjI
TVShow 3X12 Flashing Light Prize (1) Arduino Wave Generator
Probable electrocution? Check.
Deadly noxious fumes? Inhaled.
KY Jelly? Lubricated.
Let's show this prehistoric bitch how we flash bulbs down town.



Ingredients
1. Arduino Uno
2. Micro Servo
3. 5V Regulator
4. (2) 10nf Cap
5. 12V Incandescent Bulb
6. Acrylic (Dollar Store Picture Frame)
7. 10K Potentiometer (Optional)
8. Table Salt or Baking Soda

Notation(s)
1. Discovered the miniaturization of our previous wave generator provided less opportunity for more visually amplified waves. Ended up with a beached wave...so...crap, another words. Tip; depth, shallows and angle of attack. Next FLP (2) project will approach things differently. Vodka and flames?!

2. Plain tap water is a poor electrical conductor. Added table salt and baking soda to increase conductivity. To what ratio? This much to this much by this many.

3. (Update) Attempted several further lever variations w/o any significant increase in wave pattern. Simply requires enlarged length and depth for greater motion...that's what she said.

Sketchy
// Flashing Light Prize (1)
// VijeMiller

#include <Servo.h>
Servo wave;

// Pot Analog Pin 0
int pot = A0;
// Delay Value
int val = 0;
// Servo Positions
int fro = 0;
int bac = 160;
int pos = 0;

void setup() {
Serial.begin(9600);
wave.attach(5);
wave.write(pos);
}

void loop() {
// Read Potentiometer
val = analogRead(pot);
// Print Value
Serial.println(val);
// Map Pot to Delay Value
val = map(val, 0, 1023, 0, 20);
// Print Value
Serial.println(val);
// Back
for (pos = fro; pos <= bac; pos += 1)
{
wave.write(pos);
delay(val);
}
// Forward
for (pos = bac; pos >= fro; pos -= 1)
{
wave.write(pos);
delay(val);
}
}

Archive
https://hackaday.io/project/25715-flashing-light-prize-1-arduino-wave-generator
https://www.flashinglightprize.com/
https://vid.me/gSap
TVShow 3X11 Arduino Darkest Timeline Bot



#SixSeasonsAndAMovie

Notation(s)
1. Adjusting to the new video-contraption i.e. smart phone, left one angle particularly poor and vocal audio equally as dismal. Inadequate tools remain inadequate. Regardless, the governing rule of this series remains stead fast; "Get this piece of shit off my desk top and let us move on..." Sigh.

2. Limitation to distance traveled observed in the video is not present in the sketch posted.

3. Our AI interface "Jacob" present in previous episodes was the go between for response to the auditory key words "no movie" triggering the cruel events that followed.

4. This was built for the sake of stupid; C minus.

5. Why the white boards?! The wheels (see HaD.io project logs) are made from card board and hot glue...they uh, did not do well on uneven worn wood floors.

Ingredients
1. Arduino Uno
2. HC-06 Bluetooth Module
3. SR06 Ultrasonic Sensor
4. 360 Degree Servo
5. Boring Regular Servo
6. Adafruit Neopixel Strip
7. 1000nf Cap
8. 47K Res
9. Cardboard

Cruel Code
// Darkest Timeline Bot
// VijeMiller
// SixSeasonsAndAMovie

#include <Servo.h>
#include <Adafruit_NeoPixel.h>

// Neopixel
#define PINPIXEL 6
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(3, PINPIXEL,
NEO_GRB + NEO_KHZ800);

// Sensor Values
Servo headservo;
Servo rollservo;
#define trigPin 9
#define echoPin 8
// Set Distance (cm)
int setdist = 40;

// Head Positions
int pos = 3;
int good = 3;
int evil = 158;
// Roll Positions
int forw = 75;
int halt = 90;
int back = 105;
int slow = 80;

// Bleu Cheese
char incom = 0;

void setup() {

Serial.begin (9600);

// Servo Pins
headservo.attach(5);
rollservo.attach(7);

// Set Start Position
headservo.write(good);
rollservo.write(halt);

// Sensor Pins
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);

// Load Neopixel
pixels.begin();
}

void loop() {

// Happy Blue
pixels.setPixelColor(0, pixels.Color(0, 0, 255));
pixels.setPixelColor(1, pixels.Color(0, 0, 255));
pixels.setPixelColor(2, pixels.Color(0, 0, 255));
pixels.show();

// Roll Bluetooth (Jacob)
if (Serial.available() > 0) {
incom = Serial.read();
if (incom == '1') {
cruel();
}
else if (incom == '2') {
cool();
}
else if (incom == '3') {
gloat();
}
}

// Sensor Sequence
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
// Centimeter Conversion
distance = (duration / 2) / 29.1;
// Print for Testing
Serial.print(distance); Serial.println(" cm");

if (distance > setdist) {
forward();
} else if (distance < setdist) {
backward();
} else {
}

delay(10);
}

void forward() {
rollservo.write(forw);
delay(1000);
rollservo.write(halt);
}

void backward() {
rollservo.write(back);
delay(1000);
rollservo.write(halt);
}

void cruel() {
// Black
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
pixels.setPixelColor(1, pixels.Color(0, 0, 0));
pixels.setPixelColor(2, pixels.Color(0, 0, 0));
pixels.show();
// Become Evil
for (pos = good; pos <= evil; pos += 1) {
headservo.write(pos);
delay(20);
}
delay(500);
// Evil Red
pixels.setPixelColor(0, pixels.Color(255, 0, 0));
pixels.setPixelColor(1, pixels.Color(255, 0, 0));
pixels.setPixelColor(2, pixels.Color(255, 0, 0));
pixels.show();
delay(1000);
rollservo.write(slow);
delay(5000);
// Murder
rollservo.write(halt);
cool();
incom = 0;
}

void cool() {
// Black
pixels.setPixelColor(0, pixels.Color(0, 0, 0));
pixels.setPixelColor(1, pixels.Color(0, 0, 0));
pixels.setPixelColor(2, pixels.Color(0, 0, 0));
pixels.show();
// Become Good
for (pos = evil; pos >= good; pos -= 1) {
headservo.write(pos);
delay(20);
}
incom = 0;
}

void gloat() {
rollservo.write(slow);
delay(5000);
rollservo.write(halt);
}

Archive
https://hackaday.io/project/25434-arduino-darkest-timeline-bot
TVShow S03E08 IoT Sit Counter
Once a luxury, sitting has now become an ailment. Have you yet wondered to just how many times in a day you sit or to what percentage of your day is consumed on bended knee? Making use of a resistance sensor and a NodeMCU ESP-12E, we are able to track our daily lethargy and display it in all of it's aggregated misery. Amend as needed.



Ingredients
1. NodeMCU ESP-12E
2. (2) LEDs
3. (4) 1K Resistor
4. Push Button
5. Slide Switch
6. 10K Pot

Butt-On State Code
// IoT Sit Counter
// Version 0.1
// VijeMiller

// NodeMCU ESP-12E 1.0
#include <ESP8266WiFi.h>

// WIFI Network Access
const char* ssid = "XXXXXX";
const char* password = "XXXXXXX";
WiFiServer server(80);

// ThingSpeak Access
char thingSpeakAddress[] = "api.thingspeak.com";
String APIKey = "XXXXXXXXXXX"; // API
const int updateThingSpeakInterval = 10 * 1000; // Interval
long lastConnectionTime = 0;
boolean lastConnected = false;
WiFiClient client;

// LEDs
int activeled = 13;
int wifiled = 12;

// Sensor
int sensor = A0;
int ssr = 0;
int sensorstart = 0;
int senres = 0;
int sensorstate = 0;

// Button
int button = 14;
int buttstate;

// Stats
int sitdown = 0;
int pretime = 0;
float dattime;
float runpert;

// States
int mainstate = 0;

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

pinMode(button, INPUT);
pinMode(activeled, OUTPUT);
pinMode(wifiled, OUTPUT);

digitalWrite(activeled, LOW);
digitalWrite(wifiled, LOW);

calibrate();
}

void loop() {

digitalWrite(activeled, HIGH);

// WIFI Button Pressed?
buttstate = digitalRead(button);

// WIFI Yes or No?
if (buttstate == HIGH) {
Serial.println("Connecting");
digitalWrite(wifiled, HIGH);

// Load WiFi
while (WiFi.status() != WL_CONNECTED) {
WiFi.begin(ssid, password);
delay(10000);
}
Serial.println("Connected");
server.begin();

// Calculate Minutes Seated
dattime = pretime / 60.0;
// Truncate
dattime = (int) dattime;

// Calculate Percent Seated
runpert = millis();
// Convert to Seconds
runpert = runpert / 1000.0;
// Convert to Minutes
runpert = runpert / 60.0;
// Convert to Percent
runpert = dattime / runpert;
// Truncate
runpert = (int) runpert;

// Update ThingSpeak
String sitfinal = String(sitdown, DEC);
String timefinal = String(dattime, DEC);
String runfinal = String(runpert, DEC);
updateThingSpeak("field1=" + sitfinal + "&field2=" +
timefinal + "&field3=" + runfinal);
delay(3000);

// Reset Data
sitdown = 0;
pretime = 0;
dattime = 0;
runpert = 0;

} else {

// No WIFI
digitalWrite(wifiled, LOW);

// Read Sensor
sensorstate = analogRead(sensor);

// Sitting?
if (sensorstate > sensorstart) {
// Delay For 5 Seconds To Confirm Sit
if (mainstate == 0) {
delay(5000);
mainstate = 1;
goto escape;
} else if (mainstate == 1) {
// Add A Sit
sitdown = sitdown + 1;
// Run While Sitting To Track Time
// 1 Second Per Loop
while (sensorstate > sensorstart) {
sensorstate = analogRead(sensor);
pretime = pretime + 1;
delay(1000);
}
// Reset State
mainstate = 0;
}
}
}

delay(1000);
digitalWrite(activeled, LOW);
delay(1000);
escape:
}

// Calibrate While Standing
void calibrate() {
for (int x = 0; x < 10; x++) {
ssr = analogRead(sensor);
sensorstart = sensorstart + ssr;
delay(100);
digitalWrite(activeled, HIGH);
}
// sensorstart Equals Average Standing Value
sensorstart = sensorstart / 10;
// Add Leniency
sensorstart = sensorstart + 200;
digitalWrite(activeled, LOW);
}

// ThingSpeak
void updateThingSpeak(String tsData) {
if (client.connect(thingSpeakAddress, 80)) {
client.print("POST /update HTTP/1.1\n");
client.print("Host: api.thingspeak.com\n");
client.print("Connection: close\n");
client.print("X-THINGSPEAKAPIKEY: " + APIKey + "\n");
client.print("Content-Type: application/x-www-form-urlencoded\n");
client.print("Content-Length: ");
client.print(tsData.length());
client.print("\n\n");
client.print(tsData);
lastConnectionTime = millis();
}
}

Archive
https://hackaday.io/project/25152-iot-sit-counter
https://thingspeak.com/channels/281292
TVShow S03E04X76 Arduino Back Scratcher Plotter
Digitally ditch the itch --



Currently embracing a sans-work shop and poverty driven cardboard kick for the gluttony of least-interesting of novelty projects now done solely for critical thinking posterity -- other wise known as boredom.

Unable to reach that nook and/or cranny? Open the Back Scratcher Plotter app on your mobile device and identify the spot where then the X/Y axis is sent via bluetooth to the Arduino Uno affixed to the BSP prototype (sly analogy for rubbish) which then actuates to your -- you know what? Stop wasting your time sitting there even reading this nonsense and go some where -- like Typhoon Lagoon!

Ingredients
1. Arduino Uno
2. Bluetooth Module
3. (2) Servos
4. Motor
5. Cardboard
6. String
7. Masking Tape
8. Power Supply
9. Pulley
10. MIT App Inventor

Back-end Code
// Back Scratcher Plotter
// @VijeMiller
// TVMiller.com

#include <Servo.h>
#include <Stepper.h>

// Scratcher
const int stepsrev = 32;
Stepper scratch(stepsrev, 2, 4, 3, 5);

// For Bluetooth Data
String readString, xaxisdata, yaxisdata;

// X Axis
Servo xaxis;
// Y Axis
Servo yaxis;

int xpos = 90;
int ypos = 90; // Stall
int stall = 90;
int yup = 75;
int ydown = 105;
int pos = 90;

void setup() {
Serial.begin(9600);
// Max(?) Speed
scratch.setSpeed(800);
xaxis.attach(6);
yaxis.attach(7);
xaxis.write(xpos);
yaxis.write(ypos);
}

void loop() {

// Bluetooth Data X-Y Axis String?
while (Serial.available()) {
delay(10);
if (Serial.available() > 0) {
char c = Serial.read();
readString += c;
}
}

if (readString.length() > 0) {
// Serial.println(readString);
// X-Y Axis Combined Sent (ex. 368124)
// First 3 Digits
xaxisdata = readString.substring(0, 3);
// Next 3 Digits
yaxisdata = readString.substring(4, 6);

// Convert String to Int
int prexpos = xaxisdata.toInt();
int preypos = yaxisdata.toInt();

// X-Y Based on 480x800 Phone Dimension & MIT App
// X 100 to 350 High 170 to 320 Low
// Y 220 to 560
// Map X to xPos (Actual)
xpos = map(prexpos, 100, 350, 120, 60);
// Map Y to yPos (Delay)
ypos = map(preypos, 220, 560, 0, 6300);

}

// Final Routine
if (readString.length() > 0) {
if (xpos > 90) {
for (pos = 90; pos <= xpos; pos += 1) {
xaxis.write(pos);
delay(40);
}
}
else if (xpos < 90) {
for (pos = 90; pos >= xpos; pos -= 1) {
xaxis.write(pos);
delay(40);
}
}
yaxis.write(yup);
delay(ypos);
yaxis.write(stall);
// Scratch 2048 Steps = 1 Revolution (2 Up/Down)
// Used Stepper bcz Spare Parts -- Sigh!
// 2048 x 7 Seconds = 14336 Steps
scratch.step(14336);

// Return to Start
if (xpos > 90) {
for (pos = xpos; pos >= xpos; pos -= 1) {
xaxis.write(pos);
delay(40);
}
}
else if (xpos < 90) {
for (pos = xpos; pos <= xpos; pos += 1) {
xaxis.write(pos);
delay(40);
}
}
yaxis.write(ydown);
delay(ypos);
yaxis.write(stall);
}

// Reset
readString = "";
}

Archive
http://hackaday.com/2017/05/07/anatomic ... atch-fever
https://hackaday.io/project/21527-arduino-back-scratcher-plotter
https://vid.me/K3Tx