raulvt[m]: > <@raulvt:matrix.org> Guys, i've wrote my first rust driver for an i2c sensor some months ago, used some eldruin's website tutorials as reference. > > it is a magnetometer ak09915. > I need to check when data_ready is true on the ST1 register, só I've made a data_ready() that checks it and then proceed to sensor reading > Actually it's a loop that tries 20 times until reach a true value or give an error, > there is an smart aproach for this? I was thinking if it's necessary these retries, because they could be different depending on the frequency data is measured ( it haves 200, 100, 50...Hz modes ) If you don't have an interrupt pin available, this is indeed the usual way to go about it