Husky Lens
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
I have bought an Husky Lens to put on my Osoyoo robot, which has an Arduino Mega 2560 on it.
Most of the people I saw using this CAM has Arduino UNO, and connects the Husky Lens to pins 10 and 11; acutally I don't know how the HL works with Mega 2560 (how to connect and how to modify the example for my robot).
I'd also like to know if this CAM can do more than one function in only one program (for example object tracking and line tracking in the same code). And, finally, if Husky Lens can write coordinates of a color or an object, or a line.
1- Wire for Huskylens on Mega 2560 is same as you do on the Arduino UNO, It's just using the Software Serial. So you could connect the HuskyLens on the D10,D11on Mega2560
2-Yes, you could switch the function(Algorithm) in the same program, by calling the “writeAlgorithm” function
You could refer to the “HUSKYLENS Arduino API” posted on the Github
https://github.com/HuskyLens/HUSKYLENSArduino/blob/master/HUSKYLENS%20Arduino%20API.md
3- I'm not sure what you mean about “write” coordinates. The Huskylens only got the “get” coordinates of the target, you could take a look at the “Read position data” on the wiki:
https://wiki.dfrobot.com/HUSKYLENS_V1.0_SKU_SEN0305_SEN0336#target_30
![userHeadPic](https://dfimg.dfrobot.com/dfPortrait2.png)