Code Scanner
Import KOI 2 Library
Serial Initialization
Initializes the serial connection to KOI.
Parameters:
tx: TX Pin, use P2 for Robotbit EDU
rx: RX Pin, use P12 for Robotbit EDU
Select Code Scan Mode
Sets the KOI mode to Code Scanning.
Select Code Type
Select code type.
Parameters:
type: 0 for QR Code, 1 for Barcode
Get Code Attributes
Returns data for the detected code.
Parameters:
data: The type of data to return.
data | Meaning |
---|---|
0 | X coordinates |
1 | Y coordinates |
2 | Width of code |
3 | Height of code |
Get Code Value
Returns the value of the code scanned.
Sample Program: Code Scanner
Last updated