Raspberry Pi Digital Signage

- Raspberry Pi (Model B).
- SD card, I'm using a 2GB SD card for this project.
- Monitor or TV. I'm using a Toshiba 32" TV for this project.
- HDMI cable, HDMI to DVI cable or Composite cable depend on your monitor/TV.
- Ethernet patch cable.
- A display unit (LCD/LED monitor or TV) that suits your purpose.
- A 5V micro USB power supply or a micro-USB cable to get power from the TV USB port.
- TV wall bracket
- Metal plate and 2 PCS magnetic cylinders
- SoftPerfect Network Scanner software to display the IP address of your computer and Raspberry Pi.
- SSH client software such as puTTy must be installed on your computer that running Microsoft Windows
- You may want to install WinSCP software on your computer for file transfer between a local computer and Raspberry Pi. Beyong this, I'm using WinSCP to Editing/Opening files.
- You must have a working internet connection.

- Power on the Raspberry and wait about 40 seconds to let the Raspberry Pi booting up
- Run the SoftPerfect Network Scanner software
- Click on Options>IP address>Detect Local IP Range from menu as shown in figure below.
- Select your network's IP range. I'm select 192.168.0.138 for the IP as shown in figure below, this is my computer's IP address.
- Click on Start Scanning icon to start the scanner
- The Raspberry Pi's IP address is detected as 192.168.0.223 as shown in figure below
- Run PuTTY
- enter required information as shown in figure below, remember to use your own Raspberry Pi's IP address.
-
Enter pi and raspberry for login and password respectivelylogin as: pi
This email address is being protected from spambots. You need JavaScript enabled to view it.';s password:
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6lThe programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Jan 27 06:18:46 2013 from toshiba.lan
cat /etc/network/interfaces |
iface eth0 inet dhcp
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
- Raspberry IP: 192.168.0.223
- Router IP (Gateway): 192.168.0.254
- Subnet Mask: 255.255.255.0
sudo nano /etc/network/interfaces |
address 192.168.0.223
netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.0.255 gateway 192.168.0.254 |
auto lo iface lo inet loopback allow-hotplug wlan0 |
cat /etc/resolv.conf |
nameserver 192.168.0.254 |
sudo nano /etc/resolv.conf |
sudo apt-get update #download package lists from the repositories sudo apt-get -y install lighttpd |

sudo apt-get -y install php5-common php5-cgi php5
sudo lighty-enable-mod fastcgi-php #Enable the Fastcgi module which will handle the PHP pages
sudo service lighttpd force-reload #restart the Lighttpd service
|

sudo chown www-data:www-data /var/www #chown username:groupname directorysudo chmod 775 /var/www #permission to write to this directory sudo usermod -a -G www-data pi #add the “Pi” user to the “www-data” group |

xinit /usr/bin/midori -e Fullscreen -a http://domain/homepage.html |
-
Install the matchbox Windows Manager software
sudo apt-get install matchbox
- Create a new file in your home directory (/home/pi), I named it startMidori
#!/bin/sh
xset -dpms # disable DPMS (Energy Star) features.
xset s off # disable screen saver
xset s noblank # don't blank the video device
matchbox-window-manager &
midori -e Fullscreen -a http://raspberryIP/yourHomepage.html
- Run the following command, the Midori window should be fullscreen.
xinit ./startMidori #with the leading dot
#!/bin/sh -e
# # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. # Print the IP address
_IP=$(hostname -I) || true if [ "$_IP" ]; then printf "My IP address is %s\n" "$_IP" fi sudo xinit ./home/pi/startMidori & exit 0 |
- The sudo command stands for "superuser do", it assumes you want your application run with root user privileges.
- The "&" cause the application running in background.
- Press CTRL + ALT + F1 exit back to command prompt after the program (Midori) is running.
- Press CTRL + ALT + F7 return to Matchbox Window Manager
sudo apt-get install unclutter |
#!/bin/sh
xset -dpms # disable DPMS (Energy Star) features. xset s off # disable screen saver xset s noblank # don't blank the video device unclutter &
matchbox-window-manager & midori -e Fullscreen -a http://raspberryIP/yourHomepage.html |
sudo nano /boot/cmdline.txt |
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait logo.nologo |

