Modifications

Sauter à la navigation Sauter à la recherche
1 175 octets ajoutés ,  31 décembre 2016 à 12:55
Ligne 64 : Ligne 64 :     
== Utiliser le code de la bibliothèque ==
 
== Utiliser le code de la bibliothèque ==
 +
Look at the contents of the char_lcd_plate.py file to see the basic usage of the character LCD plate class. The basic usage is to import the library and create an instance of the Adafruit_CharLCDPlate class. The char LCD plate class is smart enough to know how to talk to the character LCD plate without any configuration or parameters.
 +
 +
Once you have an instance of the Adafruit_CharLCDPlate class there are a few functions you can call to interact with the display:
 +
 +
    message(text)
 +
        Print the provided string message to the display. The text string can include linebreak characters ('\n') and will move to the next line when found in the string.
 +
    clear()
 +
        Clear the display and reset the position of message printing to the first column and first line.
 +
    set_color(red, green, blue)
 +
        Set the color of the red, green, and blue backlight LEDs. Each color value should be a 1 for on or 0 for off. For example to set a red backlight call set_color(1,0,0) or to set a purple color call set_color(1,0,1).
 +
 +
You can find a more detailed write-up of the library in this character LCD guide (see the Usage and Raspberry Pi Char LCD Plate pages).
 +
 +
<hr />
    
Interfacer un code d'exemple avec python est très simple!
 
Interfacer un code d'exemple avec python est très simple!
29 917

modifications

Menu de navigation