Erinevus lehekülje "Karakter LCD mooduli juhtimine LCDproc tarkvara paketiga" redaktsioonide vahel

Allikas: Kuutõrvaja
(Veel mõned pildid LCDprocist töös)
 
(ei näidata 2 kasutaja 20 vahepealset redaktsiooni)
13. rida: 13. rida:
 
Riistvara näide põhineb HD44780 tüüpi 8-bitise karakter LCD ühendamisel arvuti paralleelporti. Sõltuvalt LCD moodulist tuleb taustvalgustuse puhul kasutada sobivat pingeregulaatorit (optional skeemil). LCD loogika jaoks on vajalik 5V toide, mis tuleks võtta arvuti toiteplokist. Riistvara kõikvõimalikud ühendusviisid nn. Serial-LCD, USB-LCD ja Keypad on kirjeldatud lehel [http://lcdproc.sourceforge.net/docs/stable-0-4-4-user-html/c443.html LCDproc Drivers]
 
Riistvara näide põhineb HD44780 tüüpi 8-bitise karakter LCD ühendamisel arvuti paralleelporti. Sõltuvalt LCD moodulist tuleb taustvalgustuse puhul kasutada sobivat pingeregulaatorit (optional skeemil). LCD loogika jaoks on vajalik 5V toide, mis tuleks võtta arvuti toiteplokist. Riistvara kõikvõimalikud ühendusviisid nn. Serial-LCD, USB-LCD ja Keypad on kirjeldatud lehel [http://lcdproc.sourceforge.net/docs/stable-0-4-4-user-html/c443.html LCDproc Drivers]
  
[[Pilt:Lcd_schem.png|1200px|thumb|center|LPT porti ühendamise skeem]]
+
[[Pilt:Lcd_schem.png|1024px|thumb|center|LPT pordi ühendamise skeem]]
  
  
  
 
=== Tarkvara installeerimine ja seadistamine ===
 
=== Tarkvara installeerimine ja seadistamine ===
 +
 +
Järgnev näide põhineb HD44780 8-bitise LCD moodulil ja Winamp ühendusviisil nagu on kirjeldatud LPT pordi ühendamise skeemil.
  
 
LCDproc tarkvara installeerimiseks FreeBSD jaoks on olemas valmis install:
 
LCDproc tarkvara installeerimiseks FreeBSD jaoks on olemas valmis install:
23. rida: 25. rida:
 
  bash# pkg_add -r lcdproc
 
  bash# pkg_add -r lcdproc
  
LCDproc serveri teenuse seadistamiseks oleks lihtne näitest, kataloogis /usr/local/etc/, teha koopia nimega "lcdproc.conf" ja seadistada nagu on alljärgnev näide:
+
LCDproc serveri teenuse seadistamiseks oleks lihtne näitest, kataloogis /usr/local/etc/, teha koopia nimega "LCDd.conf" ja muuta sellised read:
  
## Server section with all kinds of settings for the LCDd server ##
+
Lisaks täpsemat [http://lcdproc.sourceforge.net/docs/lcdproc-0-5-4-user.html#configure-lcdd infot]
[server]
+
<source lang=bash>
 
 
# Where can we find the driver modules ?
 
# IMPORTANT: Make sure to change this setting to reflect your
 
#            specific setup! Otherwise LCDd won't be able to find
 
#            the driver modules and will thus not be able to
 
#            function properly.
 
# NOTE: Always place a slash as last character !
 
DriverPath=/usr/local/lib/lcdproc/
 
 
 
# Tells the server to load the given drivers. Multiple lines can be given.
 
# The name of the driver is case sensitive and determines the section
 
# where to look for further configuration options of the specific driver
 
# as well as the name of the dynamic driver module to load at runtime.
 
# The latter one can be changed by giving af File= directive in the
 
# driver specific section.
 
#
 
# The following drivers are supported:
 
#  bayrad, CFontz, CFontz633, CFontzPacket, curses, CwLnx, ea65, 
 
#  EyeboxOne, g15, glcdlib, glk, hd44780, icp_a106, imon, imonlcd, IOWarrior,
 
#  irman, joy, lb216, lcdm001, lcterm, lirc, lis, MD8800, ms6931, mtc_s16209x,
 
#  MtxOrb, mx5000, NoritakeVFD, picolcd, pyramid, sed1330, sed1520, serialPOS,
 
#  serialVFD, shuttleVFD, sli, stv5730, svga, t6963, text, tyan, ula200,
 
#  xosd
 
 
  Driver=hd44780
 
  Driver=hd44780
 
 
  # Tells the driver to bind to the given interface
 
  # Tells the driver to bind to the given interface
 
  Bind=127.0.0.1
 
  Bind=127.0.0.1
 
 
  # Listen on this specified port; defaults to 13666.
 
  # Listen on this specified port; defaults to 13666.
 
  Port=13666
 
  Port=13666
 
 
  # Sets the reporting level; defaults to 2 (warnings and errors only).
 
  # Sets the reporting level; defaults to 2 (warnings and errors only).
 
  #ReportLevel=3
 
  #ReportLevel=3
 
 
  # Should we report to syslog instead of stderr ? [default: no; legal: yes, no]
 
  # Should we report to syslog instead of stderr ? [default: no; legal: yes, no]
 
  #ReportToSyslog=yes
 
  #ReportToSyslog=yes
 
 
  # User to run as.  LCDd will drop its root priviledges, if any,
 
  # User to run as.  LCDd will drop its root priviledges, if any,
 
  # and run as this user instead.
 
  # and run as this user instead.
 
  User=nobody
 
  User=nobody
 
 
  # The server will stay in the foreground if set to true.
 
  # The server will stay in the foreground if set to true.
 
  #Foreground=no
 
  #Foreground=no
 +
### Driver sections are below this line, in alphabetical order  ###
 +
</source>
 +
 +
Sõltuvalt skeemi ühendusviisist tuleb kirjeldada paramaatrid "LCDd.conf" failis:
 +
 +
<source lang=bash>
 +
## Hitachi HD44780 driver ##
 +
[hd44780]
 +
# Select what type of connection. See documentation for types.
 +
ConnectionType=winamp
 +
# Port where the LPT is [ususal: 0x278, 0x378 and 0x3BC]
 +
Port=0x378
 +
# Device of the serial interface [default: /dev/lcd]
 +
Device=/dev/ttyS0
 +
# Bitrate of the serial port (0 for interface default)
 +
Speed=0
 +
# If you have a keypad connected.
 +
# You may also need to configure the keypad layout further on in this file.
 +
Keypad=no
 +
# Set the initial contrast (bwctusb and lcd2usb) [default: 500; legal: 0 - 1000]
 +
Contrast=0
 +
# Set brightness of the backlight (lcd2usb only) [default: 0; legal 0 - 1000]
 +
#Brightness=1000
 +
#OffBrightness=0
 +
# If you have a switchable backlight.
 +
Backlight=no
 +
# If you have the additional output port ("bargraph") and you want to
 +
# be able to control it with the lcdproc OUTPUT command
 +
OutputPort=no
 +
# Specifies if the last line is pixel addressable or it controls an
 +
# underline effect. [default: true (= pixel addressable); legal: yes, no]
 +
#Lastline=true
 +
# Specifies the size of the LCD.
 +
# In case of multiple combined displays, this should be the total size.
 +
Size=20x2
 +
</source>
 +
 +
LCDproc kliendi teenuse seadistamiseks oleks lihtne näitest, kataloogis /usr/local/etc/, teha koopia nimega "lcdproc.conf" ja muuta sellised read vastavalt soovile, et mis infot vahetuvatel ekraanidel kuvatakse:
 +
 +
<source lang=bash>
 +
# LCDproc client configuration file
 +
## general options ##
 +
[lcdproc]
 +
# address of the LCDd server to connect to
 +
Server=localhost
 +
# Port of the server to connect to
 +
Port=13666
 +
# set reporting level
 +
ReportLevel=2
 +
# report to to syslog ?
 +
ReportToSyslog=false
 +
# run in foreground [default: false; legal: true, false]
 +
#Foreground=true
 +
# PidFile location when running as daemon [default: /var/run/lcdproc.pid]
 +
#PidFile=/var/run/lcdproc.pid
 +
# slow down initial announcement of modes (in 1/100s)
 +
#delay=2
 +
# display name for the main menu [default: LCDproc HOST]
 +
#DisplayName=lcdproc
 +
 +
## screen specific configuration options ##
 +
[CPU]
 +
# Show screen
 +
Active=false ## NB! märksõna false all mõeldakse, et seda ekraani ei kuvata.
 +
OnTime=1
 +
OffTime=2
 +
ShowInvisible=false
 +
 +
[Iface]
 +
# Show screen
 +
Active=True
 +
# Show stats for Interface0
 +
Interface0=fxp1
 +
# Interface alias name to display [default: <interface name>]
 +
Alias0=WAN
 +
# Show stats for Interface1
 +
Interface1=fxp0
 +
Alias1=LAN
 +
# Units to display [default: byte; legal: byte, bit, packet]
 +
unit=bit
 +
# add screen with transferred traffic
 +
#transfer=TRUE
 +
 +
[Memory]
 +
# Show screen
 +
Active=false
 +
 +
[Load]
 +
# Show screen
 +
Active=false
 +
# Min Load Avg at which the backlight will be turned off [default: 0.05]
 +
LowLoad=0.05
 +
# Max Load Avg at which the backlight will start blinking [default: 1.3]
 +
HighLoad=1.3
 +
 +
[TimeDate]
 +
# Show screen
 +
Active=false
 +
# time format [default: %H:%M:%S; legal: see strftime(3)]
 +
TimeFormat="%H:%M:%S"
 +
# date format [default: %x; legal: see strftime(3)]
 +
DateFormat="%x"
 +
 +
[About]
 +
# Show screen
 +
Active=false
 +
 +
[SMP-CPU]
 +
# Show screen
 +
Active=True
 +
 +
[OldTime]
 +
# Show screen
 +
Active=false
 +
# time format [default: %H:%M:%S; legal: see strftime(3)]
 +
TimeFormat="%H:%M:%S"
 +
# date format [default: %x; legal: see strftime(3)]
 +
DateFormat="%x"
 +
 +
[BigClock]
 +
# Show screen
 +
Active=True
 +
 +
[Uptime]
 +
# Show screen
 +
Active=false
 +
 +
[Battery]
 +
# Show screen
 +
Active=false
 +
 +
[CPUGraph]
 +
# Show screen
 +
Active=false
 +
 +
[ProcSize]
 +
# Show screen
 +
Active=false
 +
 +
[Disk]
 +
# Show screen
 +
Active=True
 +
 +
[MiniClock]
 +
# Show screen
 +
Active=false
 +
# time format [default: %H:%M; legal: see strftime(3)]
 +
TimeFormat="%H:%M"
 +
# EOF
 +
</source>
 +
 +
Peale seadistusi tuleks teha klient prorgammile restart:
 +
 +
bash# /usr/local/etc/rc.d/lcdproc restart
 +
 +
===Veel mõned pildid LCDprocist töös===
 +
 +
[[Pilt:082911223518.jpg]]
 +
 +
[[Pilt:082911223537.jpg]]
 +
 +
[[Pilt:082911223559.jpg]]
 +
 +
===Mõned sobivad LCD'd===
 +
 +
näiteks selline 
 +
 +
*https://www.elfa.se/elfa3~ee_et/elfa/init.do?item=75-513-48&toc=20352
 +
siin erinev valik neid LCD-sid lihtsalt vaata et lcd-l oleks samasugused ühendusotsad olemas
 +
*https://www.elfa.se/elfa3~ee_et/elfa/init.do?item=75-513-48&toc=20352
 +
*https://www.elfa.se/elfa3~ee_et/elfa/init.do?toc=20348#toc=20352;

Viimane redaktsioon: 2. november 2011, kell 01:01

Linuxil põhinevate operatsioonisüsteemi ressusrsikasutuse kuvamine realajas arvuti korpuse paneelil

LCD moodul

Teatud juhtudel oleks mugav kasutada väikest ekraani mõnede olulisemate näitajate kuvamiseks sellisel arvutil millel tavaliselt puudub vastav väljundseade. Selline lahendus oleks üsna asjakohane näiteks serverite juures, kus kasutaja saab visuaalselt jälgida selle seadme praegust olekut ning resursikasutust. Üks lihtsam riistvaraline lahendus oleks mõni suhteliselt odav 8-bitine karakter LCD moodul, mille juhtimine käiks läbi LPT pordi LCDproc tarkvara abil.

Tarkvara

LCDproc on vabavaraline tarkvara pakett Linux tüüpi operatsioonisüsteemi jaoks erinevat tüüpi LCD paneelide juhtimiseks läbi erinevate arvuti I/O seadmete vastava draiveri abil nn. RS-port, USB jne. See tarkvara koosneb kahest programmist ehk teenuse poolest - Server LCDd ja Klient LCDproc teenusest, kus siis need teenused suhtlevad TCP protokolli abil tüüpilise setupi puhul läbi opsüsteemi kohaliku loopbacki. Seejuures saab serveri poole tarkvara LCDd juhtida ka teiste erinevate klient tarkvaradega(sõltuvalt mis andmeid kuvada) ja seda ka teisest arvutist läbi kohaliku võrgu. Võimalik on ka ise kirjutada vastav klientprogramm või kirjutada LCD ekraanile käsitsi läbi telneti, kasutades widget language sünteksit.


Riistvara

Riistvara näide põhineb HD44780 tüüpi 8-bitise karakter LCD ühendamisel arvuti paralleelporti. Sõltuvalt LCD moodulist tuleb taustvalgustuse puhul kasutada sobivat pingeregulaatorit (optional skeemil). LCD loogika jaoks on vajalik 5V toide, mis tuleks võtta arvuti toiteplokist. Riistvara kõikvõimalikud ühendusviisid nn. Serial-LCD, USB-LCD ja Keypad on kirjeldatud lehel LCDproc Drivers

LPT pordi ühendamise skeem


Tarkvara installeerimine ja seadistamine

Järgnev näide põhineb HD44780 8-bitise LCD moodulil ja Winamp ühendusviisil nagu on kirjeldatud LPT pordi ühendamise skeemil.

LCDproc tarkvara installeerimiseks FreeBSD jaoks on olemas valmis install:

bash# pkg_add -r lcdproc

LCDproc serveri teenuse seadistamiseks oleks lihtne näitest, kataloogis /usr/local/etc/, teha koopia nimega "LCDd.conf" ja muuta sellised read:

Lisaks täpsemat infot

 Driver=hd44780
 # Tells the driver to bind to the given interface
 Bind=127.0.0.1
 # Listen on this specified port; defaults to 13666.
 Port=13666
 # Sets the reporting level; defaults to 2 (warnings and errors only).
 #ReportLevel=3
 # Should we report to syslog instead of stderr ? [default: no; legal: yes, no]
 #ReportToSyslog=yes
 # User to run as.  LCDd will drop its root priviledges, if any,
 # and run as this user instead.
 User=nobody
 # The server will stay in the foreground if set to true.
 #Foreground=no
 ### Driver sections are below this line, in alphabetical order  ###

Sõltuvalt skeemi ühendusviisist tuleb kirjeldada paramaatrid "LCDd.conf" failis:

 ## Hitachi HD44780 driver ##
 [hd44780]
 # Select what type of connection. See documentation for types.
 ConnectionType=winamp
 # Port where the LPT is [ususal: 0x278, 0x378 and 0x3BC]
 Port=0x378
 # Device of the serial interface [default: /dev/lcd]
 Device=/dev/ttyS0
 # Bitrate of the serial port (0 for interface default)
 Speed=0
 # If you have a keypad connected.
 # You may also need to configure the keypad layout further on in this file.
 Keypad=no
 # Set the initial contrast (bwctusb and lcd2usb) [default: 500; legal: 0 - 1000]
 Contrast=0
 # Set brightness of the backlight (lcd2usb only) [default: 0; legal 0 - 1000]
 #Brightness=1000
 #OffBrightness=0
 # If you have a switchable backlight.
 Backlight=no
 # If you have the additional output port ("bargraph") and you want to
 # be able to control it with the lcdproc OUTPUT command
 OutputPort=no
 # Specifies if the last line is pixel addressable or it controls an
 # underline effect. [default: true (= pixel addressable); legal: yes, no]
 #Lastline=true
 # Specifies the size of the LCD.
 # In case of multiple combined displays, this should be the total size.
 Size=20x2

LCDproc kliendi teenuse seadistamiseks oleks lihtne näitest, kataloogis /usr/local/etc/, teha koopia nimega "lcdproc.conf" ja muuta sellised read vastavalt soovile, et mis infot vahetuvatel ekraanidel kuvatakse:

 # LCDproc client configuration file
 ## general options ##
 [lcdproc]
 # address of the LCDd server to connect to
 Server=localhost
 # Port of the server to connect to
 Port=13666
 # set reporting level
 ReportLevel=2
 # report to to syslog ?
 ReportToSyslog=false
 # run in foreground [default: false; legal: true, false]
 #Foreground=true
 # PidFile location when running as daemon [default: /var/run/lcdproc.pid]
 #PidFile=/var/run/lcdproc.pid
 # slow down initial announcement of modes (in 1/100s)
 #delay=2
 # display name for the main menu [default: LCDproc HOST] 
 #DisplayName=lcdproc
 
 ## screen specific configuration options ##
 [CPU]
 # Show screen
 Active=false			## NB! märksõna false all mõeldakse, et seda ekraani ei kuvata.
 OnTime=1
 OffTime=2
 ShowInvisible=false

 [Iface]
 # Show screen
 Active=True
 # Show stats for Interface0
 Interface0=fxp1
 # Interface alias name to display [default: <interface name>]
 Alias0=WAN
 # Show stats for Interface1
 Interface1=fxp0
 Alias1=LAN
 # Units to display [default: byte; legal: byte, bit, packet]
 unit=bit
 # add screen with transferred traffic
 #transfer=TRUE

 [Memory]
 # Show screen
 Active=false

 [Load]
 # Show screen
 Active=false
 # Min Load Avg at which the backlight will be turned off [default: 0.05]
 LowLoad=0.05
 # Max Load Avg at which the backlight will start blinking [default: 1.3]
 HighLoad=1.3

 [TimeDate]
 # Show screen
 Active=false
 # time format [default: %H:%M:%S; legal: see strftime(3)]
 TimeFormat="%H:%M:%S"
 # date format [default: %x; legal: see strftime(3)]
 DateFormat="%x"

 [About]
 # Show screen
 Active=false

 [SMP-CPU]
 # Show screen
 Active=True

 [OldTime]
 # Show screen
 Active=false
 # time format [default: %H:%M:%S; legal: see strftime(3)]
 TimeFormat="%H:%M:%S"
 # date format [default: %x; legal: see strftime(3)]
 DateFormat="%x"

 [BigClock]
 # Show screen
 Active=True

 [Uptime]
 # Show screen
 Active=false

 [Battery]
 # Show screen
 Active=false

 [CPUGraph]
 # Show screen
 Active=false

 [ProcSize]
 # Show screen
 Active=false

 [Disk]
 # Show screen
 Active=True

 [MiniClock]
 # Show screen
 Active=false
 # time format [default: %H:%M; legal: see strftime(3)]
 TimeFormat="%H:%M"
 # EOF

Peale seadistusi tuleks teha klient prorgammile restart:

bash# /usr/local/etc/rc.d/lcdproc restart

Veel mõned pildid LCDprocist töös

082911223518.jpg

082911223537.jpg

082911223559.jpg

Mõned sobivad LCD'd

näiteks selline

siin erinev valik neid LCD-sid lihtsalt vaata et lcd-l oleks samasugused ühendusotsad olemas