Project 16 Bluetooth Speed Control Smart Car

1.Description
In this project, we will use a Bluetooth to adjust the speed of the smart car. We empower to define a variable speeds and change it to change the speed of the smart car.
2.Flow Chart

3.Wiring Diagram

1). GND, VCC, SDA and SCL of the 8*8 LED board are connected to G(GND), V(VCC), A4 and A5 of the expansion board.
2). The RXD, TXD, GND and VCC of the Bluetooth module are respectively connected to TX, RX, G and 5V on the 8833 motor driver expansion board, while the STATE and BRK pins of the Bluetooth module do not need to be connected.
3). The servo is connected to G, V and A3. The brown wire is interfaced with Gnd(G), the red wire is interfaced with 5V(V) and the orange wire is interfaced with A3.
4). The power is connected to the BAT port
4.Test Code
Before writing the code, it is necessary to import the library files of the 8x16 LED board and the servo. The specific steps are as follows:
Click
to enter the extension library interface of sensors/modules/components, then search for“Matrix 8*16 Aip1640”module
and click it. In this way, “Not loaded” changes to “loaded”, indicating that the“Matrix 8*16 Aip1640”module was added successfully.


Click
to return to the code editor interface, the instruction block of the added “Matrix 8*16 Aip1640”module and “Servo”component can be seen in the module area.

You can drag blocks to edit. Blocks listed below are for your reference
(1).
(2).
(3).
(4).
(5).
(6).
(7).
(8).
(9).
(10).
Complete Test Code
Note: Before uploading the test code, you need to remove the Bluetooth module, otherwise the code will fail to be uploaded.Connect the Bluetooth module after uploading the code successfully.






5.Test Result
After successfully uploading the code to the V4.0 board, connect the wirings according to the wiring diagram, power on the external power then turn the DIP switch to ON. Pairing the APP with Bluetooth, the smart car can be controlled to move by the APP.
Press
, the car will speed up, press
, the car will slow down, and the 8*16 LED board will display the corresponding status pattern of the smart car.