05-29-2021 06:55
05-29-2021 06:55
So im just beginning to learn when it comes to scripting and code. What I have to come to learn is that for a Fitbit device to create an app the script should begin with a folder structure which appears as so
/app/ /common/ /companion/ /resources/ /settings/
Lets say I want to create an app which utilizes the barometer sensor which is labeled in the list of SDK sensors. When I research the barometer sensor I found some code that is used to obtain latest reading from the barometer which looks like this
import { Barometer } from "barometer"; if (Barometer) { const barometer = new Barometer({ frequency: 1 }); barometer.addEventListener("reading", () => { console.log(`Pressure: ${barometer.pressure} Pa`); }); barometer.start(); }
So would I plug in that code in between the two slashes where it says "/app/"
If anybody has any experience with creating apps id appreciate the input.
05-29-2021 13:25