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
// 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); }