樹莓派 Raspberry Pi 安裝1602 LCD (可搭配Volumio顯示)

LCD1602


升級套件,若已安裝可跳過

sudo apt-get update


安裝LCDProc套件(此安裝過程會有點久)

sudo apt-get install lcdprocsudo

apt-get install rcconfapt-get

install pkg-configapt-get

install build-essential (可省略)


1.修改LCD設定

sudo nano /usr/local/etc/LCDd.conf

DriverPath=/usr/lib/arm-linux-gnueabihf/lcdproc/

Driver=hd44780


在設定檔中找到 [hd44780]

ConnectionType=lcd2usb

Speed=0

Keypad=yes

Contrast=850

Brightness=800

OffBrightness=0

Backlight=yes

OutputPort=no

Size=16x2

CharMap=hd44780_default


2.安装MPDlcd套件

sudo apt-get install python-mpd

sudo apt-get install python-pip

sudo pip install mpdlcd

wget -O /etc/mpdlcd.conf https://raw.github.com/rbarrois/mpdlcd/master/mpdlcd.conf


3.讓MPDlcd自動啟動執行

sudo nano /etc/init.d/mpdlcd

加入下列設定


#! /bin/shcase "$1" in start) /usr/local/bin/mpdlcd --no-syslog & ;; stop) killall mpdlcd ;; *) echo "Usage: /etc/init.d/mpdlcd {start|stop}" exit 1 ;;esacexit 0#

sudo chmod a+x /etc/init.d/mpdlcd

sudo update-rc.d mpdlcd defaults

sudo update-rc.d LCDd defaults


sudo shutdown -r now


若要修改LCD顯示可透過下列調整 |

sudo nano /etc/mpdlcd.conf

standard pattern for you to edit:pattern2 = {song format=”%(artist)s”,speed=4} {elapsed}{song format=”%(title)s”,speed=2} {state}

留言

這個網誌中的熱門文章

TeknoParrot 模擬器介紹,俗稱《鸚鵡模擬器》

[轉貼] ASP.NET傳遞參數給Crystal Report做Export或Print的動作

[轉貼] Server 端Post資料到 .ashx