$15 360 degree XV proximity lidar

I used putty. It seems like its connected, but i can’t see anything appearing on the screen…

Just to be clear about this: Which pins are the TX and RX of the RP2040 board?

i mean i know that those are pins 4 and 5, but which one’s which? I might have just mixed those two up…

4 is TX2 to Flight controller RX pin
7 to Lidar motor driver / transistor
1 is RX1 to Lidar TX pin

Ok, I had RX and TX connection reversed. Now I see the mavlink code scrolling on the putty monitor. I will now try to plug the lidar back into my flight controller correctly and I will see what will happen…

1 Like

finally! Lidar works! I’m so mad i didn’t try to reverse the TX and RX pins earlier… rookie mistake… But at least i got it working now! Thanks for help geofrancis!

1 Like

I have been working on another version that should work better.

I have changed it to that it only sends a mavlink packet when it completes a full rotation by only sending when it’s index 89.

It also runs on both cores now, with the lidar scanning on core 1 and mavlink packets and PID set to core 2.

Thanks, will try this verison asap!

I forgot to update it lol download it again if you already have.

Hi geofrancis. I have the same question for Webillo. He didn’t answer you?

I have adapter code for the delta2a but the lidar I bought was faulty so I never got to test it.

alright so im back at it today, and after compiling the code, the error popped up saying “exit status 1 Compilation error: ‘READLIDAR’ was not declared in this scope”, same as “MAVLINK_IO” and “MAVLINK_HB”, what could be the issue? I suspect a library problem, but no idea how to solve this.

1 Like

What code did you use specifically? Unfortunately my PC motherboard just fried so I can’t help much at the moment.

The one you just uploaded, the updated one.

1 Like

I think i used a different board library as the native arduino one didnt support dual core. this one lets us run the lidar to CPU1 using loop and communication to CPU2 using loop1. I have not tested it yet with this lidar, its ported from another lidar i was working on.

ok, i uploaded the board library, installed it and selected my board “Waveshare RP2040 zero” and the correct COM port, but after trying to compile, this error pops up:

Arduino: 1.8.18 (Windows 10), Board: “Waveshare RP2040 Zero, 2MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, IPv4 Only, Default (UF2)”

Fatal Python error: initfsencoding: unable to load the file system codec

ModuleNotFoundError: No module named ‘encodings’

Current thread 0x000012b8 (most recent call first):

exit status -1073740791

Error compiling for board Waveshare RP2040 Zero.

So i think i got the library working, but after compiling, this READLIDAR error pops up again…

Arduino: 1.8.18 (Windows 10), Board: "Waveshare RP2040 Zero, 2MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, IPv4 Only, Default (UF2)"





