- Add rows dynamically to a table
- Dynamically add textboxes (input fields)
- Dynamically add onkeyup/onkeypress event handler on dynamically created textboxes
- Enter key press behaves like a Tab (Enter as Tab)
- Display images dynamically in HTML
- Formatting the way the date/time is displayed
- Retrieve last modified time for a file
- Watch a file for changes using PHP
- Reading and Writing XML file
- Specify a fixed decimal point for numbers
- Restrict a text field to numbers only
- Set focus on an textboxes (input field)
- Prepare the TV wall bracket
- Get two metal plates from your old computer, or you can easily get it from any bad ISA/PCI card
- Place the two metal plates on the back of the TV in place as shown in figure below
- I have many magnetic cylinders which I use it for my LED display screen modules
- Place two of the magnetic cylinders through the two mounting holes on the Raspberry Pi board
Note: The DC power connecter is reserved for external power in case the USB power from TV is not working. - On the reverse of the board, screw two nuts to the magnetic cylinders.
- Line up the Raspberry Pi so that the two magnetic cylinders are lined up with the two metal plates
- Turn on the TV, it also turn on the Raspberry Pi
- Wait (about 90 seconds) until the first web page is fully loaded
- The exchange information should appear on the TV screen as shown in figure below
- Launch a web browser on a computer and navigate to http://192.168.0.223 (your Raspberry Pi's IP address)
- The client web page should appear as shown in figure below
- Enter the latest exchange rate to each text box field
- Click on Send button to update the information to the server (Raspberry Pi) and allow it to display on the screen
4 comments
-
Comment Link
Friday, 15 September 2017 04:26 posted by Paul
Good article I do something similar but just modify what is on a default raspbian installation. Here are my personal notes you may need to figure a few things out from this but it is a different way to do it. I like the idea of matchbox i will have to take a look at that. using my method you retain a few menu items for restart and exit and C-A-T for opening a terminal for maintenance.
-#Pi configuration information
-#1. Change all passwords for pi and root
-#2. Add user sign pi user has sudo access so we don't want to use
that at the for autologin
-#3. We need to rotate the screen and make sure the hdmi sound is correct.
-#4. confirm some localization and setup the hostname
-#5. Set autologin however we are going to change it to use user frontdesk
-#6 edit the autostart script
-#7 you can't login with ssh as root you must use pi user and then sudo su -
adduser alternateuser
adduser alternateuser sudo
copy pubkey to alternateuser/.ssh/authorized_keys
-#change root password to x
-#change pi password to x
adduser sign
#password sign
-#edit /boot/config.txt
-#uncomment hdmi_drive=2
-#change display_rotate=1
-#set xvnc password
sudo raspi-config
Change hostname to sign
Change boot options to Desktop autologin we will change user later
Change Local information
-#next step will probably break the /usr/bin/raspi-config script it won't
be able to remove the autologin because the script looks for the pi user
edit /etc/lightdm/lightdm.conf
change autologin-user= to autologin-user=sign
reboot
edit /home/sign/.config/lxsession/LXDE-pi/autostart
@xset s off
@xset -dpms
@xset s noblank
@firefox --new-window https://locationofwhatistobdisplayed
#@lxpanel --profile LXDE-pi
#@pcmanfm --desktop --profile LXDE-pi
#@xscreensaver -no-splash
#@point-
-#as user sign install mFull firefox addon
Adding directions to auto fullscreen, having the mFull add-on installed:
1. Go to the Firefox menu (hamburger icon on the upper-right hand
part of the screen)
2. Click “Add-ons”
3. Click the second tab, “Extensions” to find the mFull options
4. Click “Preferences”
5. There will be 3 tabs on this screen. On the first, “Basic”,
check “Always start in fullscreen”; on the second, “Appearance 1”,
uncheck “Show toolbars” and check “Auto hide”.
6. Restart Firefox.
-#edit /etc/xdg/openbox/menu.xml
-#comment out the menu items other than restart and exit
-#to remove keystrokes it appears you would edit
/home/%USER%/.config/openbox/lxde-pi-rc.xml
-# i commented out anything that would execute leaving only config for
mouse and screen stuff.
I have also found some settings to keep the login window up for 20 seconds so that you can log in as root for maintenance
Also in the lxde-pi-rc.xml you should leave or setup the C-A-T to launch xterm that way you can su to disable or enable wifi and do other maintenance. -
Comment Link
Saturday, 02 January 2016 17:22 posted by bkchang
Excellent Pi Project ! This project in fact help a lot on IT Business ! BTW the send & Reload are not working could Admin pls explain a bit detail on how to go about it ?