- 1. initialize smart camera [NUM]: numbered[PORT]at [INDEX]
- 2. smart camera [NUM]switch to color block detection mode
- 3. smart camera [NUM] starts learning color block [SIG] until button pressed
- 4. smart camera[NUM] detected color block[SIG]?
- 5. smart camera [NUM] detected color block [SIG] at[LOCATION] of the image?
- 6. smart camera[NUM] detected [TYPE]of color block [SIG]
- 7. smart camera [NUM][TYPE] fill light
- 8. smart camera [NUM] resets white balance
- 9. initialize smart camera [NUM]: numbered[INDEX] at [PORT]
- 10. smart camera [NUM] switch to line/label tracking mode
- 11. smart camera [NUM]detectedlabel [LABEL]?
- 12. smart camera[NUM] detected label [LABEL]’s [COORD] coordinate
- 13. smart camera [NUM] current line’s [TYPE]
- 14. smart camera[NUM] detected cross-point?
- 15. smart camera[NUM]detected cross point’s [TYPE]
- 16. smart camera [NUM] number of branch roads detected
- 17. smart camera [NUM] [NUM]-numbered branch road’s angle
- 18. smart camera[NUM]sets line tracking mode to [LINEMODE]
- 19. initialize smart camera[NUM]: numbered [INDEX] at[PORT]
- 20. smart camera[NUM] sets Kp in motor differential speed calculation to[KP]
- 21. smart camera [NUM] calculates motor differential speed (auto follows color block[SIG] to [AXIS] axis[TARGET] )
- 22. smart camera[NUM] calculates motor differential speed (auto follows label [LABEL] to[AXIS] axis [TARGET])
- 23. smart camera [NUM] calculates motor differential speed(targets the line-following section)
- 24. smart camera[NUM] targets area near color block [SIG] to [AXIS]axis[TARGET] ?
- 25. smart camera [NUM]targets area near label[LABEL] to [AXIS]axis[TARGET] ?
1. initialize smart camera [NUM]: numbered[PORT]at [INDEX]
Sets the number of the smart camera which is connected to the specified location of Novapi
How to use
How to make sure the place of a smart camera?
- First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
2. Then check the place of a smart camera among the ones connected to the port of Novapi. As shown in the following figure, the number 1 indicates the first smart camera connected to Novapi, 2 indicates the second one, and so on.
Example
When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
2. smart camera [NUM]switch to color block detection mode
Switches to the color block detection mode for the specified smart camera
How to Use
A smart camera can work in either the color block detection or line/label tracking mode.
- In the color block detection mode, a smart camera can detect and track color blocks.
- In the line/label tracking mode, a smart camera can track lines or barcodes.
Switch the smart camera to the corresponding working mode before using its functions.
Example
When you start Novapi, the smart camera 1 is switched to the color block detection mode.
3. smart camera [NUM] starts learning color block [SIG] until button pressed
Makes the specified smart camera start to learn a color block until the Learn button is pressed
How to Use
Steps for learning a color block
- After running this block, put the object to be learned above the camera. Observe the recognition indicator while slowly moving the object until the color of the indicator is the same as that of the learned object.
2. Press the Learn button to record the learned object.
After an object is successfully learned, the indicator of the smart camera is changed to be in the same color as that of the object when the camera recognizes the object.
Color block numbers
Numbers are provided to identify color blocks. A smart camera can learn and record a maximum of seven color blocks.
Example
When you start Novapi, the smart camera is switched to the color block detection mode and starts to learn and record color block 1.
4. smart camera[NUM] detected color block[SIG]?
Determines whether the specified smart camera detects the specified color block
How to Use
This is a Boolean block. If the smart camera detects the specified color block, the block reports True, otherwise it reports False. This block must be used in combination with another block that requires a condition. It can’t be used independently.
Note: Before using the smart camera to detect a color block, you need to use it to learn and record the color block first.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects the recorded color block 1.
5. smart camera [NUM] detected color block [SIG] at[LOCATION] of the image?
Determines whether the smart camera detects the specified color block in the specified position of the image
How to Use
The following figure shows the coordinates and areas of an image captured by a smart camera.
PixyMon software
You can use the PixyMon software to view images captured by a smart camera.
Click to download PixyMon
After installing the PixyMon software, connect a smart camera to the computer by using a Micro USB cable. Then you can view images captured by the smart camera in PixyMon.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects color block 1 on the left of the captured image.
6. smart camera[NUM] detected [TYPE]of color block [SIG]
Reports the coordinate, width, or height of the specified color block
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
PixyMon software
You can use the PixyMon software to view images captured by a smart camera.
Click to download PixyMon
After installing the PixyMon software, connect a smart camera to the computer by using a Micro USB cable. Then you can view images captured by the smart camera in PixyMon.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the width of color block 1 detected by the smart camera is greater than 50.
7. smart camera [NUM][TYPE] fill light
Turns on or off the fill light of the smart camera
How to Use
A smart camera is equipped with two fill lights on the two sides of the camera.
Smart cameras can resist the interference of light to some extent. Changing light, however, may affect the detection capability of a smart camera. Objects or colors learned in an environment may fail to be recognized in another environment with different lighting conditions. Fill lights can reduce the influence of ambient lighting conditions on the accuracy of detection.
Example
When you start Novapi, the fill lights of the smart camera are turned on and the smart camera starts to learn and record color block 2.
8. smart camera [NUM] resets white balance
Resets the white balance of the smart camera
How to Use
Ambient light changing may affect the detection accuracy of smart cameras. Resetting the white balance can reduce the influence of ambient light changing on the accuracy of detection.
Example
When you start Novapi, the white balance is reset. If the smart camera detects color block 1, the encoder motor M1 and M2 rotate at power 50%.
9. initialize smart camera [NUM]: numbered[INDEX] at [PORT]
Sets the number of the smart camera which is connected to the specified location of Novapi
How to use
How to make sure the place of a smart camera?
- First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
2. Then check the place of a smart camera among the ones connected to the port of Novapi. As shown in the following figure, the number 1 indicates the first smart camera connected to Novapi, 2 indicates the second one, and so on.
Example
When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
10. smart camera [NUM] switch to line/label tracking mode
Switches to the line/label tracking mode for the specified smart camera
How to Use
A smart camera can work in either the color block detection or line/label tracking mode.
- In the color block detection mode, a smart camera can detect and track color blocks.
- In the line/label tracking mode, a smart camera can track lines or barcodes.
Switch the smart camera to the corresponding working mode before using its functions.
Example
When you start Novapi, the smart camera 1 is switched to the line/label tracking mode.
11. smart camera [NUM]detectedlabel [LABEL]?
Determines whether the smart camera detects the specified barcode
How to Use
Barcode cards and stickers are included in the package of a smart camera. You can also download the source files of the barcodes to print them.
Click to download barcodes
The barcodes are numbered, and you need to select the corresponding number of a barcode from the drop-down list when using it.
You can also place the cards on the line following map, as shown in the following.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% when the smart camera detects barcode 1.
12. smart camera[NUM] detected label [LABEL]’s [COORD] coordinate
Reports the x- or y-coordinate of the specified barcode
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
PixyMon software
You can use the PixyMon software to view images captured by a smart camera.
Click to download PixyMon
After installing the PixyMon software, connect a smart camera to the computer by using a Micro USB cable. Then you can view images captured by the smart camera in PixyMon.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects that the x-coordinate of barcode 1 is greater than 50.
13. smart camera [NUM] current line’s [TYPE]
Reports the x- or y-coordinate of the start or end point of the captured line where the smart camera is located
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
You can view the direction, start point, and end point of a captured line where a smart camera is located in the PixyMon software.
Note: A smart camera filters out thin lines by default. If you need the smart camera to detect thin lines, modify the related parameters in PixyMon.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects that the start x-coordinate of the line is greater than 50.
14. smart camera[NUM] detected cross-point?
Determines whether the smart camera detects a cross point
How to Use
A smart camera can track lines and determine the number of branch roads. If the smart camera detects a cross point, this block reports True, otherwise it reports False. This block must be used in combination with another block that requires a condition. It can’t be used independently.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects a cross point.
15. smart camera[NUM]detected cross point’s [TYPE]
Reports the x- or y-coordinate of the cross point detected by the smart camera
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the x-coordinate of the cross point detected by the smart camera is greater than 50.
16. smart camera [NUM] number of branch roads detected
Reports the number of branch roads detected by the smart camera
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the number of branch roads detected by the smart camera is greater than two.
17. smart camera [NUM] [NUM]-numbered branch road’s angle
Reports the angle of the specified branch road detected by the smart camera
How to Use
The angle in this block refers to the one between the specified branch road and vector. The vector is the line on which the smart camera is located, for example, as shown in the following figure, the red line in the image displayed in PixyMon.
Example
After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the angle of the first branch road detected by the smart camera is greater than 45 degrees.
18. smart camera[NUM]sets line tracking mode to [LINEMODE]
Sets the line tracking mode of the smart camera to dark line on light to light line on dark
Example
After you start Novapi, the line tracking mode of the smart camera is set to dark line on light. If the smart camera detects a cross point, the encoder motor M1 and M2 will rotate at power 50%.
19. initialize smart camera[NUM]: numbered [INDEX] at[PORT]
Sets the number of the smart camera which is connected to the specified location of Novapi
How to use
How to make sure the place of a smart camera?
- First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
2. Then check the place of a smart camera among the ones connected to the port of Novapi. As shown in the following figure, the number 1 indicates the first smart camera connected to Novapi, 2 indicates the second one, and so on.
Example
When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
20. smart camera[NUM] sets Kp in motor differential speed calculation to[KP]
Sets Kp for the smart camera to calculate the motor differential speed
How to Use
Kp is the coefficient for calculating motor differential speed. It determines the turning speed of a robot when it performs automatic line/color block following.
Value range of Kp: 0–1, a greater value indicates faster turning
This block is used to initialize Kp and is usually placed in the beginning of a program. It needs to be executed for only once, and therefore it is not recommended that you put it into loop statements.
Example
When you start Novapi, the coefficient Kp for calculating the motor differential speed is set to 0.5.
21. smart camera [NUM] calculates motor differential speed (auto follows color block[SIG] to [AXIS] axis[TARGET] )
Reports the motor differential speed required for making your robot follow the specified color block while keeping the color block in the specified x- or y-coordinate of the captured image
How to Use
The motor differential speed is positively related to Kp. A greater Kp value indicates a greater motor differential speed.
Value range of the motor differential speed: 0–100
The following figure shows the coordinates of an image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
Example
After you start Novapi, it follows color block 1.
22. smart camera[NUM] calculates motor differential speed (auto follows label [LABEL] to[AXIS] axis [TARGET])
Reports the motor differential speed required for making your robot follow the specified barcode while keeping the barcode in the specified x- or y-coordinate of the captured image
How to Use
The motor differential speed is positively related to Kp. A greater Kp value indicates a greater motor differential speed.
Value range of the motor differential speed: 0–100
Barcode cards and stickers are included in the package of a smart camera. You can also download the source files of the barcodes to print them. The barcodes are numbered, and you need to select the corresponding number of a barcode from the drop-down list when using it.
Click to download barcodes
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
Example
After you start Novapi, it follows barcode 1.
23. smart camera [NUM] calculates motor differential speed(targets the line-following section)
Reports the motor differential speed required for keeping the line to be followed by your robot in the center of the captured image
How to Use
The motor differential speed is positively related to Kp. A greater Kp value indicates a greater motor differential speed.
Value range of the motor differential speed: 0–100
Example
After you start Novapi, it moves following the line.
24. smart camera[NUM] targets area near color block [SIG] to [AXIS]axis[TARGET] ?
Determines whether the specified color block is located near the specified x- or y-coordinate of the captured image
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
Example
After you start Novapi, if the smart camera detects that color block 1 is near the x-coordinate of 150, the encoder motor M1 and M2 will rotate at power 50%.
25. smart camera [NUM]targets area near label[LABEL] to [AXIS]axis[TARGET] ?
Determines whether the specified barcode is located near the specified x- or y-coordinate of the captured image
How to Use
The following figure shows the coordinates of the image captured by a smart camera.
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240
Example
After you start Novapi, if the smart camera detects that barcode 1 is near the x-coordinate of 150, the encoder motor M1 and M2 will rotate at power 50%.