-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some questions about the RTIMUHal class #12
Comments
Hello, HALRead without register is a work around for some specific sensors, such as the HTU21D, etc., that do not need to specify the register address to read the measurement:
By the way, is the I2Cdev.cpp from RTIMULib2-Teensy? you can put the source code here |
Hello.
Only it copied and started working.
is quite inconvenient, and my |
Can I ask you some more questions, not on the same topic, but partly on
Still, it uses the
I would be grateful for your help. |
Hello, sorry for the late reply. In your case on embedded platform, I think you can directly change the default setting in void RTIMUSettings::setDefaults() function, line 475 of RTIMUSettings.cpp |
The code is not designed for microcontrollers because the driver and controller of SPI/I2C can be very different from vendors, and there is no standard abstract layer, like POSIX, for ease of porting. |
Thank you @HongshiTan for responding to the request for help.
The code compiles fine, I wrote a python script that parses the File code
File code
Even when I explicitly specify the
I still get a message in the serial port
I will continue to figure it out and add my files.
Well, the second task is to find a way to connect sensors via Does the second version of the library have the ability to choose between an |
A few more experiments with the
The code compilation itself is without errors and problems, but after a hardware reset, the
But this is a problem of the I had to use version, and I
Also, I divided the code into two parts to compile without using the
Please note that in some places I use a link to settings, and in others I don't.
I get the following output to the serial port:
This is a completely different conclusion, indicating that the code is working, but there is no connection established with the sensors via the |
Hello, brightproject It should be fine to hardcode the IMU settings by modifying the default configuration directly. You can likely ignore the log output about the missing ini file. As for the ESP32-related issues, sorry, but I’m unable to assist—both because I don’t have the hardware to reproduce the problem and I’m not get into the details with the specifics of their driver code. I hope you understand. |
Could you suggest a solution for working in this library with sensors via the |
The HAL class abstract spidev is over the POSIX device interface. If you want it to work in the microcontroller, you need either replace all SPI operations in the HAL with those specified by your driver. or ensure that your SPI driver supports all POSIX operations, including the |
I managed to compile firmware for both
I also managed to start the |
Hello @HongshiTan
I'm using code from another repo written for
teensy
, and I rewrote it for Arduino and compiling it forstm32f411
.Unfortunately for me, there is no way to discuss code and stuff in this repo.
In the repository
there is such a possibility, but the RTIMUHal class is a little different, or rather more functional and advanced, but the meaning is the same.
I'm wondering what the case-insensitive read functionality is used for?
Actually, I had a problem with compilation when the code had such a strange reading initialization:
I2Cdev::readBytes(slaveAddr, regAddr, length, data, 10)
which I replaced with:
I2Cdev::readBytes(slaveAddr, regAddr, length, data)
And also had to add a new function to the library
I2Cdev.h
andI2Cdev.cpp
static int8_t readBytes(uint8_t devAddr, uint8_t length, uint8_t *data, uint16_t timeout=I2Cdev::readTimeout, void *wireObj=0)
;But this is not used anywhere in the code, which is why it caused strangeness.
Can someone tell me what this is used for?
I mean, when is
regAddr
not needed?P.S. Perhaps this issue can be converted into discussions?
The text was updated successfully, but these errors were encountered: