EasyManua.ls Logo

ADEEPT PiCar-Pro - Warning Light Function Code

ADEEPT PiCar-Pro
178 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
160
11.2.1 Running the warning light program
1. Turn on PiCarPro, the boot time is about 1 minute.
2. After PiCarPro is turned on, enter the IP address of your Raspberry Pi with the
Google browser of your mobile phone or computer, and access port 5000, for example:
192.168.3.44:5000 (see lesson 2 for detailed steps). The web controller will then be
displayed on the browser.
3. Click "POLICE LIGHT", PiCarPro starts flashing lights of different colors.
4. When you want to stop the warning light function, click "POLICE LIGHT" again.
11.2.2 Main code program
For the complete code, please refer to the file robotLight.py.
Warning light mode method function
1. def policeProcessing(self):
2. for i in range(0,3):
3. self.colorWipe(Color(0,0,255))
4. time.sleep(0.05)
5. self.colorWipe(Color(0,0,0))
6. time.sleep(0.05)

Related product manuals