In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2136,

                 from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink.h:32,

                 from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino:2:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h: In function 'uint16_t mavlink_msg_set_attitude_target_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_attitude_target_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:183:242: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  183 |     return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);

      |                                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~~~~~~^

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:183:406: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  183 |     return mavlink_msg_set_attitude_target_pack(system_id, component_id, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);

      |                                                                                                                                                                                                                                                                                                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h: In function 'uint16_t mavlink_msg_set_attitude_target_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_attitude_target_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:197:253: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  197 |     return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);

      |                                                                                                                                                                                                                                        ~~~~~~~~~~~~~~~~~~~~~^

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_attitude_target.h:197:417: warning: taking address of packed member of '__mavlink_set_attitude_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  197 |     return mavlink_msg_set_attitude_target_pack_chan(system_id, component_id, chan, msg, set_attitude_target->time_boot_ms, set_attitude_target->target_system, set_attitude_target->target_component, set_attitude_target->type_mask, set_attitude_target->q, set_attitude_target->body_roll_rate, set_attitude_target->body_pitch_rate, set_attitude_target->body_yaw_rate, set_attitude_target->thrust, set_attitude_target->thrust_body);

      |                                                                                                                                                                                                                                                                                                                                                                                                            ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2179:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h: In function 'uint16_t mavlink_msg_distance_sensor_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_distance_sensor_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h:200:387: warning: taking address of packed member of '__mavlink_distance_sensor_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  200 |     return mavlink_msg_distance_sensor_pack(system_id, component_id, msg, distance_sensor->time_boot_ms, distance_sensor->min_distance, distance_sensor->max_distance, distance_sensor->current_distance, distance_sensor->type, distance_sensor->id, distance_sensor->orientation, distance_sensor->covariance, distance_sensor->horizontal_fov, distance_sensor->vertical_fov, distance_sensor->quaternion, distance_sensor->signal_quality);

      |                                                                                                                                                                                                                                                                                                                                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h: In function 'uint16_t mavlink_msg_distance_sensor_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_distance_sensor_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_distance_sensor.h:214:398: warning: taking address of packed member of '__mavlink_distance_sensor_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  214 |     return mavlink_msg_distance_sensor_pack_chan(system_id, component_id, chan, msg, distance_sensor->time_boot_ms, distance_sensor->min_distance, distance_sensor->max_distance, distance_sensor->current_distance, distance_sensor->type, distance_sensor->id, distance_sensor->orientation, distance_sensor->covariance, distance_sensor->horizontal_fov, distance_sensor->vertical_fov, distance_sensor->quaternion, distance_sensor->signal_quality);

      |                                                                                                                                                                                                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~~^~~~~~~~~~

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2193:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h: In function 'uint16_t mavlink_msg_battery_status_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_battery_status_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:219:195: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  219 |     return mavlink_msg_battery_status_pack(system_id, component_id, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);

      |                                                                                                                                                                                   ~~~~~~~~~~~~~~~~^~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:219:418: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  219 |     return mavlink_msg_battery_status_pack(system_id, component_id, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);

      |                                                                                                                                                                                                                                                                                                                                                                                                                  ~~~~~~~~~~~~~~~~^~~~~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h: In function 'uint16_t mavlink_msg_battery_status_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_battery_status_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:233:206: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  233 |     return mavlink_msg_battery_status_pack_chan(system_id, component_id, chan, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);

      |                                                                                                                                                                                              ~~~~~~~~~~~~~~~~^~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_battery_status.h:233:429: warning: taking address of packed member of '__mavlink_battery_status_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  233 |     return mavlink_msg_battery_status_pack_chan(system_id, component_id, chan, msg, battery_status->id, battery_status->battery_function, battery_status->type, battery_status->temperature, battery_status->voltages, battery_status->current_battery, battery_status->current_consumed, battery_status->energy_consumed, battery_status->battery_remaining, battery_status->time_remaining, battery_status->charge_state, battery_status->voltages_ext, battery_status->mode, battery_status->fault_bitmask);

      |                                                                                                                                                                                                                                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~^~~~~~~~~~~~

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2195:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h: In function 'uint16_t mavlink_msg_landing_target_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_landing_target_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h:218:349: warning: taking address of packed member of '__mavlink_landing_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  218 |     return mavlink_msg_landing_target_pack(system_id, component_id, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y, landing_target->x, landing_target->y, landing_target->z, landing_target->q, landing_target->type, landing_target->position_valid);

      |                                                                                                                                                                                                                                                                                                                                             ~~~~~~~~~~~~~~~~^

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h: In function 'uint16_t mavlink_msg_landing_target_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_landing_target_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_landing_target.h:232:360: warning: taking address of packed member of '__mavlink_landing_target_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  232 |     return mavlink_msg_landing_target_pack_chan(system_id, component_id, chan, msg, landing_target->time_usec, landing_target->target_num, landing_target->frame, landing_target->angle_x, landing_target->angle_y, landing_target->distance, landing_target->size_x, landing_target->size_y, landing_target->x, landing_target->y, landing_target->z, landing_target->q, landing_target->type, landing_target->position_valid);

      |                                                                                                                                                                                                                                                                                                                                                        ~~~~~~~~~~~~~~~~^

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2206:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h: In function 'uint16_t mavlink_msg_home_position_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_home_position_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h:191:218: warning: taking address of packed member of '__mavlink_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  191 |     return mavlink_msg_home_position_pack(system_id, component_id, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z, home_position->time_usec);

      |                                                                                                                                                                                                           ~~~~~~~~~~~~~~~^

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h: In function 'uint16_t mavlink_msg_home_position_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_home_position_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_home_position.h:205:229: warning: taking address of packed member of '__mavlink_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  205 |     return mavlink_msg_home_position_pack_chan(system_id, component_id, chan, msg, home_position->latitude, home_position->longitude, home_position->altitude, home_position->x, home_position->y, home_position->z, home_position->q, home_position->approach_x, home_position->approach_y, home_position->approach_z, home_position->time_usec);

      |                                                                                                                                                                                                                      ~~~~~~~~~~~~~~~^

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2207:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h: In function 'uint16_t mavlink_msg_set_home_position_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_home_position_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h:200:284: warning: taking address of packed member of '__mavlink_set_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  200 |     return mavlink_msg_set_home_position_pack(system_id, component_id, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z, set_home_position->time_usec);

      |                                                                                                                                                                                                                                                                         ~~~~~~~~~~~~~~~~~~~^

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h: In function 'uint16_t mavlink_msg_set_home_position_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_set_home_position_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_set_home_position.h:214:295: warning: taking address of packed member of '__mavlink_set_home_position_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  214 |     return mavlink_msg_set_home_position_pack_chan(system_id, component_id, chan, msg, set_home_position->target_system, set_home_position->latitude, set_home_position->longitude, set_home_position->altitude, set_home_position->x, set_home_position->y, set_home_position->z, set_home_position->q, set_home_position->approach_x, set_home_position->approach_y, set_home_position->approach_z, set_home_position->time_usec);

      |                                                                                                                                                                                                                                                                                    ~~~~~~~~~~~~~~~~~~~^

In file included from C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\common.h:2257:

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h: In function 'uint16_t mavlink_msg_obstacle_distance_encode(uint8_t, uint8_t, mavlink_message_t*, const mavlink_obstacle_distance_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h:173:158: warning: taking address of packed member of '__mavlink_obstacle_distance_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  173 |     return mavlink_msg_obstacle_distance_pack(system_id, component_id, msg, obstacle_distance->time_usec, obstacle_distance->sensor_type, obstacle_distance->distances, obstacle_distance->increment, obstacle_distance->min_distance, obstacle_distance->max_distance, obstacle_distance->increment_f, obstacle_distance->angle_offset, obstacle_distance->frame);

      |                                                                                                                                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h: In function 'uint16_t mavlink_msg_obstacle_distance_encode_chan(uint8_t, uint8_t, uint8_t, mavlink_message_t*, const mavlink_obstacle_distance_t*)':

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\mavlink\common\mavlink_msg_obstacle_distance.h:187:169: warning: taking address of packed member of '__mavlink_obstacle_distance_t' may result in an unaligned pointer value [-Waddress-of-packed-member]

  187 |     return mavlink_msg_obstacle_distance_pack_chan(system_id, component_id, chan, msg, obstacle_distance->time_usec, obstacle_distance->sensor_type, obstacle_distance->distances, obstacle_distance->increment, obstacle_distance->min_distance, obstacle_distance->max_distance, obstacle_distance->increment_f, obstacle_distance->angle_offset, obstacle_distance->frame);

      |                                                                                                                                                      ~~~~~~~~~~~~~~~~~~~^~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino: In function 'void loop()':

XV_Lidar_MAVLINK7_2040_dualcore:42:2: error: 'READLIDAR' was not declared in this scope

   42 |  READLIDAR();

      |  ^~~~~~~~~

C:\Users\dawid\OneDrive\Desktop\XV_Lidar_MAVLINK7_2040_dualcore\XV_Lidar_MAVLINK7_2040_dualcore.ino: In function 'void loop1()':

XV_Lidar_MAVLINK7_2040_dualcore:49:5: error: 'MAVLINK_IO' was not declared in this scope; did you mean 'MAVLINK_H'?

   49 |     MAVLINK_IO();

      |     ^~~~~~~~~~

      |     MAVLINK_H

XV_Lidar_MAVLINK7_2040_dualcore:50:5: error: 'MAVLINK_HB' was not declared in this scope; did you mean 'MAVLINK_H'?

   50 |     MAVLINK_HB();

      |     ^~~~~~~~~~

      |     MAVLINK_H

exit status 1

'READLIDAR' was not declared in this scope

My computer motherboard failed so I can’t help much at the moment until I’m back up and running

I understand your PC issue, but i am wondering if this part of the code is wrote correctly (Original version picture)? I fixed the READLIDAR issue by installing lidarIO.ino file, i also installed the mavlinkIO.ino file, and replaced the MAVLINK_IO(); part of the code to mavlink_send(); and another error was fixed , but i can’t get over the MAVLINK_HB error: exit status 1

'MAVLINK_HB' was not declared in this scope; did you mean 'MAVLINK_H'?

Original version:
image
.

My personal modification (not sure if it is correct, but it removed 1 error):
image

Are you sure you have the correct board selected it’s behaving like It doesn’t know what loop1 is

I definitely have selected the correct model of the board which is the Waveshare RP2040 Zero: