-
-
Notifications
You must be signed in to change notification settings - Fork 350
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
Adds support of LSM6DS33 IMU to TX16S via AUX1 port #617
Conversation
…option -DIMU_LSM6DS33=YES the std. serial USART3/AUX1 functionality is changed to I2C2 bus. The temperature, gyro and linear acceleration values of LSM6DS33 are sampled and displayed at radio analogs dialog screen in SI-units.
Using "*_B1_*" for first logical I2C bus and "*_B2_*" for second logical I2C bus (instead of less clear I2C and I2CX).
возможно это добавить "последовательный USART3 / AUX1 будет преобразован во вторую шину I2C" в jumper t16? если да - то можно попробовать вписать на эту шину touch screen для аппаратный модификаций. |
Hi Stinky80, Jumper T16 does not configure any pins for I2C yet, but the same USART3 RX and TX pins (PB10, PB11, Pin 90 and Pin 91 on STM32F429BIT6) can be used for Jumper T16 for I2C2 as well. It would also be possible to have touch screen AND IMU on the same I2C bus, so both would theoretically work, assuming there is a mechanically fitting touch screen with GT911 for Jumper T16. |
Привет Rotorman. Теоретически чуть позже можно сделать модуль-переходник для подключения сенсора tx16s (gt911) и акселерометра на шине i2c . места над процессором хватает для ещё одной платы под отсеком батареи. Можно использовать конфигурацию tx16s по калибровке сенсора и размещению коннектора. Только мне надо точные размеры платы tx16s. Увы у меня нет RadioMaster:( когда Я купил t16 RadioMaster ещё даже не выпустили. |
Так-же думаю можно на дополнительном контроллере сделать вилку... Имею ввиду дополнительный контроллер на 2 порта uart для AUX2 (usart6) для одновременного использования frsky Bluetooth и GPS . только думаю надо будет добавить запросы к порту что мы вызываем в данный момент. Очень интересно использовать внутренний GPS как позиционарование пилота и обработкой failsafe и return телеметри ReturnToHome. Нам надо считывать данные с GPS и в то-же время отдавать данные на внешнюю Bluetooth телеметрию |
@Stinky80 - it would be sweet if you could post in English, so that others can follow as well. Basically, what you want is to get RM TX16S functionality in T16. Why not just use TX16S mainboard and touchscreen? This PR tries to offer an easy solution for IMU, without requiring internal hardware modding. If you are into HW-Mods, have a look at my RCGroups blog post: |
@raphaelcoeffic should I merge this PR (double checking)? |
Yep! Approved is "approved" 😊 (i.e. "good to merge") |
Wouldn't it be cool to have the values also available as telemetry or inputs? |
Just built with the above cmake option. It turns out that the popup for selecting the AUX1 function is completely gone now. I would appreciate if i2c would simply be another selectable option for AUX1. Would that be passible? |
This is the case when using the x-lite pro. |
This PR adds support of LSM6DS33 IMU to RadioMaster/Eachine TX16S via AUX1 port.
With new CMake key IMU_LSM6DS33, std. serial USART3/AUX1 will be converted to second I2C bus (first internal I2C bus is for touchscreen on TX16S).
Gathering data from IMU can be triggered by calling
imu_lsm6ds33_read()
and it's output is saved in SI units into internal variableIMUoutput
of following structure type:edgetx/radio/src/targets/horus/imu_lsm6ds33.h
Lines 130 to 134 in b123cab
Do note that the current PR does NOT trigger reading the IMU automatically, which in later application phase could be added, e.g. to be triggered periodically at a desired frequency, for example in:
edgetx/radio/src/opentx.cpp
Line 121 in 525126e
The temperature, gyro and linear acceleration values of LSM6DS33 can be displayed at radio analogs dialog screen in SI-units. Here Adafruit LSM6DS33 breakout during simultaneous testing with FlySky Paladin EV digital gimbals on RM TX16S: