Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
blocks:app-note:visitor:basic-tag-only [2022-12-29 11:11] admin created |
blocks:app-note:visitor:basic-tag-only [2023-01-10 15:39] (current) admin [Installation] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Stub withnpreliminary | + | ====== Collecting Data using RFID/NFC Tokens ====== |
+ | This application note provides a more complete scenario of a personal visitor experience. This example is based solely on tokens such as RFID or NFC tags, bracelets or cards for visitor identification. The visitor receives such a token during check-in, possibly along with registering some basic information such as name and email. The token is then returned when the visitor leaves. | ||
+ | |||
+ | :!: **NOTE:** While you can use this application note as-is without any programming knowledge, you will need programming knowledge in order to enhance it and adapt it to your own needs. | ||
+ | |||
+ | ==== Stations ==== | ||
+ | |||
+ | This is still a rather easy-to-follow example, based on a small number of stations: | ||
+ | |||
+ | * **Reception** where visitors check in and receive their ID tokens. | ||
+ | * **InfoStation** provides some information that will be useful at the next station. This information can only be viewed once. | ||
+ | * **QuizStation** presents a simple quiz game where a game score is collected. In order to play the quiz, the visitor must first have been at the InfoStation. | ||
+ | * **GoodByeStation** where visigors check out, and view some results of their visit, including a game high-score for the quiz. | ||
+ | |||
+ | ==== Library Support ==== | ||
+ | |||
+ | This example introduces the concept of library support classes, implementing much of the basic functionality that tends to be common, such as: | ||
+ | |||
+ | * Keeping track of who's where, and responding when visitors arrive and leave stations. | ||
+ | * Collection, presentation and persistence of aggregate data (here the high-score list of the game). | ||
+ | * Integrating token and phone identification, | ||
+ | |||
+ | ==== Data Collected ==== | ||
+ | |||
+ | As usual, the data collected is defined as a // | ||
+ | |||
+ | < | ||
+ | @record(" | ||
+ | class BasicTagOnlyData extends RecordBase implements VisitorRecordBase { | ||
+ | @id() idCode: string; | ||
+ | @field() name: string; | ||
+ | @field() currentStation: | ||
+ | @field() whenJoined: number; | ||
+ | @field() email: string; | ||
+ | @field() briefed: boolean; | ||
+ | @field() quizScore: number; | ||
+ | @field() speakerTall: | ||
+ | @field() totalScore: number; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note the following: | ||
+ | * The data record declaration is decorated with // | ||
+ | * The data record, here named BasicTagOnlyData is based on the // | ||
+ | * It also implements some additional fields expected by the library support classes, defined by the // | ||
+ | * Each custom field in the record is marked either by @id() – if it's a unique key by which the data can be retrieved – or by @field() if it's a plain data field. | ||
+ | * Fields must be of a primitive type (string, number or boolean). | ||
+ | |||
+ | If you open the project' | ||
+ | |||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | You need a computer running the Blocks server software and a four display spots (preferably based on [[blocks: | ||
+ | |||
+ | There' | ||
+ | |||
+ | ===== Running the Application ===== | ||
+ | |||
+ | Then follow these steps to run this application. | ||
+ | |||
+ | - Start Blocks. | ||
+ | - Open the editor using the Admin button. | ||
+ | - Log in using the name admin and the password pixi. | ||
+ | - Connect four Display Spots, running on PIXILAB Player or equivalent, corresponding to each of the four stations mentioned above. | ||
+ | - Connect an RFID or NFC reader to the USB port of each of those players. | ||
+ | - Assign those players to each of the corresponding Display Spots in the Spot list. | ||
+ | - Scan a suitable RFID or NFC token at the Reception station to start the visit. | ||
+ | - Try out each of the stations, with the // | ||
+ | - Other visitors can sign in using individual ID tokens. | ||
+ | |||
+ | |||
+ | ==== The Script ==== | ||
+ | |||
+ | The script defining the data record as well as how data is collected and used can be found at script/ | ||
- | {{ : |