EasyManua.ls Logo

ADEEPT PiCar-Pro - Lesson 6: Displaying Text on the OLED Screen; Components for OLED Screen Display

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...
77
17. self.LED_BRIGHTNESS,
18. self.LED_CHANNEL
19. )
20. self.strip.begin()
21. def colorWipe(self,color): # This function is used to change the color of the LED lamp
22. for i in range(self.strip.numPixels()): #Only one LED lamp color can be set at a time, so a cycle is
required
23. self.strip.setPixelColor(i, color)
24. self.strip.show() #After calling the show method, the color will really change
Build LED control class.
1. if __name__ == '__main__':
2. led = LED()
3. led.colorWipe(0,0,255)
The colorWipe() method must be used to pack the RGB value, and then pass it
to the function for color switching.
Lesson 6 Displaying Text on the OLED Screen
In this lesson, we will learn how to display text on the OLED screen.
6.1 Components used in this course
Components
Quantity
Picture
Raspberry Pi
1
Robot HAT
1
4 pin wire
1
OLED screen
1

Related product manuals