omi
omi copied to clipboard
Accelerometer Support #569
#569
How to Test:
- Flash the zephyr.uf2 file located in friend/firmware/firmwarev1.0.
- Run the updated app in debug mode and open the console.
- Wait for the hardware to connect. Then after a while you should see accelerometer data, including the gyroscope appear on the console.
- Throw your friend hard, preferably onto a soft surface like a couch. If you throw hard enough you should get a notification labeled 'ouch.....' . I've tried fake falling and if the parameter fall_number listed in communication.dart is low enough, you can trigger the notification but you may trigger it on accident if you move fast.
Awesome, while we wait for gyroscope data, can you do in mobile smth similar that detects changes for it, and prints something?
And together with gyroscope the person fell example?
In the meantime, pls conver this to a Draft PR @kevvz
Added. It will printing in the debug console if you download the uf2 file provided in the PR.
Btw, you'll have to merge with https://github.com/BasedHardware/Omi/pull/590
Merging the firmware appears to have given me a whole slew of problems. I can't seem to even connect to the BLE scanner app anymore. Give me a little more time.
I redownloaded the repository from Basedhardware/Ori, and the built firmware causes the device to crash on the bluetooth connection. I believe there is something wrong in the firmware and merging doesn't appear to solve anything. Would it be a good idea to rollback until the firmware is fixed? I think #590 may be bugged unless I get someone else's firmware
Alright, I kinda found the problem. If I replace the Prj.conf file in main with the one I used to test my accelerometer, it appears to work just fine. There is something in the file that breaks the device, although there are so many that it is hard to pinpoint the exact one.
@koconder can you look at what might be happening here? :-/
@kevvz your changes look OK, do you need me to check or did your last changes fix this? - It was likely the speaker/audio one, which is all good. And there was a line disabling certain components.
@koconder Everything works fine for me. I only needed to change the overlay file name and replaced the prj.conf file with my version.
Saw few changes that slipped through the merge, which don't seem to be related to your code. Please revert them. Also, few other nitpicks here and there. Also, can you generate a different UUID for the new service? This one looks too suspicious to me. :-)
I can't comment on the Flutter code much. It looked reasonable to me, but that language is not my native, so...
Anyway, I think we're pretty close to getting this in.
And sorry I've been too nitpicky
And sorry I've been too nitpicky
No worries, thanks for taking the time to read my code!
I think you reverted accidentally more than you should've :-(
Once this is resolved and merged ill update the overlay file for Audio and SD Card, just waiting to avoid merge conflicts.
@kevvz
cc @josancamon19