19 handle = pi.i2c_open(1, YL_40, 0)
21 stdscr = curses.initscr()
28 stdscr.addstr(10, 0,
"Brightness")
29 stdscr.addstr(12, 0,
"Temperature")
30 stdscr.addstr(14, 0,
"AOUT->AIN2")
31 stdscr.addstr(16, 0,
"Resistor")
40 pi.i2c_write_byte_data(handle, 0x40 | ((a+1) & 0x03), aout&0xFF)
41 v = pi.i2c_read_byte(handle)
44 stdscr.addstr(10+a*2, 12, str(v) +
' ')
45 stdscr.addstr(10+a*2, 16,
'#' * hashes +
' ' * spaces )