Comments (1)
Jeśli chodzi o wykorzystanie przerwania DRDY to najlepiej wykorzystać funkcje attachInterrupt
:
pinMode(DRDY_PIN, INPUT_PULLUP);
attachInterrupt(DRDY_PIN, isr, FALLING);
Następnie w procedurze obsługi przerwania isr
ustawiać flagę, potem gdzieś w kodzie wykonywać odczyt danych z HMC5883L jeśli flaga została ustawiona.
Jeśli zależy Ci na odczycie z maksymalną prędkością 160 Hz
to po każdym odczycie danych należy ponownie ustawić tryb Single-Measurement Mode
w rejestrze Mode Register (0x02)
magnetometru, ponieważ po każdym wystawieniu DRDY
urządzenie przechodzi w tryb Idle Mode
.
from arduino-hmc5883l.
Related Issues (11)
- extra semicolons HOT 1
- mg per digit should be 0.73 instead of 0.073
- 'HMC5883L' does not name a type HOT 1
- problem with esp32
- No data printed in serial monitor while using esp32
- App hangs after a while
- No need to wait after Wire.requestFrom() and no Wire.beginTransmission() or endTransmission() should be used with Wire.requestFrom().
- Not working for ARDUINO DUE BOARD
- m_pi HOT 1
- Library for ADXL345 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduino-hmc5883l.