Ejemplo n.º 1
0


#------------------------------------

# Main

# Initialise display and backlite
PiLCD.lcd_init()
PiLCD.start_PWM()

scbk = True

# Turn on backlight
# Set colour as magenta ish
PiLCD.led_set(100,0,100)


# setup RSS info for BBC website

# Define rss list - format is 'exact rss title','meaningful title'
# Each list entry is in 2 parts firstly the exact RSS search string for the BBC site
# then the title to display
subject=['world','World','uk','UK','politics','Politics','entertainment_and_arts','Ent']

# 'technology','Tech',  # other RSS options on BBC site

# Setup inital message so mess is defined on first pass through 'while' loop
PiLCD.mess = 	mess_build(subject)
rssup = True	# avoid missing first update slot
Ejemplo n.º 2
0
print()
print("control C to exit")
print()


PiLCD.lcd_string(tline1,1,0)
PiLCD.lcd_string(tline2,2,0)


col = 0 	#setup initial values
rl = 50
gl = 50
bl = 50

# Turn on backlight to initial values
PiLCD.led_set(rl,gl,bl)

sleep(1)

# display keypress functions on LCD
tline1 = "S1 to sel colour."
tline2 = "S2=up S3=down"

PiLCD.lcd_string(tline1,1,0)
PiLCD.lcd_string(tline2,2,0)


while True:
	# Select colour
	if GPIO.input(PiLCD.LCD_SW1) == False:
		col = col + 1