dgatf / msrc

Multi Sensor for RC with RP2040 - FrSky D, SmartPort, XBUS, SRXL, IBUS, SBUS, Multiplex Sensor Bus, Jeti Ex Bus, Hitec
GNU General Public License v3.0
168 stars 41 forks source link

Example code for xbus #35

Closed jeanbatfr closed 3 years ago

jeanbatfr commented 3 years ago

Hi, I need to convert an analog signal from a temperature sensor to the xbus port of my spektrum receiver. I will use a little Trinket 3v as arduino board. Do you have an example code in order to understand how to use functions from xbus.h? I'm a liitle bit lost at the moment ^^

Thank you

dgatf commented 3 years ago

I recommend to use a supported board and use msrc as is

xbus.h is not intended to work as an arduino library. But basically in begin you set the mask for i2c, its request are handled with _i2c_requesthandler and in update you get new values of the sensors and copy the the strucs that are sent in the handler. See xbus specs