Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
firofame authored Mar 3, 2022
1 parent 5589dde commit f6b7a58
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ React Native module for iOS & Android to receive compass heading

## Installation

`$ yarn add react-native-compass-heading`

`$ npx pod-install`
```shell
$ yarn add react-native-compass-heading
$ npx pod-install
```

## Usage
```javascript
Expand All @@ -15,9 +16,6 @@ import CompassHeading from 'react-native-compass-heading';
React.useEffect(() => {
const degree_update_rate = 3;

// accuracy on android will be hardcoded to 1
// since the value is not available.
// For iOS, it is in degrees
CompassHeading.start(degree_update_rate, ({heading, accuracy}) => {
console.log('CompassHeading: ', heading, accuracy);
});
Expand All @@ -28,6 +26,6 @@ import CompassHeading from 'react-native-compass-heading';
}, []);
```

# Acknowledgements
## Acknowledgements

Thanks to the authors of react-native-simple-compass for inspiration

0 comments on commit f6b7a58

Please sign in to comment.