omi icon indicating copy to clipboard operation
omi copied to clipboard

Accelerometer Support #569

Open kevvz opened this issue 1 year ago • 15 comments

#569

How to Test:

  1. Flash the zephyr.uf2 file located in friend/firmware/firmwarev1.0.
  2. Run the updated app in debug mode and open the console.
  3. Wait for the hardware to connect. Then after a while you should see accelerometer data, including the gyroscope appear on the console.
  4. 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.

kevvz avatar Aug 10 '24 08:08 kevvz

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?

josancamon19 avatar Aug 11 '24 08:08 josancamon19

In the meantime, pls conver this to a Draft PR @kevvz

josancamon19 avatar Aug 11 '24 08:08 josancamon19

Added. It will printing in the debug console if you download the uf2 file provided in the PR.

kevvz avatar Aug 12 '24 21:08 kevvz

Btw, you'll have to merge with https://github.com/BasedHardware/Omi/pull/590

francip avatar Aug 13 '24 00:08 francip

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.

kevvz avatar Aug 13 '24 04:08 kevvz

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

kevvz avatar Aug 13 '24 04:08 kevvz

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.

kevvz avatar Aug 13 '24 05:08 kevvz

@koconder can you look at what might be happening here? :-/

francip avatar Aug 13 '24 06:08 francip

@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.

vincentkoc avatar Aug 13 '24 06:08 vincentkoc

@koconder Everything works fine for me. I only needed to change the overlay file name and replaced the prj.conf file with my version.

kevvz avatar Aug 13 '24 15:08 kevvz

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.

francip avatar Aug 13 '24 23:08 francip

And sorry I've been too nitpicky

francip avatar Aug 13 '24 23:08 francip

And sorry I've been too nitpicky

No worries, thanks for taking the time to read my code!

kevvz avatar Aug 14 '24 01:08 kevvz

I think you reverted accidentally more than you should've :-(

francip avatar Aug 14 '24 04:08 francip

Once this is resolved and merged ill update the overlay file for Audio and SD Card, just waiting to avoid merge conflicts.

vincentkoc avatar Aug 17 '24 03:08 vincentkoc

@kevvz CleanShot 2024-08-24 at 15 16 45

cc @josancamon19

kodjima33 avatar Aug 24 '24 22:08 kodjima33