1. initialize smart camera [NUM]: numbered[PORT]at [INDEX]

Smart Camera - 图1

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?

  1. First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
    Smart Camera - 图2
    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.
    Smart Camera - 图3

Example

When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
Smart Camera - 图4


2. smart camera [NUM]switch to color block detection mode

Smart Camera - 图5

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.
Smart Camera - 图6


3. smart camera [NUM] starts learning color block [SIG] until button pressed

Smart Camera - 图7

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

  1. 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.
    Smart Camera - 图8

    Color block numbers

    Numbers are provided to identify color blocks. A smart camera can learn and record a maximum of seven color blocks.
    Smart Camera - 图9

    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.
    Smart Camera - 图10

4. smart camera[NUM] detected color block[SIG]?

Smart Camera - 图11

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.
Smart Camera - 图12


5. smart camera [NUM] detected color block [SIG] at[LOCATION] of the image?

Smart Camera - 图13

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.
Smart Camera - 图14

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.
Smart Camera - 图15


6. smart camera[NUM] detected [TYPE]of color block [SIG]

Smart Camera - 图16

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.
Smart Camera - 图17
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.
Smart Camera - 图18


7. smart camera [NUM][TYPE] fill light

Smart Camera - 图19

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.
Smart Camera - 图20

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.
Smart Camera - 图21


8. smart camera [NUM] resets white balance

Smart Camera - 图22

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%.
Smart Camera - 图23


9. initialize smart camera [NUM]: numbered[INDEX] at [PORT]

Smart Camera - 图24

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?

  1. First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
    Smart Camera - 图25
    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.
    Smart Camera - 图26

Example

When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
Smart Camera - 图27


10. smart camera [NUM] switch to line/label tracking mode

Smart Camera - 图28

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.
Smart Camera - 图29


11. smart camera [NUM]detectedlabel [LABEL]?

Smart Camera - 图30

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.
Smart Camera - 图31
You can also place the cards on the line following map, as shown in the following.
Smart Camera - 图32

Example

After you start Novapi, the encoder motor M1 and M2 rotate at power 50% when the smart camera detects barcode 1.
Smart Camera - 图33


12. smart camera[NUM] detected label [LABEL]’s [COORD] coordinate

Smart Camera - 图34

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.
Smart Camera - 图35
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.
Smart Camera - 图36


13. smart camera [NUM] current line’s [TYPE]

Smart Camera - 图37

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.

Smart Camera - 图38
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.

Smart Camera - 图39
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.
Smart Camera - 图40


14. smart camera[NUM] detected cross-point?

Smart Camera - 图41

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.

Smart Camera - 图42

Example

After you start Novapi, the encoder motor M1 and M2 rotate at power 50% if the smart camera detects a cross point.
Smart Camera - 图43


15. smart camera[NUM]detected cross point’s [TYPE]

Smart Camera - 图44

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.

Smart Camera - 图45
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.
Smart Camera - 图46


16. smart camera [NUM] number of branch roads detected

Smart Camera - 图47

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.
Smart Camera - 图48


17. smart camera [NUM] [NUM]-numbered branch road’s angle

Smart Camera - 图49

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.

Smart Camera - 图50

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.
Smart Camera - 图51


18. smart camera[NUM]sets line tracking mode to [LINEMODE]

Smart Camera - 图52

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%.
Smart Camera - 图53


19. initialize smart camera[NUM]: numbered [INDEX] at[PORT]

Smart Camera - 图54

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?

  1. First check which port the smart camera is connected to Novapi. Novapi contains five 5V general ports which are shown in the following figure:
    Smart Camera - 图55
    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.
    Smart Camera - 图56

Example

When you start Novapi, the first smart camera connected to the port 3 of Novapi is set to smart camera 1.
Smart Camera - 图57


20. smart camera[NUM] sets Kp in motor differential speed calculation to[KP]

Smart Camera - 图58

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.
Smart Camera - 图59


21. smart camera [NUM] calculates motor differential speed (auto follows color block[SIG] to [AXIS] axis[TARGET] )

Smart Camera - 图60

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.
Smart Camera - 图61
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240

Example

After you start Novapi, it follows color block 1.
Smart Camera - 图62


22. smart camera[NUM] calculates motor differential speed (auto follows label [LABEL] to[AXIS] axis [TARGET])

Smart Camera - 图63

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.
Smart Camera - 图64
X-axis coordinate range: 0–320
Y-axis coordinate range: 0–240

Example

After you start Novapi, it follows barcode 1.
Smart Camera - 图65


23. smart camera [NUM] calculates motor differential speed(targets the line-following section)

Smart Camera - 图66

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.
Smart Camera - 图67


24. smart camera[NUM] targets area near color block [SIG] to [AXIS]axis[TARGET] ?

Smart Camera - 图68

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.
Smart Camera - 图69
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%.
Smart Camera - 图70


25. smart camera [NUM]targets area near label[LABEL] to [AXIS]axis[TARGET] ?

Smart Camera - 图71

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.
Smart Camera - 图72
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%.
Smart Camera - 图73