The gitignore have excluded some modules etc that we will need. Follow the guide below to get it working. And remember to use the "Development build" once the emulator opens the app because the use of BLE is an extended feature outside Expo Go App
How to use this app is as such, we start by installing the modules our project need:
nodejs and npm
sudo pacman -S nodejs npm
Then run,
npm install
Now we continue with installing the Expo CLI:
npm install -g expo-cli
Now you should have the files needed, but make sure you have the eas.json and the app.json file. To run the program, open a new terminal and go to the project folder, then run the program with this:
npx expo start
From here you can follow the cli on the screen, in android studio you need to create the emulator for our app (you can only use the emulator for the interface creation, BLE will have to be physically tested)
Download android studio and make sure you got the sdk folder, otherwise rename the folder since it is named Sdk. The app otherwise won't find it and can't start.
Create a new device emulator which is compatible with our code:
After installation, start the emulator then connect the app to the emulator by pressing "a" in the expo CLI window in your terminal.
sequenceDiagram
User->>App: Start App
App->>User: Start GUI
User->>App: Choose BLE device
App->>ESP32: Send connection request
ESP32->>App: Send ACK
App->>User: Update GUI
Loop Device Running
ESP32->>App: Send Cart Info
App->>User: Relay info to user
User->>App: Close APP
App->>ESP32: Stop connection
App->>User: Stop GUI
end