Control a vibration motor

Control a vibration motor

Physical computing - Master the challenges and experience how to connect the physical and virtual world

Medium

30 mins

from 10 years on

1What you need
- vibration motor - potentiometer - 5 wires
2Challenge

Connect an adjustable resistor (potentiometer) and a vibration motor to the Calliope mini. The motor is controlled by turning the potentiometer.

3Solution

Code

Note: A dimmed LED and a vibration motor are both analog outputs. Therefore the code is exactly the same as in the challenge "Dimming a light".

Electronics

  • vibration motor (+/-)!
  • black cable: GND (-)
  • red cable: analog output (P2)

potentiometer

  • outer leg: GND (-)
  • middle leg: analog intput (P1)
  • outer leg: VCC (+)

This text as well as the image is published under a CC BY-SA 4.0 DE license popup: yes. It was originally published in German popup: yes by phzh popup: yes and translated into English by the Calliope team.