Open shaiss opened 6 years ago
This looks like I2C issue. Shorten cables, lower I2C clock speed. To 100kHz. I2C is very sensitive for wiring quality. I'm successfully running this exact code on Omnibus F4 and Matek F722 with external HMC5883l and baro. But I keep all the wires nice and short
I'll try rewiring with shorter wires. My oled wires are pretty long. How would I go upon lowering the clock speed. I'm sure it's just me doing something wrong, just need to figure out what that is.
On Wed, May 2, 2018, 05:29 Paweł Spychalski notifications@github.com wrote:
This looks like I2C issue. Shorten cables, lower I2C clock speed. To 100kHz. I2C is very sensitive for wiring quality. I'm successfully running this exact code on Omnibus F4 and Matek F722 with external HMC5883l and baro. But I keep all the wires nice and short
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/iNavFlight/INAV-Rangefinder-I2C-interface/issues/7#issuecomment-385918874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG5pMeNYxn8LDl0eaD-aSbbaespr6CFks5tuXx1gaJpZM4TuJDU .
I shortened the wires. Removed the oled and still no luck. I do notice when the attiny85 circuit is connected, the mag seems to go in and out. Inav configurator will show mag red for a split second then go back.
In Arduino I'm using the 1mghz clock in the pull down menu. Not sure what I'm missing.
I don't doubt that it works, just I'm doing something wrong probably
Sorry for the multiple posts. I got a bit closer after figuring out set i2c_speed = 100KHZ. mag seems happy now with attiny 85 connected. I enabled debug in the arduino sketch and added an LED and it lights up when my hand is next to it. in iNav configurator the sonar icon is blue, but when I go to sensors, the graph stays flat and doesn't change. So getting slightly closer. Thank you for the help!
If sensor is detected but no readouts, then problem is somewhere between sonar and ATtiny
Even if the debug led is working as expected? It only turns on when my hand is infront of it. Thx again for the help! I'm trying my best to figure out what I'm doing wrong here. ty!
Tengo un MatekF405 CTR y configuré el cableado de manera similar a lo que ha publicado. He subido el código proporcionado a un Attiny85 y lo he configurado en una placa. Cuando tengo el SDA / SCL del attiny85 conectado al mateks sda / SLC, el oled muestra caracteres basura e inav no puede comunicarse con el mag. si desconecto esas 2 líneas, está bien.
Estoy probando esto con el HC-SR04, pero cambiaré al US100 cuando llegue.
He sacado 3.3v directamente del matek para alimentar el circuito oled y el telémetro. Y tirando de 5v solo para el telémetro con el regulador y el capacitor como en su diagrama.
Intenté cambiar la dirección i2c a 0xA2 y lo mismo. ¡Cualquier ayuda será apreciada y gracias por armar esto!
hola amigo soy nuevo aqui , estoy tratando de ponerle el sonar f7 sin exito Ya prepare todo pero no puedo compilar el programa ;dice que faltan declarar bibliotecas y la verdad que no entiendo nada de programacion, podrias enviarme un a copia del codigo que pudiste subir , porque vengo intentando y no logro compilarlos.saludos y gracias
tenia un usbasp pero no pude ni quemar el attiny,compre un arduino uno r3 y al fin pude quemarlo.El problema es que no compila el inav_i2c_sonar
I have a MatekF405 CTR and I've setup the wiring similar to what you've posted. I've uploaded the code provided to an Attiny85 and have it setup on a breadboard. When I have the SDA/SCL lfrom the attiny85 hooked up to the mateks sda/SLC the oled shows garbage characters and inav can't communicate with the mag. if I disconnect those 2 lines, it's fine.
I'm testing this with the HC-SR04 but will switch to the US100 when it gets here.
I'vepulling 3.3v directly off the matek to power the oled and rangefinder circuit. And pulling 5v just for the rangefinder with the regulator and capacitor like in your diagram.
I've tried changing the i2c address to 0xA2 and same thing. Any help would be appreciated and thank you for putting this together!