Text on Huskylens display

userHead luger.luger 2023-05-16 04:12:04 1098 Views7 Replies

Hello,

(Arduino UNO).


How to display a variable value on the Huskylens display?


I insert the text with the command:
(!huskylens.customText("X=",0,30))

 

I want to display the value behind the "X=" characters. But I do not know how. Can anyone help? Thanks

2023-05-24 21:43:22

Hi,I solved the problem with the data output to the LCD display. Thanks everyone for the advice.But I have another question and I am asking for your advice. Is it possible to transfer an image (video) from the Husky to a PC via Bluetooth?

userHeadPic luger.luger
jenna wrote:

HuskyLens can take pictures or screenshots of the camera and save them to the SD card. HuskyLens has an SD card slot onboard. Screenshots include text and boxes displayed on the screen, while pictures only include camera images without boxes or text information. It's difficult to transfer video.

2023-05-25 10:11:49
1 Replies
2023-05-16 20:02:45

I'm a complete beginner, sorry for my "common" questions. I know BASIC, and I'm just learning C++.

How do I get data from Huskylens for further processing?I mean the command "HUSKYLENSResult result = huskylens.read();". The result can be read with the command "result.xCenter" and saved in a variable, for example "int test=result.xCenter"?

 

Thank you

userHeadPic luger.luger
Yeez_B wrote:

Hi Luger

I was busy with other things these days, so I didn't see your reply in time. There is nothing to be sorry for. We are all beginners once upon a time.

 

As for you question, you could refer to the source code for the HuskyLens, which is released on the Github:

https://github.com/HuskyLens/HUSKYLENSArduino/blob/master/HUSKYLENS/HUSKYLENS.h

 

And the xCenter member variable is define in the line #100.

 

So you could see that the whole process is:

1: You use the HUSYLENSResult structure to create a new object "result".

2: The “result” accept the data from huskylens.read()

3: From the source code, you know the datatype for the xCenter is int16_t

 

So finally you know that the "xCenter" variable could be took by the “int test”. (Because “int” datatype in both 32 or 64 bit PC are occupy 4 byte space, which means int=int32_t)

2023-05-19 21:40:18
1 Replies
2023-05-16 10:21:40

My idea is to define a String1 externally, then convert your variable value into String2, and then combine the two Strings for display.I posted the sample code on Github for your convenience. The sample code is modified based on the HUSKLENS_I2C of HuskyLens.

 

You could find my sample code in the following address:

https://github.com/YeezB/HuskyLensShowText

userHeadPic Yeez_B
luger.luger wrote:

Good idea, thank

my plan is to display the coordinates of the object ID on the display.For example: ID1"X = 30""Y = 50"

 

void setup...HUSKYLENSResult result = huskylens.read(); // (ID1 ?)...void loop...int test = result.xCenter;String str2 = String(test);huskylens.customText(str2,20,30);...

 

Is it right ?what is the "concat" command?

Thank you for the advice.

 

2023-05-16 15:27:59
Yeez_B wrote:

concat() is an Arduino function, which could connect two String into one single String.

You could take a look at the Arduino code reference:

 

https://arduinogetstarted.com/reference/arduino-string-concat

2023-05-16 17:06:10
2 Replies