https://github.com/rahulhaque/compass-react-native
A simple compass app built with react-native and react-native-sensors. Expo version - https://github.com/rahulhaque/compass-react-native-expo
https://github.com/rahulhaque/compass-react-native
android compass magnetometer react-native
Last synced: 10 months ago
JSON representation
A simple compass app built with react-native and react-native-sensors. Expo version - https://github.com/rahulhaque/compass-react-native-expo
- Host: GitHub
- URL: https://github.com/rahulhaque/compass-react-native
- Owner: rahulhaque
- License: mit
- Created: 2018-11-22T17:21:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-22T13:58:56.000Z (over 1 year ago)
- Last Synced: 2025-05-19T12:16:38.547Z (about 1 year ago)
- Topics: android, compass, magnetometer, react-native
- Language: JavaScript
- Homepage:
- Size: 2.78 MB
- Stars: 80
- Watchers: 3
- Forks: 12
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Compass React Native ðŸ§
A simple compass app built with react-native solely for learning purposes. Expo version can be found [here](https://github.com/rahulhaque/compass-react-native-expo). This project is overall an example for anyone trying to work with sensors/magnetometer in react native.
## Description
A very simple demonstration of how to use the device's built in `Magnetometer` sensor to identify the direction and calculate the degree of angle. This app makes use of the below packages -
- [React-Native-Sensors](https://github.com/react-native-sensors/react-native-sensors) for magnetometer data.
- [Low-Pass-Filter](https://github.com/uhho/LPF) to reduce sensor data fluctuation.
## Run the App
- Clone or download the repository.
- `cd` into directory.
- Run `npm install`
- Copy your `debug.keystore` from Android Studio to project `/android/app`
- Connect your device in `USB debugging` mode or use an Android emulator.
- Then run `react-native run-android`.
## To-do
- Build and test the app on iOS devices. The `/ios` directory does not contain any dependencies or config. (Yet to own a Mac 💻).
## Screenshots

## Info
Share the project and spare a 🟊 if helped.