Skip to content

Instantly share code, notes, and snippets.

@Akkiesoft
Created February 25, 2014 10:59
Show Gist options
  • Select an option

  • Save Akkiesoft/9206874 to your computer and use it in GitHub Desktop.

Select an option

Save Akkiesoft/9206874 to your computer and use it in GitHub Desktop.
pcd8544の Pythonライブラリ(https://github.com/XavierBerger/pcd8544)で動く(☝ ՞ਊ ՞)☝を表示するやつ
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import pcd8544.lcd as lcd
if not os.geteuid() == 0:
sys.exit('Script must be run as root')
ON, OFF = [1, 0]
uiiin = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x84, 0xf8, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x80, 0xc0, 0xf0, 0x98, 0x8c, 0x84, 0x8c, 0x88, 0xb8, 0xe0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x60, 0xe0, 0xe0, 0xc0, 0x00, 0x00, 0x20, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x84, 0xf8, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x37, 0xc0, 0x86, 0xbc, 0x8b, 0xd4, 0x3b, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x78, 0xc8, 0x88, 0x88, 0x18, 0xb8, 0xec, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x37, 0xc0, 0x86, 0xbc, 0x8b, 0xd4, 0x3b, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0e, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x15, 0x15, 0x15, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
try:
lcd.init()
lcd.cls()
lcd.backlight(ON)
for x in uiiin:
lcd.lcd_data(x)
time.sleep(0.01)
for x in uiiin:
lcd.lcd_data(x)
time.sleep(60)
except KeyboardInterrupt:
pass
finally:
lcd.cls()
lcd.backlight(OFF)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment