garmin / LIDARLite_Arduino_Library

High-performance optical distance sensing.
Apache License 2.0
181 stars 84 forks source link

No matching function LIDARLite_v4LED #27

Open gerdaat opened 2 years ago

gerdaat commented 2 years ago

I tired to use all of the examples LIDARLite -> v4LED folders, and all of them have some form of the error message: "no macthing function for cal to 'LIDARLite_v4LED::write(Int, uint8_t*, int, int)'. Someone in the Arduino forum pointed out that the int parameters don't match.

BradWiseman commented 2 years ago

There is a good discussion of int vs uint8_t vs uint16_t here: https://forum.arduino.cc/t/use-of-uint8_t-uint16_t-etc/512916

As you'll see discussed in that forum, "int" does not refer to the same length of variable, depending on the "natural" length of data on the host system. If it's an 8 bit system, then an int is 8 bits. If it's a 16 bit sytem, then an int is 16 bits. You get the idea... I won't repeat everything here because the discussion at the link is very well written by authors who are quite articulate on the subject.