You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to detect the direction when I move it (left, right, up and down)?
I installed react-native sensor npm install react-native-sensors --save.
**import { accelerometer } from "react-native-sensors";
const subscription = accelerometer.subscribe(({ x, y, z, timestamp }) =>
console.log({ x, y, z, timestamp })
);**
I tested with the above code it works smoothly.
But, how can I detect the directions?
How can I detect the direction when I move it (left, right, up and down)?
The text was updated successfully, but these errors were encountered:
How to detect the direction when I move it (left, right, up and down)?
I installed react-native sensor npm install react-native-sensors --save.
**import { accelerometer } from "react-native-sensors";
const subscription = accelerometer.subscribe(({ x, y, z, timestamp }) =>
console.log({ x, y, z, timestamp })
);**
I tested with the above code it works smoothly.
But, how can I detect the directions?
How can I detect the direction when I move it (left, right, up and down)?
The text was updated successfully, but these errors were encountered: