Tags Recognition Not Transmitting to Arduino Uno Wifi rev 2
Hello,
I am using the HuskyLens to recognize tags (6 different currently) and return a total tag count. The issue I am running into is that on the husky screen it will recognize the tags and show the ID for each learned tag but it does not transmit these to the Arduino uno wifi2 I am using. I ran a script that prints the tags as they are recognized and it is consistently leaving out multiple tags 3-4 of them even though they are recognized on the HuskyLens screen. Help would be very much appreciated.
Check if there are any sources of signal interference between the HuskyLens and Arduino, such as other electronic devices or long wires. Minimize interference to ensure reliable communication.
bidrohini.bidrohini
Hi!
Do you use our library?
I use Arduino Uno to test HUSKYLENS_ADVANCED.ino.
https://codeload.github.com/HuskyLens/HUSKYLENSArduino/zip/master
All the identified tags can be viewed through the serial port. (I2C)
jenna
Yes I am using that library. Should I be using I2C vs Digital Serial for the lens?
When attempting to use the example code with I2C protocol I can not get the Husky Lens to connect to the Arduino. I have confirmed wiring and settings are all correct. When I check the I2C address it is showing two I2C connections at address 60 and 32. I only have the Husky Lens connected currently. I have swapped out the Husky lens and the Arduino board along with the wiring to confirm it's not a hardware or wiring issue but to no avail. Any suggestions would be greatly appreciated.
14:32:33.116 -> 1.Please recheck the "Protocol Type" in HUSKYLENS (General Settings>>Protocol Type>>I2C)
14:32:33.149 -> 2.Please recheck the connection.
14:32:33.732 -> Begin failed!
14:32:33.732 -> 1.Please recheck the "Protocol Type" in HUSKYLENS (General Settings>>Protocol Type>>I2C)
14:32:33.764 -> 2.Please recheck the connection.
14:32:34.346 -> Begin failed!
14:32:34.346 -> 1.Please recheck the "Protocol Type" in HUSKYLENS (General Settings>>Protocol Type>>I2C)
14:32:34.378 -> 2.Please recheck the connection.
Hi!
Please set "auto detect" and save.
Husky Lens ---------→ board
SCL---------→ SCL
SDA---------→ SDA
VCC---------→ 5V
GND---------→ GND
Thank you. I have confirmed settings on the HuskyLens are correct and the connections to the Arduino board are correct. I ran a script to check the I2C connections and can see them from the script but I still can't connect to the husky lens via I2C.
Hi!
Sorry to hear this, I think it's likely that the Arduino Uno Wifi rev 2 underlying code is causing the HuskyLens I2C initialization failure. Have you tried UART? Maybe you can try this code. (Soft serial port green line >> D10; blue line >> D11 is being used)
test02.ino:
https://drive.google.com/file/d/1Ar08A77BB-DDxJVO0Kpz-sZcaIEDxRnP/view?usp=sharing
It may need to be developed according to the communication protocol if it still cannot be solved.
https://github.com/HuskyLens/HUSKYLENSArduino/blob/master/HUSKYLENS%20Protocol.md
I started with UART but that is where I ran into my original problem where the husky lens was not transmitting all of the tags recognized / viewed through the camera. It will only return ~ 2 tags even though the camera is recognizing 6 or more different tags. I am trying to read tag ids and count how many like tag ID's are in the camera frame at a specific time over a sampling time frame. IE read tag IDS over 60 seconds and return max tags ID's found for each unique tag. The camera is seeing all the tags and recognizing them but it is not returning that data over serial / back to the arduino on UART which is why I was attempting I2C.
Am I running into the limitations of the Arduino board with this? Should I switch to a different board type?
Thereis1BlakeNormally, HuskyLens will not actively return data through UART/IIC.Have you uploaded the sample code to print out all recognized IDs via the serial monitor.
You could find tag recognition sample code in this wiki:
https://wiki.dfrobot.com/HUSKYLENS_V1.0_SKU_SEN0305_SEN0336#target_20
Yeez_BYes I have the code uploaded to print out all recognized ID's and it returns only a handful of the ones shown / tagged in the camera. Greatly appreciate the help.