SIOT, GovTech
Published in

SIOT, GovTech

Developing an End-to-End Feature at SmartGym

Author: https://medium.com/@hengkaiz

Overview

Back in mid-2021, I had the privilege to intern with GovTech’s SIOT SmartGym team.

I worked on an end-to-end feature that allows users to synchronise their wearables’ data with the SmartGym application. The motivation to implement this feature was to provide additional workout information (such as heart rate, steps taken etc.) that the current SmartGym sensors are unable to provide.

The first wearable that we decided to support is the Tempo 3C watch, one of the fitness trackers given out for the National Steps Challenge.

Fig 1. Pipeline of wearable feature

Whenever a user logs onto a SmartGym tablet, the tablet will automatically connect and retrieve data from the user’s wearable. The data is then processed and uploaded to the backend — where it is synchronised with the user’s workout data. Subsequently, whenever the user accesses the Recent Workouts page, they will be able to view additional metrics provided by the wearable, such as average heart rate, total steps taken, and average stride length.

Fig 2. Additional metrics provided by wearable data

Steps Taken to Develop the Wearable Feature

1. Connecting and extracting information from wearable

Fig 3. Flutter test app

To familiarize myself with Flutter, I first built a simple app with the following functions:

  • Scan and connect to nearby Bluetooth devices
  • Send commands to the wearable
  • Capture responses from the wearable

2. Uploading code to backend

After coding out the basic functions to retrieve data from the wearable, I started working on the backend. I created several RESTful API endpoints that allowed the SmartGym application to send unprocessed wearable data to and retrieve synchronised wearable data from the backend. Synchronisation of wearable data with workout data was done in the backend to reduce the load on the tablet, both in terms of transfer and parsing time.

3. Integrating wearable feature into SmartGym App

Fig 4. Wearable feature in SmartGym app

The last step of this process was to integrate the completed feature into the SmartGym application. As per traditional software development, the integration process is rarely smooth and seamless. I spent countless days trying to fix the code so that it could finally integrate properly.

Thankfully, with the guidance from my mentors, Joaquin and Kelvin, as well as feedback from the rest of the team, I managed to successfully integrate and deploy the wearable feature in SmartGym’s Research Lab.

Takeaways

Unlike other internships where interns might work on low-risk, isolated projects, interns at SmartGym are treated like full-time employees. I got to plan features with the team and work on meaningful projects that are deployed to production.

At SmartGym, everyone is very supportive. Whenever I have a question, I could go to anyone’s desk or hop on an online meeting with them to have a short discussion. Being able to easily consult different engineers played a key role in helping me understand the complex codebase and system quickly.

Beyond working on my main task, I also had the opportunity to pursue and work on other projects that interested me. Having mentioned to my team lead, Chin Hiong, that I am interested in learning more about frontend development, he assigned me to help Kelvin, our frontend engineer, to help refactor and scale up SmartGym’s codebase.

My internship at SmartGym was nothing short of fulfilling. The coffee breaks with my coworkers, the skills that I picked up and the indescribable feeling of witnessing my work being deployed to production made this summer one that I will remember for years to come.

Find more about GovTech’s technical products and solutions on Singapore Government Developer Portal.

--

--

--

Sensors and Internet of Things (SIOT), GovTech Capability Centre

Recommended from Medium

Takeaways From WordCamp Grand Rapids

What is Hadoop actually and why it is so important?

What People Get Wrong About DevOps

Rabbit MQ Vs Active MQ

Use flask to build a website platform to run Machine Learning tasks parallelly.

Developing a Core Metrics Comparison report

WFH as a Developer (after 1 year)

What to Remember When Architecting Your IIoT Solution

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
HengKai

HengKai

More from Medium

Frugal approach to scaling

Partitioning in informatica PowerCenter

Getting Traction with TRACTIAN style: A practical guide to Product and Culture

Skiing the Steepest Slope: Engineering at a FinTech