It has been a bit heavy going, I was hoping that someone had done something similar and uploaded it to a community repository.
It is sort of working so far so I don't mind sharing my experience and code
https://community.appinventor.mit.edu/search?expanded=true&q=nrf52840
You're not the first.
Feel free, we can always use more working samples.