Hardware components | ||||||
![]() |
| × | 1 | |||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
| × | 1 | ||||
Hand tools and fabrication machines | ||||||
|
If you ever wanted to automate tapping on a surface or a button for a defined number and with a defined weight and shape this instruction might be of interest for you!
We build this tapping machine to simulate the effect of repeated stylus tapping on different surfaces. How many taps are possible before the material starts to deform or get scratches?
Thanks to the boring socket different stylus and/or tap shapes can be mounted easily.
Since the setup is based on a Particle Photon you could also use the machine to link an event from the internet via IFTT or webhook with the physical world ... e.g. by tapping on a physical button or even an Internet button again?
This slightly modified sketch translates a fingertap into a machine tap:
Tap Tester Machine
ArduinoRuns a predefined number of taps (e.g. 1.000) with a predefine frequency automatically (e.g. 2Hz)
/* ****************************************************************************************
Demo project to control an Automatic Tap Tester via Particle Photon/Relay Shield/Lift
magnet/Guard Rail & Paperino ePaper screen. More details can be found here:
https://www.hackster.io/projects/958d9c
We invested time and resources providing this open source code. Please support Paperino
open source hardware by purchasing this product @Crowdsupply @Paperino @Plasticlogic
@Watterott, https://www.crowdsupply.com/robert-poser/paperino
Created by Marco Mews, Robert Poser, Nov 3rd 2017, Dresden/Germany
**************************************************************************************** */
#include <Adafruit_GFX.h>
#include <PL_microEPD.h>
#include <RelayShield.h>
#define EPD_RST A0
#define EPD_BUSY A1
#define EPD_CS A2
#define TAP_NBR 1000 // Number of Taps
#define TAP_DELAY 500 // Tap delay in ms
RelayShield myRelays;
PL_microEPD display(EPD_CS, EPD_RST, EPD_BUSY);
int i=0; // Tap counter
int led1 = D7;
void setup() {
pinMode(led1, OUTPUT);
pinMode(WKP, INPUT_PULLDOWN);
myRelays.begin();
myRelays.on(1);
SPI.begin(); // SPI-Bus initialisation
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV4);
display.begin(); // Paperino ePaper initialisation and refresh screen
display.setTextSize(4);
}
void loop() {
if (i<TAP_NBR){
if (myRelays.isOn(1)) // myRelays.isOn(1) will return TRUE if relay 1 on and FALSE if it's off
myRelays.off(1); // myRelays.off(#) will switch relay # off
else{ // If it wasn't already on, then turn it on
myRelays.on(1); // myRelays.on(#) will switch relay # on
digitalWrite(led1, HIGH);
delay(50);
digitalWrite(led1, LOW);
i+=1;
display.clear();
display.setCursor(4,16);
display.print(i);
display.update(EPD_UPD_MONO);
}
delay(TAP_DELAY); // Tape delay
}
else {
display.setTextSize(2);
display.clear();
display.setCursor(4,20);
display.print(i);
display.print(" taps");
display.setCursor(4,35);
display.print("done!");
display.update(EPD_UPD_MONO);
delay(5000);
myRelays.off(1);
System.sleep(SLEEP_MODE_DEEP);
}
}
Tap Tap Machine
ArduinoTranslates a tap of your finger into an automatic tap with with a defined surface, weight & height. Not sure what at this point for what this could be useful for.
/* ****************************************************************************************
Demo project to control an Automatic Tap Tester via Particle Photon/Relay Shield/Lift
magnet/Guard Rail & Paperino ePaper screen. More details can be found here:
https://www.hackster.io/projects/958d9c
We invested time and resources providing this open source code. Please support Paperino
open source hardware by purchasing this product @Crowdsupply @Paperino @Plasticlogic
@Watterott, https://www.crowdsupply.com/robert-poser/paperino
Created by Marco Mews, Robert Poser, Nov 3rd 2017, Dresden/Germany
**************************************************************************************** */
SYSTEM_MODE(SEMI_AUTOMATIC);
#include <Adafruit_GFX.h>
#include <PL_microEPD.h>
#include <RelayShield.h>
#define EPD_RST A0
#define EPD_BUSY A1
#define EPD_CS A2
#define ACC_CS D6
RelayShield myRelays;
PL_microEPD display(EPD_CS, EPD_RST, EPD_BUSY);
BO_BMA250 accel(ACC_CS);
int i=1; // Tap counter
int led1 = D7;
void setup() {
pinMode(led1, OUTPUT);
pinMode(WKP, INPUT_PULLDOWN);
myRelays.begin();
myRelays.off(1);
SPI.begin(); // SPI-Bus initialisation
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV4);
display.begin(); // Paperino ePaper initialisation and refresh screen
display.setTextSize(4);
accel.begin();
accel.activateTapOnInt1();
}
void loop() {
if (digitalRead(WKP)==HIGH) { //if tap on paperino then switch relay on & off once
myRelays.on(1);
digitalWrite(led1, HIGH);
delay(500);
myRelays.off(1);
digitalWrite(led1, LOW);
display.clear();
display.setCursor(4,16);
display.print(i);
display.update(EPD_UPD_MONO);
i+=1;
accel.clearLatchedInt1();
}
}
Thanks to Marco Mews.
Comments
Please log in or sign up to comment.