Things used in this project

Hardware components:
Adafruit Perma-Proto Breadboard Quarter Size
×1
Adafruit industries ada161 image 75px
Photo resistor
×1
Attiny85
Microchip ATTiny85
×1
2n222 NPN Transistor
×1
Mini Vibration Motor
×1
LiPoly battery (105 mAH)
Any small size LiPo battery will do
×1
JST Connector
×1
Solid Core Wire
Only needed for hooking up components
×1
Resistor 10k ohm
Only one is needed
×1
DIP-8 Socket
×1
A000066 iso both
Arduino UNO & Genuino UNO
Needed only for programming the ATtiny
×1
Capacitor 10 uF
Needed only for programming the ATtiny
×1
Software apps and online services:
Autodesk circuits.io
Hand tools and fabrication machines:
Hy gluegun
Hot glue gun (generic)
09507 01
Soldering iron (generic)

Custom parts and enclosures

Base.stl
Cup.stl
Fusion Archive
This is a Fusion 360 project archive that you should be able to edit in Fusion 360.
prank_cup_4W4E3bq5h8.f3d

Schematics

circuits.io

Code

VibratingCup.inoArduino
//Written by Alex Wulff - www.AlexWulff.com
#define LIGHT_PIN   3
#define VIB_ONE     0
#define VIB_TWO     1
#define THRESHOLD   500

void setup() {
  pinMode(VIB_ONE, OUTPUT);
  pinMode(VIB_TWO, OUTPUT);
}

void loop() {
  if (analogRead(LIGHT_PIN) > THRESHOLD) {
    digitalWrite(VIB_ONE, HIGH);
    digitalWrite(VIB_TWO, HIGH);
  }

  else {
    digitalWrite(VIB_ONE, LOW);
    digitalWrite(VIB_TWO, LOW);
  }
  
  delay(10);
}

Credits

Dsc 0358 aupidjdwxg
Alex Wulff
1 project • 39 followers
I'm an 18-year-old maker from Upstate New York. I love Arduino, embedded systems, 3D printing, and iOS development. www.AlexWulff.com
Contact

Comments