CN
How to use the RISC-V development board to achieve automatic car patrol line driving?

2022.01.07

Recently DFRobot has developed an exhibit of a patrol trolley that uses a RISC-V main control development board equipped with a StarFive JH7100 chip running the Fedora Linux operating system.

With the support of the PinPong library (a Python library) , the line patrol trolley uses Mind+ (a graphical programming software) for GPIO control and HUSKYLENS (an artificial intelligence vision sensor) for intelligent route identification to achieve the function of automatic line patrol driving.

Description

1、StarFive JH7100

The JH7100 is equipped with dual-core U74, sharing 2MB L2 cache, operating at up to 1.2GHz and supporting Linux OS. StarFive's self-developed ISP is adapted to the most popular sensors, and the built-in image video processing subsystem supports H265/H264/JPEG codec. The integrated high-performance, low-power Vision DSP and NNE make application development more intelligent and efficient. The JH7100 is capable of performing various complex video image processing and intelligent vision calculations to meet various visual real-time processing needs at the edge. 

2、PinPong Library

PinPong Library is a set of Python libraries to control open source hardware main control board, based on Firmata protocol and compatible with MicroPython syntax, you can start to use Python to control open-source hardware in 5 minutes. With the PinPong Library, you can directly use Python code to a variety of common open-source hardware programming. The PinPong Library is designed to allow developers to develop without being tied to complicated hardware models, and to shift the focus to the business implementation of the software. Even if the program is developed with Arduino at the beginning of the development, once it is deployed, it can run normally by modifying the parameters of the hardware, realizing "once written, everywhere running."

With the joint efforts of DFRobot's and StarFive's engineers, the PinPong Library has been fully adapted to StarFive's RISC-V main control board, and the PinPong Library can be used to read and operate various sensors and actuators directly.

3、Mind+

Mind+ is a DFRobot self-developed graphical programming software that integrates various main control boards and hundreds of open-source hardware, supporting artificial intelligence (AI) and the Internet of Things (IoT). Mind+ not only supports graphical programming but also supports advanced programming languages such as Python/C/C++, allowing users to achieve a series of tasks such as environment configuration by simplifying a state where work can be performed just by opening the software. At present, DFRobot has completed the adaptation of the StarFive JH7100 SoC, which allows the development of the StarFive RISC-V main control board in a low-code way, further reducing the development difficulty of the StarFive VisionFive single-board computer.

4、HUSKYLENS artificial intelligence vision sensor

This patrol cart uses HUSKYLENS as the vision sensor. HUSKYLENS is an easy-to-use artificial intelligence camera (vision sensor) with 6 built-in functions: face recognition, object tracking, object recognition, patrol tracking, colour recognition, label recognition, object classification, 2D code recognition, and barcode recognition. HUSKYLENS has an on-board UART/I2C interface, which can be connected to mainstream development boards such as Arduino, Raspberry Pi, LattePanda, micro: bit and so on to realize hardware Seamless docking, direct output recognition results to the controller, without tossing complex algorithms, you can do very creative projects. The exhibit realizes the adaptation of HUSKYLENS and StarFive RISC-V main control development board.

HUSKYLENS is very easy to use. Toggle the function button to switch algorithms; press the learning button and HUSKYLENS learns new things. Since HUSKYLENS comes with a 2.0" IPS display, no computer assistance is needed when tuning parameters, the debugging process and recognition results are displayed directly on the screen, what you see is what you get. And the built-in machine learning technology makes HUSKYLENS has the ability of face recognition and object recognition, long-press the learning button, it will be able to learn from different angles and ranges, the more it learns the more accurate.

HOW TO DO IT
Functions
a) PinPong is used to drive the trolley into action, and HUSKYLENS is used for line patrol.

b) HUSKYLENS communicates with the StarFive JH7100 using the I2C bus.

c) Using 2 IO ports to control the motor direction.

d) Using 2 PWM ports to control the motor speed.

e) Automatic operation at power-on.

Features

a) Automatic operation.

b) expandable development.

Steps

a) When the motherboard is powered on and enters the system, it will automatically execute /root/linefollower.py immediately.

b) The learning of line identification needs to be controlled by a human, click the button in the upper right corner of HUSKYLENS to learn the black line that needs to be identified, and the white line with arrow turns into the blue line when the learning is completed.

c) Once the learning is completed, the machine can be placed on the patrol track and start patrolling.

This case demonstrates the great potential of StarFive's RISC-V development board in robotics and its ability to be well adapted to various sensors for IoT control. In the next stage, StarFive will cooperate with DFRobot to develop more IoT industrial control applications based on StarFive's VisionFive single-board computer and the new generation JH7110 chip to promote the application landing in the IoT field.

Hot News