Comments (9)
i am using SWire instead of Wire so will do the needed changed and let you know after test latter today
from gy521.
It is rather late now, will check later this week - I did not encounter this problem yet.
Solution should be to add a wakeup() call in begin()
something like
bool GY521::begin()
{
_wire->begin();
if (isConnected())
{
return wakeup();
}
return false;
}
ESP -begin() too of course.
from gy521.
Problem might be caused by the SLEEP or the CYCLE bit being set.
Can you read the register and post its content (hex value?)
from gy521.
(TEMP_DIS = disable temp sensor, seems less relevant)
from gy521.
Will surely post in sometime. Not near laptop now and it's 1:35am here
And yes I also think it's related to sleep / cycle bit
I have tested this with 3 different modules and all ware same
from gy521.
If time permits I make a PR tomorrow. Have a good night!
from gy521.
started with PR in https://github.com/RobTillaart/GY521/tree/develop
(also updating build-CI ++)
update: build successful,
Can you please verify if this branch for you works as expected?
from gy521.
I noticed that in the examples I used a loop around wakeup()
That might be a solution if the single wakeup() call is not enough.
Wire.begin();
delay(100);
while (sensor.wakeup() == false)
{
Serial.print(millis());
Serial.println("\tCould not connect to GY521");
delay(1000);
}
from gy521.
I noticed that in the examples I used a loop around wakeup() That might be a solution if the single wakeup() call is not enough.
Wire.begin(); delay(100); while (sensor.wakeup() == false) { Serial.print(millis()); Serial.println("\tCould not connect to GY521"); delay(1000); }
This works fine.
from gy521.
Related Issues (20)
- Elaborate unit tests
- Examples use GetAngle instead of GetAccel HOT 2
- Enabling the interruptions HOT 6
- Calibration never zeros out HOT 7
- Add support for ESP32 Wire
- Add multiWire support
- improve performance + precision
- improve precision HOT 1
- swire support HOT 27
- version number incorrect in .h and .cpp (minor)
- getting position from distance = acceleration * time HOT 7
- Raw data HOT 1
- getYaw, getPitch and getRoll go past 360 degrees HOT 19
- small bugfix in readCalibration HOT 3
- How can I get data from 2 sensors? HOT 4
- Shifted pitch and yaw measurement HOT 19
- missing ; in .h file HOT 2
- Bad results with Teensy 3.2 HOT 4
- getRegister can return an error which is not handled properly 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 gy521.