DawidBoTak
(Dawid Mieszczanin)
August 28, 2023, 4:13pm
82
On my arduino there are only TX1 and RX0, there are no other ones as far as i can seeโฆ
Anyway i will change everything in the code, i need front left and front right side, AND if one of the L1X sensors work, i will plug it into the I2C port and set it up as forward facing.
1 Like
geofrancis
([๐๐๐ค])
August 28, 2023, 4:15pm
83
ok you will still need to modify the code to get the vl53l1x working but at least we have something to start with.
DawidBoTak
(Dawid Mieszczanin)
August 28, 2023, 4:16pm
84
I will just plug it normally, without the arduino, and just simply set it in MP as forward facing.
1 Like
geofrancis
([๐๐๐ค])
August 28, 2023, 4:17pm
85
good thinking, none of the other sensors are on the i2c bus now.
DawidBoTak
(Dawid Mieszczanin)
August 28, 2023, 4:19pm
86
Alright so thank you so much for help and guidance, it was very interesting experience, stay safe!
1 Like
geofrancis
([๐๐๐ค])
August 28, 2023, 4:52pm
87
I have had another go at the VL53l1x if you want to try it,
#include <Wire.h>
#include <VL53L1X.h>
#include "mavlink/common/mavlink.h" // Mavlink interface
#include "mavlink/common/mavlink_msg_distance_sensor.h"
// The number of sensors in your system.
const uint8_t sensorCount = 2;
// The Arduino pin connected to the XSHUT pin of each sensor.
const uint8_t xshutPins[sensorCount] = { 2, 3,};
VL53L1X sensors[sensorCount];
void setup()
{
while (!Serial) {}
Serial.begin(115200);
Wire.begin();
This file has been truncated. show original
It might be a good idea to rename this thread to something more relevant like โmultiple vl53l1x and vl53l0x rangefindersโ
geofrancis
([๐๐๐ค])
August 28, 2023, 6:20pm
88
to get your vl53l1x you have connected to the flight controllers i2c to show on the proximity display you will have to set PRX2_TYPE =4 so that the rangefinder is used for proximity.
DawidBoTak
(Dawid Mieszczanin)
August 28, 2023, 6:35pm
89
Yes i know that, thank you again
1 Like