Explorar o código

【修改】lcd 例程中的错误代码

SummerGift %!s(int64=6) %!d(string=hai) anos
pai
achega
d566d30e6d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/stm32l4_pandora/lcd.py

+ 1 - 1
examples/stm32l4_pandora/lcd.py

@@ -13,7 +13,7 @@ from machine import LCD     # Import the LCD class from machine
 lcd = LCD()                             # Create a LCD object
 lcd.light(False)                        # Close the backlight
 lcd.light(True)                         # Open the backlight
-lcd.set_color(WHITE, BLACK)             # Set background color and foreground color
+lcd.set_color(lcd.WHITE, lcd.BLACK)     # Set background color and foreground color
 lcd.fill(lcd.BLACK)                     # Fill the entire LCD with black
 lcd.fill(lcd.RED)                       # Fill the entire LCD with red
 lcd.fill(lcd.GRAY)                      # Fill the entire LCD with gray