HuskyLens
NextHuskyLens is a wrapper around the HuskyLens that initializes the device lazily from the hardware map.
It wraps common read and setup methods.
Anything else not wrapped is accessible through camera.
Creating a NextHuskyLens
Section titled “Creating a NextHuskyLens”// Using your configuration nameval huskyLens = NextHuskyLens("huskyLens")// Using your configuration nameNextHuskyLens huskyLens = new NextHuskyLens("huskyLens");selectAlgorithm(algorithm)
Section titled “selectAlgorithm(algorithm)”Selects the recognition algorithm.
huskyLens.selectAlgorithm(HuskyLens.Algorithm.OBJECT_TRACKING)huskyLens.selectAlgorithm(HuskyLens.Algorithm.OBJECT_TRACKING);blocks(id)
Section titled “blocks(id)”Returns all currently seen blocks, or only blocks with the given id, this is capped at 6.
val allBlocks = huskyLens.blocks()
val blocksWithId = huskyLens.blocks(1)HuskyLens.Block[] allBlocks = huskyLens.blocks();
HuskyLens.Block[] blocksWithId = huskyLens.blocks(1);arrows(id)
Section titled “arrows(id)”Returns all currently seen arrows, or only arrows with the given id, this is capped at 6.
val allArrows = huskyLens.arrows()
val arrowsWithId = huskyLens.arrows(1)HuskyLens.Arrow[] allArrows = huskyLens.arrows();
HuskyLens.Arrow[] arrowsWithId = huskyLens.arrows(1);knock()
Section titled “knock()”Verifies the device is responding over I2C.
Returns true if it is.
if (huskyLens.knock()) { ... }if (huskyLens.knock()) { ... }
