Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Use Native Device Sensors

Felgo allows you to access various device sensors, with the Qt Sensors QML Types.

Here is an example how to read from the Accelerometer sensor. You can tilt your phone forward and backward to see the value changing along the Y-axis:

 import Felgo 3.0
 import QtQuick 2.0
 import QtSensors 5.9

 App {

   NavigationStack {

     Page {
       title: "Hello Felgo"

       AppText {
         anchors.verticalCenter: parent.verticalCenter
         text: "Accelerometer Y " + accelerometer.reading.y
       }

       Accelerometer {
         id: accelerometer
         active: true
       }
     }
   }
 }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded