Build a Physical Activity Meter With Protobject

by Protobject in Teachers > 7

77 Views, 0 Favorites, 0 Comments

Build a Physical Activity Meter With Protobject

ezgif.com-apng-to-gif-converter.gif

In this project, we will create a simple physical activity meter using Protobject, a web-based platform.

Protobject lets you use your smartphone's accelerometer to detect movement and track your physical activity, all without needing to install any software on your device.

Using Protobject's visual programming interface, you will create a program to measure and display your activity level directly on your screen.

Supplies

  1. 1 Smartphone (used for detecting movement)
  2. A Computer or Another Smartphone (for displaying the motion indicator)
  3. Internet Access (for using the Protobject platform online)

Access Protobject Website

msedge_4Mtf7L1y49.png

Open the Protobject platform at https://app.protobject.com using Chrome or any Chromium-based browser (e.g., Edge, Opera).

You can start using Protobject immediately, without the need to sign up or log in.

Add Devices

msedge_kvFLXRCQco.png
msedge_nlCVdkQEiO.png
msedge_PQsgxyBzoZ.png
  1. Add the Motion device by scanning the provided QR code with your smartphone. This device acts as a motion sensor and can be placed inside your pocket to detect movements!
  2. Add the WriteDraw device. You can scan the QR code with another smartphone, or click "Open in this window" if you want to view the indicator on your computer.

Program the System

msedge_GrU81jdsjn.png

How it works

  1. The system uses the accelerometer to detect movement through the Motion device.
  2. It tracks the movement over time, storing the accumulated data in a variable.
  3. Every 300 milliseconds, the code updates the activity level by evaluating the amount of movement detected in the previous cycle.
  4. This updated value is then displayed on the screen using the WriteDraw device, which shows the activity level in real-time.
  5. The accumulated movement is reset at the end of each cycle, ready for the next evaluation.
  6. This creates a continuous loop that tracks and displays physical activity.




Make it easy!

  1. The code is shown in the image, but you can also view it in more detail using this link. Comments are included to provide clarification when needed.
  2. Additionally, you can open the project directly in Protobject to avoid manually composing it!

Test Your Project

Press the play button and move your smartphone around to simulate physical activity.

The display will update in real-time to show your activity level.

Optional Improvements

  1. Adjustable Sensitivity: Add a Knob device to allow users to adjust the sensitivity of the accelerometer.
  2. Track Activity Over Time: Use the DataRecorder device to log movement data, which can be exported to Google Sheets or Excel for further analysis.

Congratulations!

By using Protobject’s web interface and your smartphone’s built-in sensors, you’ve created an interactive physical activity meter without needing to install anything.

Protobject provides an easy and fun way to explore physical computing projects with minimal setup.

You can enhance this project further by adding features such as adjustable sensitivity or movement analysis.

Happy building!