This guide walks you through the full process of recording tactile sensor data using the WiReSens Toolkit—from initial setup and device connection to data capture and visualization.
-
Install Python (version 3.10 or later) Download the latest version of Python from: 👉 https://www.python.org/downloads/
⚠️ Make sure to check the box that says "Add Python to PATH" during installation. -
Install required Python packages In your terminal or command prompt, navigate to the project root and run:
pip install -r requirements.txt -
Create a folder for recordings Inside the project’s root directory, create a folder to store your recordings:
mkdir recordings
-
Plug in your microcontrollers
Depending on how your system is configured to transmit data, follow the appropriate instructions:
-
If the transmitter sends data via USB: → Connect the transmitter directly to your computer via USB.
-
If the transmitter uses ESP-NOW: → Connect the receiver to your computer via USB. → The transmitter can be powered by USB or a LiPo battery.
-
If the transmitter uses WiFi or Bluetooth: → The transmitter can operate untethered (powered via battery).
-
If the transmitter has just been flashed or reconfigured: → You must connect it to your computer over USB at least once to complete configuration.
-
-
Identify your device’s serial port
WiReSens uses JSON configuration files to reference sensor devices by their serial port. To auto-detect and assign the correct port, run:
python autoDetectPort.pyThis script scans available serial ports, identifies known microcontrollers, and updates the relevant JSON config files.
📝 If the script fails to detect your device, follow the manual method below to find your serial port.
-
Linux:
dmesg | grep ttyLook for entries like
/dev/ttyUSB0or/dev/ttyACM0. -
macOS:
ls /dev/tty.*You’ll see ports like
/dev/tty.usbserial-110or/dev/tty.usbmodem14101. -
Windows:
- Open Device Manager
- Expand Ports (COM & LPT)
- Look for something like
COM5
-
-
Update your configuration file
Open the relevant JSON config file from the
configs/folder. Locate the"serialPort"field under the"sensors"section and update it with your device’s port. If the autoDetectPort method works it will have updated this config file automatically."serialPort": "/dev/ttyUSB0"
💡 On Windows, this would be something like
"serialPort": "COM5"
-
Start the backend server
In the root directory, run:
python startBackend.py -
Open the web interface In your browser, go to: 👉 https://wi-re-sens-web.vercel.app/
-
Load your sensor configuration
- Click Load Config
- Select the appropriate configuration file (e.g., from
configs/)
-
Program the device (if necessary)
-
If this is your first time using the device, or if you've re-flashed it, you may need to configure it:
-
Go to Device Panel
-
Click the ✎ (Edit icon)
-
Click Program Device
-
A message saying "Programmed!" will appear on success
-
✅ If you received a plug-and-play kit, this step is usually already done unless you're reconfiguring.
-
-
Start recording
- Click Record
- Visualization and recording will begin simultaneously
- Data will be saved in the
recordings/folder in HDF5 format
You can record data headlessly (e.g., for batch experiments or logging) using the following method:
-
Open
recordOnly.py -
Update line 2 to point to your config file:
myReceiver = MultiProtocolReceiver("./configs/oneGloveSerialReceiverLeftSmall.json")
-
Run the script:
python recordOnly.py
You can replay a tactile recording using the spatial visualization tool.
Run the createViz.py script with your desired inputs. For example:
create_video(
left_h5="./recordings/recentLeft.hdf5",
mapping_json="point_weight_mappings_large.json",
svg_file="voronoi_regions_large.svg",
output_mp4="glove_viz.mp4",
use_normalized=False
)🎥 This will render a video (
glove_viz.mp4) showing your tactile data projected over a spatial layout.
All tactile data is stored in .hdf5 format.
To extract and analyze it, use the tactile_reading function in utils.py:
frames, num_frames, timestamps = tactile_reading("recordings/myRecording.hdf5")frames→ A NumPy array of shape(frame_count, rows, cols)with pressure valuesnum_frames→ Total number of framestimestamps→ Unix timestamps (in seconds) for each frame