-
-
Notifications
You must be signed in to change notification settings - Fork 895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find the Accelerometer or Heart Rate Sensor Code? #67
Comments
You couldn't find the accelerometer and heart rate sensor code because... there it doesn't exist (yet)... I did some work related to these sensor, and even managed to make a small demo of both of them working in InfiniTime.
There's very few documentation, datasheet and example code about these 2 devices, and the implementation will certainly need a bit of reverse engineering. I know that ATCWatch and Wasp-OS worked on the support of these chips, but I don't know which license is applied on their code. It might be worth to have a look. If you (or anyone else) want to write a driver for these devices, I will happily share the rest of the code (UI, message passing between tasks,...). |
Ah, that accounts for it then. If you could share what you have done, that would save me a lot of effort understanding the software 'infrastructure' - I have only ever used FreeRTOS as a C implementation using old fashioned makefiles so find this one a bit daunting to start on! I'll go and read a datasheet...... Thanks! |
I remember I pushed the branch hrs3300 a while ago for consultation only (I won't merge it as is). Do not hesitate to ask any questions, I would be happy to answer them ! |
Thanks! |
I am trying to merge your 'main' branch into my fork of the hrs3300 branch to get the code bases consistent before I start. Error is: It is getting a bit late now so I will look tomorrow, but if this error is obvious to you, I would appreciate your thoughts on what is causing it! |
Mhm this branch generates a lot of warnings, but no error on my side... Which version of the toolchain do you use ? I'm using this one : https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update. Could you also try to delete the build directory and start again from scratch (cmake & make)? And if it does not work, could you provide the whole error message? |
Thanks - I'll have a better look at it, or might start a new branch based
on master if it gives too much trouble. I just thought I'd check if it
was obvious to you what was wrong.
…On Mon, 28 Sep 2020, 21:20 JF002, ***@***.***> wrote:
Mhm this branch generates a lot of warnings, but no error on my side...
Which version of the toolchain do you use ? I'm using this one :
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads/9-2020-q2-update
.
Could you also try to delete the build directory and start again from
scratch (cmake & make)?
And if it does not work, could you provide the whole error message?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACLSY7YEXROFKFWQE4OOILSIDV2JANCNFSM4R3W5CLQ>
.
|
I didn't find the problem, even after updating the toolchain. I think it must be something to do with how the header files were updated - but I don't understand how it compiled for you. |
I have made some progress - mostly with learning the structure of the code so I can add a screen to display data, and am just starting to look at TWI_master to start to talk to the accelerometer chip. I also wondered about TWI_master - I can't see a way of checking if a read/write is successful or not. Have I missed something, or should I expose the structure that reports error codes etc., either by making it public, or adding getter functions - do you have a preference? Thanks |
Sorry for the delayed answer ! I'm not sure there are any license issue. These files come from unknown sources and I don't know if we can use it in a FOSS software. If I recall correctly, an SDK for the BMA423 is available on Github, but not for the BMA421. It also needs a BLOB (configuration file) to enable advanced features like step counting, and we don't have the sources of this blob. Maybe we just need to take the time to check that it is OK (and compatible with GPLv3) to use them in the project? Regarding the error management in TwiMaster (and other drivers), you're right, there's not much. The first reason is that I haven't taken the time to think about it. Second reason is that if a transfert fails, there's not much we can do at the application level in case of error, except maybe retry (or reset). So, any help on this subject is welcome :) What structure would you want to expose? |
No problem - you have lots of issues and pull requests to look at lately!
I hadn't spotted the 'configuration file' I thought it was just a dump of
the registers on the chip, but maybe there is more to it.
I'll have a look at the two licences and see if they are compatible -
because it would be a shame to reinvent the wheel when what has been
published looks so close to what I would write (...and if I write it I am
likely to lose interest once I have interrupt driven FIFO transfers of the
accelerometer data working (which is what I want out of the chip), but I'll
do steps if it is easy....
For my application I am interested in errors because I want to report fault
conditions. I think the structure that is populated in TWI master has
some fields to do with error codes, so if we expose those in the driver,
the code that accesses it can look at the current error state straight
after a request - then it is up to the calling code whether to look for
errors or not.
Do you know if it is possible to get a 'serial' console on the device over
BLE or SWD? That would be much easier than writing to the display to check
what it is doing. I can see some of the code calls a 'logging' function,
but I do not know where that logging information will appear (and I haven't
read up enough on the NRf52 sdk to check - I am being lazy, sorry!).
Will let you know what the licences look like tomorrow.
Thanks
Graham.
…On Sun, 4 Oct 2020 at 10:07, JF002 ***@***.***> wrote:
Sorry for the delayed answer !
I'm not sure there are any license issue. These files come from unknown
sources and I don't know if we can use it in a FOSS software. If I recall
correctly, an SDK for the BMA423 is available on Github, but not for the
BMA421. It also needs a BLOB (configuration file) to enable advanced
features like step counting, and we don't have the sources of this blob.
Maybe we just need to take the time to check that it is OK (and compatible
with GPLv3) to use them in the project?
Regarding the error management in TwiMaster (and other drivers), you're
right, there's not much. The first reason is that I haven't taken the time
to think about it. Second reason is that if a transfert fails, there's not
much we can do at the application level in case of error, except maybe
retry (or reset). So, any help on this subject is welcome :)
What structure would you want to expose?
In "normal" project, I would use exception, but I don't think that's a
good idea for embedded, so error codes (enum class ?) returned by method
might be a good candidate.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACLSY2Y7OJT43JY6IFV4D3SJA3NPANCNFSM4R3W5CLQ>
.
--
Graham Jones <http://google.com/+GrahamJones>
Hartlepool, UK.
|
Yes, either ARM Semihosting or Segger's RTT are both possible. |
@jones139 This is the accelerometer blob that we don't know the license of: https://github.com/daniel-thompson/bma42x-upy/raw/master/BMA421-Sensor-API/bma421_config.h |
Ah, thanks - I will read up on what that does - it looked like you should be able to get the main accelerometer functions by just reading and writing registers (based on the BMA423 datasheet), but I will see. |
I have just tried incorporating the open source BMA423 library from Bosch (https://github.com/BoschSensortec/BMA423-Sensor-API) and using that with minimal modification (just changed the expected chip_id. |
Thanks for your work, it looks promising. |
I'd really like to see a heartrate sensor on infinitime. I searched around the wasp-os code for the relevant bits and the license is LGPL-3. the hardware driver the "Photoplethysmogram (PPG) Signal Processing" |
Thanks for this - I was thinking I'd need to look up how to convert the two
signals (one visible and one infrared) into the saturation figure -
hopefully the signal processing one does that - I'll have a look.
…On Fri, 6 Nov 2020 at 23:58, Don Park ***@***.***> wrote:
I'd really like to see a heartrate sensor on infinitime. I searched around
the wasp-os code for the relevant bits and the license is LGPL-3.
the hardware driver
https://github.com/daniel-thompson/wasp-os/blob/master/wasp/drivers/hrs3300.py
the "Photoplethysmogram (PPG) Signal Processing"
https://github.com/daniel-thompson/wasp-os/blob/master/wasp/ppg.py
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#67 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACLSY3FIHWBQ5WHIDXGZHTSOSERZANCNFSM4R3W5CLQ>
.
--
Graham Jones <http://google.com/+GrahamJones>
Hartlepool, UK.
|
Accelerometer and heart rate sensor have been integrated in version 1.0 :) |
Sorry for the simple question in an issue.....
From the README it looks as though you have the accelerometer and heart rate sensor working. T
his is handy because I was just about to offer to do it......but I can't find the code for it.
I have compiled the latest 'master' branch (which provides V0.8.2) and the UI is not showing me any HR or accelerometer data, and I can't find it in the code.
I suspect it must be in a branch, but I can not find it.
I don't want to go reinventing something you have already done, so thought I should ask.
Thanks
Graham.
The text was updated successfully, but these errors were encountered: