Skip to content

About

Replaces mechanical turnstile/clicker and manual calculation

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

37 Commits

Folders and files

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


SFSL-ESP-Turnstile


Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Hardware
  3. Database
  4. Web Server
  5. Roadmap
  6. License
  7. Contact

About The Project

Replaces mechanical turnstile/clicker and manual calculation with an ESP8266 that automatically reports counts to an MSSQL Server.
The ESP uses HTTP POST/GET requests that are handled by an IIS server running PHP.

NOTE: Project has not been adopted and development has stopped.

(back to top)

Built With

Arduino MicrosoftSQLServer PHP

(back to top)

Hardware

  • 1 x ESP8266 (NodeMCU v3)
  • 1 x 0.96inch 128×64 I2C OLED SSD1306
  • 4 x Momentary Push Button
  • 4 x 10kΩ Resistor

Parts List with Amazon links and cost can be found here:
Parts List


secrets.h will need to be created, in the Arduino Project, with the following content
Replace YOUR SSID and YOUR SSID PASSWORD with the appropriate information

#define SECRET_SSID "YOUR SSID"
#define SECRET_PASS "YOUR SSID PASSWORD"



Sample OLED Display

(back to top)

Database

Four tables are required:

  • hourly
  • seats
  • mac
  • capacity

seats needs to be populated with Rides Names and Seats
mac needs to be populated with the ESP MAC Addresses, Ride assignment can be done from the Web Interface
capacity should be populated with Ride Names, Units, and Capacities

Sample CREATE TABLE files are included
Sample data set for seats is included


hourly

Column Type Description
date date Date of Count
time time Time of Count
ride text Ride Name
units int Number of Trains, Channels, RVs, Cars, etc
cycles int Ride Cycle Count
empty int Empty Seats
hourly int Calculated Count
wait int Ride Wait Time in Minutes

seats

Column Type Description
ride text Ride Name
seats int Total Number of Seats per Cycle

mac

Column Type Description
ride text Ride Name
mac text MAC address of ESP8266

(back to top)

Web Server

This project was tested using Windows Server 2019 running IIS, Microsft SQL Server 2022, and PHP 8.2.9

Project assumes that the IIS Server and MSSQL Server are on the same host.

Instructions for setting up PHP with IIS can be found here:
CHANGE LINK

index.php should be added to the web server list of default pages.

secrets.php will need to be created with the following content
Replace defaults with appropriate information

<?php
$DB_USER = "YOUR DB USER";
$DB_PASS = "YOUR DB USER PASSWORD";
$DB_NAME = "YOUR DB NAME";
?>

CSS files are not included

Turnstile Report

Displays all the hourlies from one ride for the selected day and park hours
Displays the accumulated riders, percent utilization, and rides per guest


Hourly

Displays the hourly count from all rides at the selected Date/Time
Defaults to the most recent hourly


Assign Clicker

Allows easy assignment of the ESP to Rides.
The assignment allows the ESP to pull in the number of seats and post the correct ride name

MAC Addresses are pulled from the mac table
Ride Names are pulled from the seats table


(back to top)

Roadmap

Project has not been adopted and development has stopped.

  • Create Individual Turnstile Report Page
  • Add Capacities
  • Create Prototype Case
  • Test on Site

See the open issues for a full list of proposed features (and known issues).

(back to top)

License

(back to top)

Contact

Thomas Robert

Project Link: https://github.com/trasbd/SFSL-ESP-Turnstile

(back to top)

About

Replaces mechanical turnstile/clicker and manual calculation

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages