-
Notifications
You must be signed in to change notification settings - Fork 0
DevToolsWriteup
Finn Biggs edited this page Jul 6, 2023
·
3 revisions
In this file, I use "//" as comment, to indicate my annotations to what may be visible verbatim
/ (Root)
battery.py
(Py Code for reporting battery level)
BluetoothControl.py
(Py Code for managing BT Connection)
boot.py
(Py Code run at Startup - sets file access option)
Cato.py
(Py Code defining Cato functionalities)
DummyBT.py
(Py mock of BluetoothControl - no connections - dev tool)
imu.py
(Py Code - Define and Configure Gyroscope / Accel)
main.py
(Py Code governing Cato behaviors)
mode.py
(Py Code - utils for changing read/write internal permissions)
StrUUIDService.py
(Code for governing UUID Behavior through text)
Binds bluetooth commands to our Python
(This is where we define the handles for the WebApp / LightBlue)
WakeDog.py
(Py Code which wakes cato up and decides when to sleep)
.env
(CircuitPython "Environment Variables")
TODO: Remove - better alternatives for bluetooth config
config.json
(General Configuration Options)
Config is read at the start of operation to define constants within Cato
https://github.com/aulitech/Cato/wiki/ConfigurationGuide
boot_out.txt
Automatic output from CircuitPy setup
"Gestures.Cato" / "CG.TXT" (Or other name for file-based communications)
File we discussed writing in Palm springs to communicate single gesture collection
/lib (libraries)
Ignore these. They are needed to run. Contains libraries for cato operation
-
Advertisement Data
- Connection Status
- Advertised Name
- Advertised service UUIDs
- Raw advertisement packet
-
Device Information
- Device Address
- Manufacturer Name String
- Model Number String
-
Generic Access
- Device Name
- Appearance
- Peripheral Preferred Connection Parameters
- Central Address Resolution
-
Generic Attribute
- Service Changed // (ignore)
- 0000febb-(...) // This is adafruit's family of services. Ignore.
- adaf0100-(...)
- adaf0200-(...)
- adaf0001-(...) // ignore
- adaf
- adaf
- adaf
- 51ad213f-(...) // These are Aulitech's services
- 528ff74b-(...) // "Collect Gestures UUID" (bulk gesture collection)
- 51ad213f-(...) // "Config UUID" (set mode, reboot etc)
- daba249c-(...) // "Debug UUID" (debug messages printed here)
-
528f ("Collect Gestures UUID")
- Y, y // "Yes"
- N, n // "No"
- Q, q // "Quit"
- S, s // "Skip"
-
51ad ("Config UUID")
- SEND
- UPDATE
- OVERWRITE
- SAVE
- REBOOT
- REBOOTRO
- BOOTLOADER
- CG
- CALIBRATE
-
daba ("Debug UUID")
- read-only
- prints debug messages from python
| Step Number | App Behavior | CG.TXT | LOG.TXT | Cato Behavior (starts comp writable) |
|---|---|---|---|---|
| 1 | Write CG.TXT | N/A | Old Data | |
| 2 | --------------- | --------------- | --------------- | ------- Reboot SELF-WRITABLE ------- |
| 3 | empty file | Old Data | Collect Gesture | |
| 4 | empty file | NEW Data | Write LOG.TXT | |
| 5 | empty file | NEW Data | DELETE CG.TXT | |
| 6 | --------------- | --------------- | --------------- | ------- Reboot COMP-WRITABLE -------- |
| 7 | Check for CG.TXT | N/A | NEW Data | |
| 8 | Read LOG.TXT | N/A | New -> Old | |
| 9 | Send to Firebase | N/A | Old Data | |
| 10 | Return to step 1 | N/A | Old Data |
This is the file read/write procedure as discussed in Palm Springs. CG.TXT could contain the ID of the user's selected gesture-to-record
- Open LightBlue
- Connect LightBlue to Cato (view advertising device list, find "Cato")
- Select 528f ("Collect Gestures UUID")
- "Subscribe"
- Change "Hex" to "UTF-8"
- To begin, write "CG"
- Write Y/y to advance, N/n to cancel, S/s to skip current collection, Q/q to abort collection