A high five counter.
There are two pieces to Slappo:
- The Arduino polls the bend sensor every 20 frames.
- If the bend being sensed has increased by more than 250 bend units, and a slap hasn't happened within the past 500 milliseconds, we have a slap.
- It sends the slap as an event to Particle.
- Particle sends the slap to the browser.
The browser view is created using node / Parcel.
- The browser listens to Particle for slap updates.
- When it gets an update, it increments a counter.
- You can run the browser with
npm run dev
I'm not completely positive of the make/model of my bend sensor. It has three wires for ground, 3v & signal. Its bend range appears to go between ~2000-3000 with 2210 being its resting value.
The build process is looking for:
PARTICLE_USER
PARTICLE_PASS
- Particle Photon
- Bend Sensor, providing signal to A0 on the Photon. I found mine at a local surplus store.
- Tiny Breadboard