You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Star0 (0)You must be signed in to star a repository
About
Smart restaurant ordering system: STM32, two ESP32s and a Vega Aries V3 RISC-V board linked over Wi-Fi UDP, ESP-NOW, UART and I2C (IIT Gandhinagar ES 333).
flowchart LR
SL["Simulink app"] -- "Wi-Fi UDP :1234" --> A
subgraph Table side
A["espA (ESP32)"] -- "UART 115200" --> S["STM32"]
S --> L1["16x2 LCD<br/>Table 1"]
S --> L2["16x2 LCD<br/>Table 2"]
S --> D["Dispensers<br/>coffee / tea / biscuit"]
end
subgraph Kitchen side
B["espB (ESP32)"] -- "UART 115200" --> V["Vega Aries V3"]
V --> L3["16x4 LCD<br/>kitchen"]
V --> Z["Buzzer"]
end
A -- "ESP-NOW: order" --> B
B -- "ESP-NOW: status" --> A
Loading
Repository layout
Embedded-Systems-Project/
├── espA/espA.ino # Table-side ESP32: Wi-Fi UDP in, UART to STM32, ESP-NOW to espB
├── espB/espB.ino # Kitchen-side ESP32: ESP-NOW in, UART to Vega, status buttons
├── vega_aries/vega_aries.ino # Vega Aries V3: 16x4 kitchen LCD, buzzer, clear buttons
└── STM32/stm32.c # STM32 main.c: table LCDs and dispensing outputs
2. Functional Flow
Simulink sends order to espA over WiFi UDP.
espA forwards order to STM32 over UART.
STM32 updates the corresponding table LCD and dispensing sequence.
On confirmation button press (espA side in current code), espA sends order to espB via ESP-NOW.
espB forwards order to Vega Aries via UART.
Vega updates 16x4 kitchen display with both table orders.
Kitchen buttons on espB send order status back to espA via ESP-NOW.
espA forwards status to STM32 so table LCDs show processing or done state.
3. Data Formats
3.1 Simulink to espA (UDP payload)
Sent to espA's IP address on UDP port 1234 (the IP is printed on espA's serial monitor)
Set the ESP-NOW peer MAC addresses: targetAddress[] in espA must be espB's MAC, and targetAddress[] in espB must be espA's MAC (print each board's MAC with WiFi.macAddress()).
Select correct ESP32 board and COM port.
Open and upload:
espA/espA.ino
espB/espB.ino
ESP-NOW channel. espB is fixed to Wi-Fi channel 11, while espA uses whatever channel its access point is on. Set the router or hotspot to channel 11 (or change the channel in espB to match), otherwise the two ESP32s will not hear each other.
6.2 Vega Aries (Arduino IDE)
Select Vega Aries V3 board profile.
Install required libraries:
LiquidCrystal_I2C
Open and upload:
vega_aries/vega_aries.ino
6.3 STM32 (STM32CubeIDE)
Create or import the STM32CubeIDE project for your board.
Confirm USART6 and I2C pin assignments in IOC.
Replace the generated Core/Src/main.c with STM32/stm32.c (it is a complete main.c and includes main.h), then build and flash.
7. Pre-Test Checklist
WiFi SSID and password in espA are correct.
ESP-NOW MAC target addresses are correct on both ESPs.
Both ESPs are on the same ESP-NOW channel.
UART baud is 115200 on all linked pairs.
LCD I2C addresses are correct (STM32 uses 0x4E write address, Vega probes 0x27 and 0x3F).
All button pins are wired to GND for active-low input_pullup logic.
8. Notes
Current codebase is structured and ready for integration testing.
If needed, next step is to standardize status code mapping and table-context handling across espA, espB, STM32, and Vega.
About
Smart restaurant ordering system: STM32, two ESP32s and a Vega Aries V3 RISC-V board linked over Wi-Fi UDP, ESP-NOW, UART and I2C (IIT Gandhinagar ES 333).