This project aims to support the investigation of different vibration patters during co-design workshops.
Contributors: Giuseppe Sanseverino (technical development & hardware implemetnation), Philipp Fabritius (technical development & frontend), Lena Marcella Nischwitz (design of vibration patterns). Contributors affiliation: Professorship for Humans and Technology.
In the framework of the Bitplush project, a co-design workshop is organized to investigate the effect of different vibration patterns to map emotions of a user that is remotely activiating vibration motors inplemented in a plush toy.
In this repositiory the code written to control a vibration motor using a web app is shared.
A basic version of this project relying only on C++ and Arduino IDE can be found in the branch BasicImplementation.
1 x Arduino UNO R4 WiFi link
1 x Seeed studio Grove - Vibration Motor link
Breakout board & jumper cables
The connection scheme is shown in the picture below. Please note that in case you use a Grove Vibration Motor from Seeed Studio (as in this project) you will have 4 connections coming out of the breakout board of the motor, make sure to leave the NC not connected.

The Arduino code reported here is doing the following:
1- Connectiong Arduino board to a WiFi network (make sure that the board and the device from where the webapp should be operated are on the same board). IMPORTANT: Arduino Uno R4 WiFi requires a 2.4 GHz network.
2- Once the connection is established, the board will output an IP address in the Arduino IDE Serial Monitor. Copy and paste this in your browser to access the web interface.
3- The buttons in the interface are activating the vibration motor. In the picture below a screen capture of the web application.
Defining Different Vibration Patterns A custom startVibration function is created that takes the vibration duration in ms as input. Note that this motor only supports ON (HIGH) or OFF (LOW) states. Different patterns are achieved by varying durations or sequences of vibrations, with delays for pauses.
A custom function is created (startVibration) that requires as input the duration of the vibration in ms. Please note that this specific motor can only work in two status: ON (HIGH), or OFF (LOW). Therefore, the only way to generate different patterns is to provide different duration of the vibration or different sequences of vibrations. A delay can be defined to have pauses between two or more vibrations.
The code reported here only works for Arduino UNO R4 WiFi boards. It can be used with other UNO boards by adding external WiFi module and by removing the code parts that are making use of the integrated led matrix in the R4 WiFi board.
Pre-Built App: (currently not supported)
Building from Source:
- Clone this repository:
git clone https://github.com/giuseppesanseverino/VibrationMotorControl.git - Install Node.js from nodejs.org.
- Navigate to the project: cd VibrationMotorControl/vendor
- Install dependencies: npm install
- Build the app:
npm run build - The built files will be in
dist(e.g.,.exefor Windows,.dmgfor macOS). -> Currently only tested on win
- Flash the Arduino:
- Open
WebAppVibrationMotor_ArduinoUNO-R4.inoin Arduino IDE. - Upload to your Arduino UNO R4 WiFi.
- Note the IP address from the Serial Monitor. (If it shows 0.0.0.0 check your Router)
- Run the App:
- Launch the installed desktop app.
- The app starts a local server and opens a window with the control interface.
- Configure and Control:
- Enter the Arduino's IP address in the app's config section. (It is recommended to assign a fixed IP in router settings)
- Test connectivity.
- Use the buttons to trigger predefined vibration patterns or create custom ones.
- The app communicates directly with the Arduino over the network (It just needs power)