Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

247 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Display

The display repo contains all the code for the screens we use to display events, traffic, computer use, and study room occupancy around the Mary Idema Pew Library. The system is written in PHP with a bit of javascript and rests on several data sources:

A local MySQL database contains all the data about traffic and space usage. This data is entered manually by student periodically as they roam the building, using an online form (see the library-traffic repo for the form itself)

The computer availability repo is integrated into many of the displays via an iframe to show computer usage. See the computer_availability repo for more about that system.

An API constructed for us by Campus IT provides data about room reservations in the building, including the multipurpose room, which powers most of the event displays.

There are several screens in the system, each with a different purpose:

Interactive.php: This is the screen used by the interactive kiosks throughout the library. It shows building hours, temperature, time, weather, current group study room occupancy, computer use, and a heat map of traffic in the building. It also displays touchable emojis people can use to indicate their current level of satisfaction with the building and services. This data powers the emoji display in some of the other static screens.

Interactive Screen

multiPurpose.php: Event and traffic screen, designed for the screen that hangs just outside the multipurpose room on the atrium level of MIP. It shows daily events for that space and an indicator of how full it is and whether itÕs open for use or has an event taking place currently.

Multipurpose Screen

week.php: This display shows in several places on the first and atrium levels: behind the desk, in the main entryway, and in the KC connector tunnel. It shows weekly events in the multipurpose room, as well as an emoji indicating the overall mood of people in the building, calculated from the touchable emojis on the interactive screen.

Events Screen

pick.php: This screen allows desk staff to look at scheduled events for all the rooms and spaces in the building. It was designed to help them answer patron questions about events in the building. ItÕs used only at the service desk.

Most of the displays use an html meta-refresh tag to regularly reload and update themselves. Most screens are on a 15-minute timer, although some of the static screens (like week.php) are on a longer timer.

Most of the data used by the system is cached locally due to network traffic issues or to reduce load on the APIs that supply the data. Whenever the interactive screens are loaded, they check to see if an XML file (RoomReservationData.xml) is more than an hour old. If it is, the screen triggers a function that refreshes the file. Likewise, if the file is missing or corrupt, the screen regenerates the file. The computer use component has a similar caching feature. Traffic data is the exception-that data is requested very time the screen is loaded (but since new data is uploaded only once an hour, it only appears to update once an hour.) Likewise, the weekly displays recalculate the overall mood every time they are called.

All screens can display a message that overrides some of the content. This is intended to be used only in emergencies. The form for inputting one is addMessage.php and requires a password. Messages are deposited in the same database that contains the traffic data, where they are picked up by a javascript thatÕs basically constantly checking to see if thereÕs a message to display. The javascript passes the message to screens via AJAX, which display a pop-up with the message that covers part of the screen.

The system relies on several supporting files to work:

PHP directory

Floors: each floor in the traffic heatmap on the interactive screens has its own php file, showing the areas for study on that floor. The interactive screen (interactive.php) decides which floor to show based on a GET parameter passed in the URL, in the form: ?floor=1, with floor numbers ranging from 0 (atrium) to four. So the URL for the fourth floor would be:

https://prod.library.gvsu.edu/display/interactive.php?floor=4

Functions.php contains most of the underlying code the system runs on, such as the code that actually retrieves data from the room reservation API and creates the XML file used for display.

js directory

eventMessage is used by the dynamic javascript that makes the messaging feature described above work. It checks for any stored messages and passes them to the calling javascript.

Emojione.js Used to display the large emojis on the weekly display

interactive.js Updates the weather and time on the interactive displays. It also checks for messages and shows them.

moment Helper function for formatting and showing time. Used in a few places, but primarily on the interactive displays.

Similarly, mood.php is used by the javascript that shows emojis on the weekly display. It queries the database and computes the mean emoji value than passes that back to the display. The weekly displays use javascript to show a larger emoji than the ones on the interactive displays, which are static images, primarily because the larger static images of the emojis cost money to buy the rights for, and the smaller static images are free to use.

About

Interactive display for way-finding at Mary Idema Pew Library

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages