Skip to content

maidstone-hackspace/qa-keypad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7527b27 · Apr 7, 2020

History

24 Commits
Apr 7, 2020
Jan 20, 2020
Feb 6, 2020
Mar 2, 2020

Repository files navigation

Wemos QA keypad

Device install

To setup a new device you can use the arduino software, you will need a plugin to upload the files in the data folder to your wemos device.

Deploy requirements

https://github.com/esp8266/Arduino.git https://github.com/esp8266/arduino-esp8266fs-plugin/releases/tag/0.4.0

Build Requirements

You will also need various 3rd party libaries. keypad.h 3.1.1 by Mark Stanley, Alexander Brevig https://wiring.uniandes.edu.co/source/trunk/wiring/

LiquidCrystal I2C by frank de Bradander https://github.com/johnrickman/LiquidCrystal_I2C

ESPAsyncWebServer https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip

ESPAsyncTCP https://github.com/me-no-dev/ESPAsyncTCP

Extract and copy to arduino libries folder

Device Setup

When switching on the device for the first time it will launch in access point mode to allow you to setup the device, connect to weeeecfg from a phone and enter password weeeecfg to setup the device. If the device can not connect to a local network it will relaunch the setup interface.

subsequent usage of the device will reuse the same settings as long as the device can connect.

The interfacing is using a simple web interface generated from this repository.

https://gitlab.com/olymk2/weecfg

API example

Keypad startup endpoint

POST http://ng.snapwire-portal.co.uk/api/Startup
Content-Type: application/json

{"ControllerId": "DID1"}
{
  "ControllerId": "DID1",
  "AssignedName": "Bob"
}

Poll to determine when ready for next answer

POST http://ng.snapwire-portal.co.uk/api/Poll
Content-Type: application/json

{}
{
  "Timestamp": 132149528062145583,
  "ReadyToAcceptAnswers": true
}

Example sending answer to api.

POST http://ng.snapwire-portal.co.uk/api/SubmitAnswer
Content-Type: application/json

{"ControllerId": "sample string 1", "Answer": "A"}
{
  "ConfirmReceived": true
}

http://ng.snapwire-portal.co.uk/api/SubmitAnswer

Later

gzip the html

The wemos is by no means fast so gzip so there is less data to send.

http error message on api failure.