-
-
Notifications
You must be signed in to change notification settings - Fork 13
Development #1248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Development #1248
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
a5c3001
Added non interactable driver
JakeElston fba70b0
Update oqmtest2.ino with JSON path
JakeElston efb4d70
test script for scanning
jasecolino 4ad8b8b
Update oqmtest2.ino
JakeElston faedc0a
Rename oqmtest2.ino to authandget.ino
JakeElston f9b136e
Add files via upload
kyleighpea123 25ee119
Update authandget.ino
JakeElston e66cdd2
JSON setup file for SD card
JakeElston 95fefbb
Update authandget.ino
JakeElston 0f8ce11
Removed db and st block fields
JakeElston a8a4dfe
Added SD, updated functions
JakeElston cc1ae65
Update and rename authandget.ino to functions.ino
JakeElston ae86656
Scanner UI code
kyleighpea123 0876584
Update functions.ino
JakeElston 3579c71
updated scanner UI that is combined with main
kyleighpea123 94895b6
working scanner and touch screen tests
jasecolino 3a3c051
added final project files
JakeElston e4fa1bb
Create community guide for OQM Fast Transaction Scanner
elsamlt fdab859
database existence check in RestInterface implemented
axgiri 74a2699
replace base rest client with oqmDatabaseService for database existen…
axgiri 75d5394
replace service call with @PostConstruct
axgiri fa041e7
Merge pull request #1246 from axgiri/dev/1151-Gracefully-handle-selec…
GregJohnStewart e82d3ba
Merge branch 'main' into development
GregJohnStewart 7f4e765
Core - Base Station - fixing tests, integration tests
GregJohnStewart cd60fe7
Updating base station ci
GregJohnStewart 400a2b1
Core - API - polish of README
GregJohnStewart 35290ec
Core - Base Station - Polish of README
GregJohnStewart 855830d
Test update of README
GregJohnStewart 0079713
Organizing CI display on README
GregJohnStewart ede8375
added final speedscanner files
JakeElston bc4d5a3
Delete barcode_scanner.ino
JakeElston 5dab1fb
Delete color.h
JakeElston feb19ff
Delete functions.ino
JakeElston 0dd06fd
Delete oqm_scanner.ino
JakeElston 9d129eb
Delete scannerUI.ino
JakeElston 5f18f77
Delete sdsetup.json
JakeElston 838d855
Delete BarcodeScannerUI.ino
JakeElston 707b0ee
Update OQM-Scanner-Community-Guide.md
JakeElston 9fbe528
Bump io.quarkiverse.wiremock:quarkus-wiremock
dependabot[bot] 6a54230
Bump gradle-wrapper in /software/plugins/external-item-search
dependabot[bot] a2d9148
Bump gradle-wrapper in /software/core/oqm-core-base-station
dependabot[bot] 90c07cf
Bump gradle-wrapper from 9.5.0 to 9.5.1 in /software/core/oqm-core-api
dependabot[bot] 8900f87
Bump tech.epic-breakfast-productions.openquartermaster.lib.core:core-…
dependabot[bot] c6ba37d
Bump gradle-wrapper from 9.5.0 to 9.5.1 in /software/plugins/storagotchi
dependabot[bot] db26680
Merge pull request #1249 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart 5662b80
Merge branch 'development' into dependabot/gradle/software/plugins/ex…
GregJohnStewart 7818404
Merge branch 'development' into dependabot/gradle/software/core/oqm-c…
GregJohnStewart 2288c30
Merge pull request #1254 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart 940a109
Merge pull request #1253 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart 9dbc42a
Merge branch 'development' into dependabot/gradle/software/plugins/ex…
GregJohnStewart 745ccc8
Merge branch 'development' into dev/1011-fr-hw-speed-scanner
GregJohnStewart 4cca888
HW - Speed Scanner - Further organization before merge
GregJohnStewart 13c6886
Merge pull request #1231 from Epic-Breakfast-Productions/dev/1011-fr-…
GregJohnStewart 6047b86
Merge pull request #1250 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart 30f9439
Merge branch 'development' into dependabot/gradle/software/core/oqm-c…
GregJohnStewart 49b39f2
Merge branch 'development' into dependabot/gradle/software/core/oqm-c…
GregJohnStewart 78df5b3
Merge pull request #1251 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart 29ec748
Merge pull request #1252 from Epic-Breakfast-Productions/dependabot/g…
GregJohnStewart aa7f305
Merge branch 'main' into development
GregJohnStewart c22e8e0
Update .github/workflows/core-baseStation.yml
GregJohnStewart 3f40b74
Apply suggestion from @coderabbitai[bot]
GregJohnStewart d2268b9
Remove unnecessary braces from sdsetup.json
GregJohnStewart 3083f82
Apply suggestions from code review
GregJohnStewart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,47 +1,22 @@ | ||
| # This is a basic workflow to help you get started with Actions | ||
|
|
||
| name: CI - Core - Base Station | ||
|
|
||
| # Controls when the workflow will run | ||
| on: | ||
| # Triggers the workflow on push or pull request events but only for the main branch | ||
| push: | ||
| branches: [ "**" ] | ||
| paths: | ||
| - "software/core/oqm-core-base-station/**" | ||
| - ".github/workflows/core-baseStation.yml" | ||
| - ".github/workflows/wf-gradleBuild.yaml" | ||
| - ".github/workflows/wf-gradleUnitTest.yaml" | ||
| - ".github/workflows/wf-gradleQuarkusIntTest.yaml" | ||
| pull_request: | ||
| branches: [ "**" ] | ||
| paths: | ||
| - "software/core/oqm-core-base-station/**" | ||
| - ".github/workflows/core-baseStation.yml" | ||
| - ".github/workflows/wf-gradleBuild.yaml" | ||
| - ".github/workflows/wf-gradleUnitTest.yaml" | ||
| - ".github/workflows/wf-gradleQuarkusIntTest.yaml" | ||
| workflow_call: | ||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
| defaults: | ||
| run: | ||
| working-directory: "software/core/oqm-core-base-station" | ||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
|
|
||
| concurrency: | ||
| group: ci-core-base-station-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| uses: ./.github/workflows/wf-gradleBuild.yaml | ||
| with: | ||
| path: "software/core/oqm-core-base-station" | ||
| unitTest: | ||
| uses: ./.github/workflows/wf-gradleUnitTest.yaml | ||
| with: | ||
| path: "software/core/oqm-core-base-station" | ||
| intTest: | ||
| uses: ./.github/workflows/wf-gradleQuarkusIntTest.yaml | ||
| strategy: | ||
| matrix: | ||
| containerBased: [ false ] # TODO:: enable true | ||
| CI-Pipeline: | ||
| uses: Epic-Breakfast-Productions/ebp-ci/.github/workflows/quarkus-ci-pipeline.yml@main | ||
| with: | ||
| path: "software/core/oqm-core-base-station" | ||
| containerBased: ${{ matrix.containerBased }} | ||
| java-version: "25" | ||
| run-int-tests: true | ||
| container-based-int-tests: false | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,3 +31,4 @@ hs_err_pid* | |
|
|
||
| bin/ | ||
| target/ | ||
| .gradle/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,142 @@ | ||
| # Community Guide - OQM Fast Transaction Scanner | ||
|
|
||
| This project provides a hardware-based solution to automate inventory management for the **Open Quarter Master (OQM)** system. It replaces manual web-browser data entry with a standalone physical device that connects via Wi-Fi for real-time updates. | ||
|
|
||
| ## Table of Contents | ||
| 1. [Bill of Materials (BOM)](#bill-of-materials-bom) | ||
| - [Compatibility Warning](#compatibility-warning) | ||
| - [Required Hardware Components](#required-hardware-components) | ||
| 2. [Hardware Assembly & Pinout](#hardware-assembly--pinout) | ||
| - [Master Wiring Table](#master-wiring-table) | ||
| 3. [Firmware Files Structure](#firmware-files-structure) | ||
| 4. [SD Card Configuration](#sd-card-configuration) | ||
| 5. [Security Logic](#security-logic) | ||
| 6. [Software Installation & Setup](#software-installation--setup) | ||
| - [Environment Setup](#environment-setup) | ||
| - [Required Libraries](#required-libraries) | ||
| - [Flashing the Firmware](#flashing-the-firmware) | ||
| 7. [Interface Guide](#interface-guide) | ||
|
GregJohnStewart marked this conversation as resolved.
|
||
| - [Startup & Main Menu](#startup--main-menu) | ||
| - [Quick Mode](#quick-mode) | ||
| - [Details Mode](#details-mode) | ||
|
|
||
| --- | ||
|
|
||
| ## 1. Bill of Materials (BOM) | ||
|
|
||
| ### Compatibility Warning | ||
| This guide and the accompanying firmware are designed **strictly** for the components listed below. The pin assignments are hardcoded for this specific hardware stack. Using different components may lead to pinout conflicts or driver issues, as the team has not tested alternative hardware configurations. | ||
|
|
||
| ### Required Hardware Components | ||
|
|
||
| | Item | Description | Purpose | Source / Link | Price (Est. USD) | | ||
| | :--- | :--- | :--- | :--- | :--- | | ||
| | **Adafruit Feather ESP32 V2** | Microcontroller with 8MB Flash & Wi-Fi | The "brain" of the device, handling API calls and security. | [Adafruit Store](https://www.adafruit.com/product/5400) | $19.95 | | ||
| | **TFT FeatherWing 3.5"** | 480x320 Color Touchscreen (V2) | Visual interface for database and block selection. | [Adafruit Store](https://www.adafruit.com/product/3651) | $39.95 | | ||
| | **ATOMIC QR-Code Scanner** | 1D/2D scanning module | High-speed data acquisition of product IDs. | [M5Stack Store](https://shop.m5stack.com/products/atom-barcode-scanner-base) | $16.95 | | ||
| | **MicroSD Card** | Any standard MicroSD card (FAT32) | Stores `sdsetup.json` for Wi-Fi and API configuration. | Generic | ~$8.00 | | ||
| | **Jumper Cables (4-pin)** | Female to Female / Female to Male | Connects the ATOMIC scanner to the Feather Pins 20/22. | [DigiKey](https://www.google.com/search?q=https://www.digikey.com/en/products/detail/sparkfun-electronics/CAB-22726/18066531) / [Amazon](https://www.google.com/search?q=https://www.amazon.com/SparkFun-Qwiic-Cable-Female-Jumper/dp/B07S1V8Z7F) | ~$2.00 | | ||
| | **Standard Hook-up Wires** | Basic solid or stranded wires | Necessary for custom soldering of headers and power lines. | [Adafruit](https://www.adafruit.com/product/3894) / [Amazon](https://www.amazon.com/Qwiic-Cable-Female-Jumper-4-pin/dp/B0992PHLBC) | ~$2.00 | | ||
| | **TOTAL** | | | **Approximate Cost per Unit** | **~$88.85** | | ||
|
|
||
| ### Note on Power Supply (Battery) | ||
| Our current prototype is powered via the USB-C port of the Feather ESP32 for development and testing stability. While the system is designed for portability, a 3.7V Li-Po battery is not included in this core build. We recommend adding one as a future evolution to ensure full warehouse mobility. | ||
|
|
||
| --- | ||
|
|
||
| ## 2. Hardware Assembly & Pinout | ||
|
|
||
| To ensure the firmware initializes correctly, you must follow this specific hardware configuration. These mappings are defined in `barcode_scanner.ino` and `functions.ino`. | ||
|
|
||
|
GregJohnStewart marked this conversation as resolved.
|
||
| ### Master Wiring Table | ||
|
|
||
| | Peripheral | Signal Name | Pin on Feather ESP32 V2 | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **ATOMIC Scanner** | UART RX | **Pin 20** | Data sent from Scanner to the ESP32. | | ||
| | **ATOMIC Scanner** | UART TX | **Pin 22** | Commands sent from ESP32 to the Scanner. | | ||
| | **TFT FeatherWing** | TFT_CS | **Pin 15** | Chip Select for the display logic. | | ||
| | **TFT FeatherWing** | TFT_DC | **Pin 33** | Data/Command toggle for the screen. | | ||
| | **TFT FeatherWing** | TFT_RST | **Pin 32** | Hardware Reset for the display. | | ||
| | **Integrated SD Slot** | SD_CS | **Pin 14** | Chip Select for the MicroSD card. | | ||
| | **All Peripherals** | VCC | **3V** | Power supply (Red wire). | | ||
| | **All Peripherals** | GND | **GND** | Common ground (Black wire). | | ||
|
|
||
| > [!IMPORTANT] | ||
| > **Soldering Requirement:** You **MUST solder** the headers to connect the TFT FeatherWing to the ESP32 V2 board. The high-speed SPI bus (used for the TFT and SD card) will fail if connections are loose. Friction-fit or "plug-and-play" attempts will cause the screen to fail during initialization. | ||
|
|
||
| --- | ||
|
|
||
| ## 3. Firmware Files Structure | ||
|
|
||
| To compile the project, you need to include the following files in your Arduino project folder: | ||
|
|
||
| * **`oqm_scanner.ino`**: The main entry point. It initializes the hardware (TFT, Scanner, WiFi) and runs the primary loop. Also contains http functions | ||
| * **`color.h`**: Contains default color definitions. | ||
| * **`scannerUI.ino`**: Handles all graphical rendering for the Sage Green interface, including the "Quick" and "Detail" mode screens. | ||
|
|
||
| --- | ||
|
|
||
| ## 4. SD Card Configuration | ||
|
|
||
| The scanner is designed to be "zero-code" for configuration. It looks for a file named `sdsetup.json` on the MicroSD card to set up the network and security. | ||
|
|
||
| 1. Format your MicroSD card to **FAT32**. | ||
| 2. Copy the provided `sdsetup.json` file to the root directory. | ||
| 3. Fill in your credentials: | ||
| * **ssid / password**: Your local Wi-Fi. | ||
| * **oqm-address**: The IP of your OQM Basestation. | ||
| * **oqm-user / oqm-secret**: Your Keycloak client credentials. | ||
|
|
||
| --- | ||
|
|
||
| ## 5. Security Logic | ||
|
|
||
| To ensure professional-grade reliability, the firmware includes the following automated safety features: | ||
|
|
||
| * **JWT Authentication**: The system handles secure Keycloak authentication. It automatically calculates the token's expiration and performs a refresh when 75% of its lifespan has passed, ensuring the scanner never logs out during a shift. | ||
| * **Scan Buffer**: A mandatory 5-second delay is enforced between successful scans. This prevents accidental duplicate entries and ensures the OQM server has enough time to process and acknowledge the previous transaction. | ||
| * **Modularity**: By using **Pin 14** for the SD card, the system remains modular, allowing users to update Wi-Fi or API settings without ever touching the source code. | ||
|
|
||
| --- | ||
|
|
||
| ## 6. Software Installation & Setup | ||
|
|
||
| To compile and flash the firmware, follow these steps to prepare your development environment. | ||
|
|
||
| ### Environment Setup | ||
| * **IDE**: Download and install **Arduino IDE** (version 2.3.8 or higher). | ||
| * **Board Manager**: Install the **ESP32 by Espressif** board package via the Boards Manager. | ||
| * **Selection**: Select **Adafruit ESP32 Feather V2** as your target board. | ||
|
|
||
| ### Required Libraries | ||
| Open the Library Manager and install the following: | ||
| * **Adafruit GFX & Adafruit HX8357**: Essential for driving the 3.5" TFT display. | ||
| * **M5UnitQRCode**: Used to interface with the ATOMIC barcode module. | ||
| * **ArduinoJson**: Required for parsing `sdsetup.json` and handling OQM API responses. | ||
| * **WiFi & HTTPClient**: Standard ESP32 libraries for network communication. | ||
|
|
||
| ### Flashing the Firmware | ||
| 1. Connect the Feather ESP32 V2 to your computer via a high-quality USB-C cable. | ||
| 2. Open `barcode_scanner.ino` (this is the main file that links `functions.ino` and `scannerUI.ino`). | ||
| 3. Select the correct COM port and click **Upload**. | ||
|
|
||
| --- | ||
|
|
||
| ## 7. Interface Guide | ||
|
|
||
| The UI is designed for high visibility in warehouse environments, featuring a clean white interface with **Sage Green** interactive elements. | ||
|
|
||
| ### Startup & Main Menu | ||
| * **Initialization**: Upon power-up, the device automatically mounts the SD card and loads credentials from `sdsetup.json`. | ||
| * **Database Selection**: Tap the "Choose" button next to "DB" to toggle through available OQM databases. | ||
| * **Block Selection**: Tap "Choose" next to "Block" to define the specific storage area for your transactions. | ||
|
|
||
| ### Quick Mode | ||
| * **Purpose**: Optimized for fast, repetitive stock changes. | ||
| * **Scanning**: Point the scanner at a barcode. The product name, ID, and current count will appear under the "Last Item" header. | ||
| * **Interaction**: Use the large **[ + ]** and **[ - ]** buttons to instantly increment or decrement stock levels in the OQM system. | ||
|
|
||
| ### Details Mode | ||
| * **Navigation**: Tap the **[ -> ]** arrow on the main screen to enter Details Mode. | ||
| * **Options**: Select from five transaction types: **Add**, **Sub**, **Checkout**, **Checkin**, or **Set**. | ||
| * **Confirmation**: Adjust the quantity and tap **"Submit"** to trigger the API call. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.