NativeAnt:16:1: error: 'NativeAnt' does not name a type; did you mean 'BaseAnt'?
NativeAnt ant = NativeAnt();
--
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/0095f403-241f-4037-b2f3-d416d8e579f0%40googlegroups.com.
Ah that is because I haven't finished that code (see example header), there is a massive refactor going on in the develop branch to fix a bunch of stuff and support for native, spi and 3 new RTOSes. I wrote the example early as a CI test, sorry for that.
On Sun, May 3, 2020 at 9:43 AM <drew...@gmail.com> wrote:
Yesterday after modifying bootloader/softdevice on my adafruit nrf5 I tried some ant examples. When trying to compile the native ant example I get the following error:--
NativeAnt:16:1: error: 'NativeAnt' does not name a type; did you mean 'BaseAnt'?NativeAnt ant = NativeAnt();Does anybody know what this could be? I explored the libraries and NativeAnt seems to be defined.
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/c251d1cd-8f44-4395-8c45-d30586ed2a77%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/c251d1cd-8f44-4395-8c45-d30586ed2a77%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/560b4759-74d6-40be-ba33-1ba58a874bd6%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CAGXAbSrKLck4E5zbMLhtuczwprA6g-cSpDu8P%3D0TJnt3cpUGyg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/560b4759-74d6-40be-ba33-1ba58a874bd6%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CAGXAbSrKLck4E5zbMLhtuczwprA6g-cSpDu8P%3D0TJnt3cpUGyg%40mail.gmail.com.
Hi,I have a working example of ANT+ HRM with the S340 on the Adafruit nRF52840 Express Feather. Let me know if that fits your situation.
That is somewhat tricky, as that Feather is a Bluefruit Feather and I wanted to retain the Bluefruit capability, i.e., to use the SD in multi-protocol mode.Note: the soft device approach necessitates an interrupt-driven approach, you must make yourself familiar with the concept of "interrupt handlers" and "callback functions" at least. If you want to use the Bluefruit lib together with ANT+, then at-least a basic competence in in multithreaded programming models (semaphore handling, concurrently running tasks in a time-shared manner, etc.) in general, and FreeRTOS in particular is a must. If the concepts above sound as Klingon-speech to you, then it is better to learn a little about them first, as lack of that knowledge might cause a lot-of frustration during programming.
Furthermore, usign my example would mean that you would need to install an ANT enabled S3xx series softdevice to your boardHaving said that, the simplified API call sequence for receiving ANT+ HRM sensor data is more-or-less as follows. This might help your current effort (Note, that I have omitted details about interworking with the Bluefruit stack):
- Enable the softdevice by calling sd_softdevice_enable(...)
- Enable the ANT+ stack by
- "Mallocating" a suitably sized ANT stack buffer, possibly relying on the ANT_ENABLE_GET_REQUIRED_SPACE(..) macro from the nRF5 SDK
- Calling the sd_ant_enable() method and supplying the buffer to it in order to enable ANT operation
- Set ANT+ network address via sd_ant_network_address_set()
- Setup your ANT HRM profile in "display" mode.
- Assing a channel to it via sd_ant_channel_assign()
- assign proper channel number, device number, device type and transmission type via sd_ant_channel_id_set()
- Set RF frequency to ANT+ frequency via sd_ant_channel_radio_freq_set()
- Set channel period via sd_ant_channel_period_set()
- Add your ANT+ event handler callback
- Implement the SD_EVT_IRQHandler() interrupt handler method from the SoftDevice API
- Enable SD interrupts using the handler above via: NVIC_EnableIRQ(SD_EVT_IRQn);
With this you are "ready" to start receive events, including receive (RX) events from your sensors. You will need to implement ANT+ state machine handling, as well, to handle channel-search timeouts, reconnects, etc.To keep long story short: handling ANT+ sensors with Arduino is still an advanced-level task. I couldn't do this without the help of a fellow programmer (Ryan Green), with whom I got acquainted via Curtis. Ryan made a very efficient, but kinda "quick-and-dirty" task of amalgating nRF5 SDK examples with the Adafruit Bluefruit52 code.The approach by Ryan follows the Bluefruit and nRF SDK approach of amalgating SoftDevice and user-code in a callback/interrupt-driven approach. As it fits better my earlier programming experience from work and my plans for my own nRF52840 Feather project, therefore I use practically no code from the ant-arduino repo currently. (For me the ant-arduino logic is "built around" the concept of single threaded asynch serial communication to a remote ANT radio, which does not suite my use case.)
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/def8df5e-b2c9-41ba-a87b-b1395cfde207%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CANrsrrw8xUDjCkbdv7M49d%3DeS3UqOU%2BmOG-JXqPT1%3DG0zbna6w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/def8df5e-b2c9-41ba-a87b-b1395cfde207%40googlegroups.com.
On Tue, May 5, 2020 at 7:11 AM Gábor Ziegler <orr...@gmail.com> wrote:Hi,I have a working example of ANT+ HRM with the S340 on the Adafruit nRF52840 Express Feather. Let me know if that fits your situation.
That is somewhat tricky, as that Feather is a Bluefruit Feather and I wanted to retain the Bluefruit capability, i.e., to use the SD in multi-protocol mode.Note: the soft device approach necessitates an interrupt-driven approach, you must make yourself familiar with the concept of "interrupt handlers" and "callback functions" at least. If you want to use the Bluefruit lib together with ANT+, then at-least a basic competence in in multithreaded programming models (semaphore handling, concurrently running tasks in a time-shared manner, etc.) in general, and FreeRTOS in particular is a must. If the concepts above sound as Klingon-speech to you, then it is better to learn a little about them first, as lack of that knowledge might cause a lot-of frustration during programming.Just a note, you can get away without using interrupts, but you do risk either wasting time polling (the typical arduino method) or possibly overflowing your event buffer.
Furthermore, usign my example would mean that you would need to install an ANT enabled S3xx series softdevice to your boardHaving said that, the simplified API call sequence for receiving ANT+ HRM sensor data is more-or-less as follows. This might help your current effort (Note, that I have omitted details about interworking with the Bluefruit stack):
- Enable the softdevice by calling sd_softdevice_enable(...)
Doesn't this call have to be wrapped by the TinyUSB calls?
- Enable the ANT+ stack by
- "Mallocating" a suitably sized ANT stack buffer, possibly relying on the ANT_ENABLE_GET_REQUIRED_SPACE(..) macro from the nRF5 SDK
- Calling the sd_ant_enable() method and supplying the buffer to it in order to enable ANT operation
- Set ANT+ network address via sd_ant_network_address_set()
- Setup your ANT HRM profile in "display" mode.
- Assing a channel to it via sd_ant_channel_assign()
- assign proper channel number, device number, device type and transmission type via sd_ant_channel_id_set()
- Set RF frequency to ANT+ frequency via sd_ant_channel_radio_freq_set()
- Set channel period via sd_ant_channel_period_set()
- Add your ANT+ event handler callback
- Implement the SD_EVT_IRQHandler() interrupt handler method from the SoftDevice API
- Enable SD interrupts using the handler above via: NVIC_EnableIRQ(SD_EVT_IRQn);
With this you are "ready" to start receive events, including receive (RX) events from your sensors. You will need to implement ANT+ state machine handling, as well, to handle channel-search timeouts, reconnects, etc.To keep long story short: handling ANT+ sensors with Arduino is still an advanced-level task. I couldn't do this without the help of a fellow programmer (Ryan Green), with whom I got acquainted via Curtis. Ryan made a very efficient, but kinda "quick-and-dirty" task of amalgating nRF5 SDK examples with the Adafruit Bluefruit52 code.The approach by Ryan follows the Bluefruit and nRF SDK approach of amalgating SoftDevice and user-code in a callback/interrupt-driven approach. As it fits better my earlier programming experience from work and my plans for my own nRF52840 Feather project, therefore I use practically no code from the ant-arduino repo currently. (For me the ant-arduino logic is "built around" the concept of single threaded asynch serial communication to a remote ANT radio, which does not suite my use case.)This is correct, the driver will add some code overhead in order to abstract the softdevice API for antplus-arduino and it is definitely not thread safe.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CAGXAbSqqR4moyvND482sQsNPC7pYi2BQG5Rsj0MvpsUQucgcFg%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/c87593cf-8da1-45c1-bcf7-f205e0691d93%40googlegroups.com.
Hi Curtis,See my inline c.ommentsCurtis Malainey <cujoma...@gmail.com> ezt írta (időpont: 2020. máj. 5., K, 17:47):On Tue, May 5, 2020 at 7:11 AM Gábor Ziegler <orr...@gmail.com> wrote:Hi,I have a working example of ANT+ HRM with the S340 on the Adafruit nRF52840 Express Feather. Let me know if that fits your situation.
That is somewhat tricky, as that Feather is a Bluefruit Feather and I wanted to retain the Bluefruit capability, i.e., to use the SD in multi-protocol mode.Note: the soft device approach necessitates an interrupt-driven approach, you must make yourself familiar with the concept of "interrupt handlers" and "callback functions" at least. If you want to use the Bluefruit lib together with ANT+, then at-least a basic competence in in multithreaded programming models (semaphore handling, concurrently running tasks in a time-shared manner, etc.) in general, and FreeRTOS in particular is a must. If the concepts above sound as Klingon-speech to you, then it is better to learn a little about them first, as lack of that knowledge might cause a lot-of frustration during programming.Just a note, you can get away without using interrupts, but you do risk either wasting time polling (the typical arduino method) or possibly overflowing your event buffer.Nope, not if you want to use the Bluefruit lib. That lib assumes that its user is an entry level Arduinoer, so it "hides the complexity" of Bluetooth handling. As such, it "hides" that Bluefruit is using FreeRTOS, and running 2 FreeRTOS threads ("tasks") concurrently: one BLE task (for BLuefruit code) and one SoC task (for the regular Arduino stuff).Ryan's (and mine) adaptation introduces a 3rd task for ANT event handling, among other changes.As such, a basic awareness of FreeRTOS, semaphores and "tasks" are very useful.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CANrsrryUiT-V83eTRJRpfG-75S08u80Z4ObeqrYDpez8EK3fvw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/c87593cf-8da1-45c1-bcf7-f205e0691d93%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/befcba5d-b66f-4554-9a86-8f135c880f59%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CANrsrrz5Zjj%3Dj16AvMz_PpP4LxBFfOpXscs1oZQoqYsPerGD5Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CAGXAbSqzsO4SPN5EE0tdTzU1BK-ApwGoCtzHjZaV9-TWABfCiQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/befcba5d-b66f-4554-9a86-8f135c880f59%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CANrsrrz5Zjj%3Dj16AvMz_PpP4LxBFfOpXscs1oZQoqYsPerGD5Q%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/035f7cf5-66d0-467a-9dc8-674ad3a6be56%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/CANrsrrysKSU31iyaBgWcyBnQ5DC-h7jZ%2B%2BEN9-PQJ7h4PdPmig%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "ant-api" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ant-api+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/3b4cb331-4b12-4922-b47a-13df912f3f86n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ant-api/510b46e6-ba9d-41f7-a662-4f362a5a5c32n%40googlegroups.com.