Requesting accelerometer help
Good evening,
I have searched the internet for a very simple example of QT accelerometer practices using the 5530, however I can only find examples using graphics and physics, and it is difficult to see exactly what is needed.
I am simply wanting 3 lineEdits displaying live X, Y & Z data.
Is anybody able to point me to a "accelerometers for dummies" version or piece together a simple example?
Many thanks for any help on this.
Re: Requesting accelerometer help
[url]http://doc.qt.nokia.com/qtmobility-1.0/qaccelerometer.html[/url]
[url]http://doc.qt.nokia.com/qtmobility-1.0/qaccelerometerreading.html[/url]
[url]http://qt.gitorious.org/qt-mobility/qt-mobility/trees/master/examples/sensors/show_acceleration[/url]
Re: Requesting accelerometer help
Thats brilliant, thanks.
So how would you get the XY&Z out of there and into variables so I can work with them on slightly more familiar ground?
Basically I'm just wanting to compare each reading against the next, and if its different (within a certain threshold), put a message on the screen.
Thanks, as you can probably tell I'm rather new to this, but loving it all the same!
[QUOTE]class AccelerometerFilter : public QAccelerometerFilter
{
public:
bool filter(QAccelerometerReading *reading)
{
qDebug() << "acceleration: "
<< QString().sprintf("%0.2f %0.2f %0.2f",
reading->x(),
reading->y(),
reading->z());
return false; // don't store the reading in the sensor
}
};[/QUOTE]
Re: Requesting accelerometer help
[url]http://wiki.forum.nokia.com/index.php/Qt_Mobility_example_application:_Fall_Detector[/url]
Re: Requesting accelerometer help
A bit simpler example
[url]http://qt.gitorious.org/qt-mobility/qt-mobility/trees/master/examples/sensors/show_acceleration[/url]