nRF5 action!
-
@d00616 said in nRF5 Bluetooth action!:
MySensors nRF5 Boards
Thanks for the caring replay.
I couldn't find that exact "MySensors nRF5 Boards" library you were talking about also what is the purpose of this library anyways?
Do you know where can the arduino library folder be found with all the arduino functions?
@Mike_Lemo it is here :
https://github.com/mysensors/ArduinoHwNRF5Scroll up in this thread for more details, or read the documentation there.
-
@d00616 said in nRF5 Bluetooth action!:
MySensors nRF5 Boards
Thanks for the caring replay.
I couldn't find that exact "MySensors nRF5 Boards" library you were talking about also what is the purpose of this library anyways?
Do you know where can the arduino library folder be found with all the arduino functions?
@Mike_Lemo said in nRF5 Bluetooth action!:
I couldn't find that exact "MySensors nRF5 Boards" library you were talking about also what is the purpose of this library anyways?
Follow the instructions for ArduinoBoards and ArduinoHwNRF5
Do you know where can the arduino library folder be found with all the arduino functions?
The arduino-nrf5 port only implements functionality documented in the official Arduino Reference but mostly not more functionality available for SAMD :-(. Additional functionality like BLE or using included hardware must come from external libraries like MySensors.
A good way to implement the tone commands is to fork the arduino-nRF5 repository at github. Change what you need and create an pull request with reference to the Arduino reference. If you inform me about your PR I comment it to increase the chance for acceptance otherwise it's time to maintain an separate fork of this repository.
-
@Nca78 said in nRF5 Bluetooth action!:
I will test tomorrow with the Ebyte module I have soldered, and the reset pin too.
That would be great! :) Please try the BatteryPoweredSensor sketch when you do. I'm very curious if you will have the same or different result as what I'm getting.
-
@d00616 said in nRF5 Bluetooth action!:
@Mike_Lemo said in nRF5 Bluetooth action!:
I couldn't find that exact "MySensors nRF5 Boards" library you were talking about also what is the purpose of this library anyways?
Follow the instructions for ArduinoBoards and ArduinoHwNRF5
Do you know where can the arduino library folder be found with all the arduino functions?
The arduino-nrf5 port only implements functionality documented in the official Arduino Reference but mostly not more functionality available for SAMD :-(. Additional functionality like BLE or using included hardware must come from external libraries like MySensors.
A good way to implement the tone commands is to fork the arduino-nRF5 repository at github. Change what you need and create an pull request with reference to the Arduino reference. If you inform me about your PR I comment it to increase the chance for acceptance otherwise it's time to maintain an separate fork of this repository.
that actually caused more trouble won't even let me compile the blank included example code.
-
@d00616 said in nRF5 Bluetooth action!:
@Mike_Lemo said in nRF5 Bluetooth action!:
I couldn't find that exact "MySensors nRF5 Boards" library you were talking about also what is the purpose of this library anyways?
Follow the instructions for ArduinoBoards and ArduinoHwNRF5
Do you know where can the arduino library folder be found with all the arduino functions?
The arduino-nrf5 port only implements functionality documented in the official Arduino Reference but mostly not more functionality available for SAMD :-(. Additional functionality like BLE or using included hardware must come from external libraries like MySensors.
A good way to implement the tone commands is to fork the arduino-nRF5 repository at github. Change what you need and create an pull request with reference to the Arduino reference. If you inform me about your PR I comment it to increase the chance for acceptance otherwise it's time to maintain an separate fork of this repository.
that actually caused more trouble won't even let me compile the blank included example code.
@Mike_Lemo said in nRF5 Bluetooth action!:
that actually caused more trouble won't even let me compile the blank included example code.
Are you talking about the MyNRF5Board example? Arduino IDE compiles it for me without any complaints.
-
@Mike_Lemo said in nRF5 Bluetooth action!:
that actually caused more trouble won't even let me compile the blank included example code.
Are you talking about the MyNRF5Board example? Arduino IDE compiles it for me without any complaints.
-
-
At some point, I had to re-arrange the libraries though (don't remember which files or which ones) to get all this stuff working. Before that, it wasn't finding the files. Actually, I think this would be a good topic for discussion, to make sure we're all doing it the same way. If we're doing it differently, it might make cross-checking each others attempts more difficult. Also, maybe there's a better way than the brute-force way that I did it.
If anyone has interest, I can post how my libraries are currently structured. If nothing else, it would be a starting point for discussion on what to do (or not to do).
-
At some point, I had to re-arrange the libraries though (don't remember which files or which ones) to get all this stuff working. Before that, it wasn't finding the files. Actually, I think this would be a good topic for discussion, to make sure we're all doing it the same way. If we're doing it differently, it might make cross-checking each others attempts more difficult. Also, maybe there's a better way than the brute-force way that I did it.
If anyone has interest, I can post how my libraries are currently structured. If nothing else, it would be a starting point for discussion on what to do (or not to do).
@NeverDie said in nRF5 Bluetooth action!:
At some point, I had to re-arrange the libraries though (don't remember which files or which ones) to get all this stuff working. Before that, it wasn't finding the files. Actually, I think this would be a good topic for discussion, to make sure we're all doing it the same way. If we're doing it differently, it might make cross-checking each others attempts more difficult. Also, maybe there's a better way than the brute-force way that I did it.
If anyone has interest, I can post how my libraries are currently structured. If nothing else, it would be a starting point for discussion on what to do (or not to do).
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
-
@NeverDie said in nRF5 Bluetooth action!:
At some point, I had to re-arrange the libraries though (don't remember which files or which ones) to get all this stuff working. Before that, it wasn't finding the files. Actually, I think this would be a good topic for discussion, to make sure we're all doing it the same way. If we're doing it differently, it might make cross-checking each others attempts more difficult. Also, maybe there's a better way than the brute-force way that I did it.
If anyone has interest, I can post how my libraries are currently structured. If nothing else, it would be a starting point for discussion on what to do (or not to do).
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
@Mike_Lemo said in nRF5 Bluetooth action!:
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
It hasn't been easy, I'll grant you that. I get the impression d00616 probably does most of his work in Linux, and so some of the disconnect with the Windows IDE probably stems from that. Once we get the basics ironed out, though, I expect things will go more smoothly. In fact, I think we're almost there. A lot of the work for sleeping, measuring source voltage, etc., has already been done, which is far better than starting from scratch. And there's even example code, which helps tremendously.
-
Good news! Interestingly enough, the MockMySensors sketch seems to work fine when I load it onto the Ebyte. What a relief! So, I may try hijacking that sketch to convey voltage measurements instead of the BatteryPoweredSensor sketch that mysteriously hasn't been working on my Ebyte modules.
-
@NeverDie said in nRF5 Bluetooth action!:
At some point, I had to re-arrange the libraries though (don't remember which files or which ones) to get all this stuff working. Before that, it wasn't finding the files. Actually, I think this would be a good topic for discussion, to make sure we're all doing it the same way. If we're doing it differently, it might make cross-checking each others attempts more difficult. Also, maybe there's a better way than the brute-force way that I did it.
If anyone has interest, I can post how my libraries are currently structured. If nothing else, it would be a starting point for discussion on what to do (or not to do).
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
@Mike_Lemo said in nRF5 Bluetooth action!:
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
The Nordic SDK is more complete than Arduino-nrf5 at the moment, but there is no compatibility with MySensors.
The good news, with SDK 13 the 'Nordic Semiconductor ASA' License was changed. The old ASA was the reason for me to rewrite the complete ESB protocol. Now the license is much less restrictive. I think now the way is open to integrate SDK code into arduino-nrf5 or provide SDK based arduino-libraries.
@NeverDie said in nRF5 Bluetooth action!:
It hasn't been easy, I'll grant you that. I get the impression d00616 probably does most of his work in Linux, and so some of the disconnect with the Windows IDE probably stems from that.
I can't change the way of Windows driver handling, but when there are Windows specific issues then they bust be fixed.
-
@Mike_Lemo said in nRF5 Bluetooth action!:
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
The Nordic SDK is more complete than Arduino-nrf5 at the moment, but there is no compatibility with MySensors.
The good news, with SDK 13 the 'Nordic Semiconductor ASA' License was changed. The old ASA was the reason for me to rewrite the complete ESB protocol. Now the license is much less restrictive. I think now the way is open to integrate SDK code into arduino-nrf5 or provide SDK based arduino-libraries.
@NeverDie said in nRF5 Bluetooth action!:
It hasn't been easy, I'll grant you that. I get the impression d00616 probably does most of his work in Linux, and so some of the disconnect with the Windows IDE probably stems from that.
I can't change the way of Windows driver handling, but when there are Windows specific issues then they bust be fixed.
@d00616 said in nRF5 Bluetooth action!:
@Mike_Lemo said in nRF5 Bluetooth action!:
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
The Nordic SDK is more complete than Arduino-nrf5 at the moment, but there is no compatibility with MySensors.
The good news, with SDK 13 the 'Nordic Semiconductor ASA' License was changed. The old ASA was the reason for me to rewrite the complete ESB protocol. Now the license is much less restrictive. I think now the way is open to integrate SDK code into arduino-nrf5 or provide SDK based arduino-libraries.
.
You mean way more complete every thing is accesable there and there is an example for everything and I didn't use my sensors anyways
-
@d00616 said in nRF5 Bluetooth action!:
@Mike_Lemo said in nRF5 Bluetooth action!:
Dunno that whole arduino BRF52832 programming thing seems too complicated just started to learn how to use the nordic SDK with eclipse until a proper solution is found.
The Nordic SDK is more complete than Arduino-nrf5 at the moment, but there is no compatibility with MySensors.
The good news, with SDK 13 the 'Nordic Semiconductor ASA' License was changed. The old ASA was the reason for me to rewrite the complete ESB protocol. Now the license is much less restrictive. I think now the way is open to integrate SDK code into arduino-nrf5 or provide SDK based arduino-libraries.
.
You mean way more complete every thing is accesable there and there is an example for everything and I didn't use my sensors anyways
@Mike_Lemo said in nRF5 Bluetooth action!:
You mean way more complete every thing is accesable there and there is an example for everything and I didn't use my sensors anyways
No. I mean if you want to use the Nordic MCU with BLE and you want to access the whole hardware without developing drivers, then the Nordic SDK is an option. For special requirements like tone() you have to develop your own routine for Arduino or SDK.
If you want write code which is compatible with other Vendors or want use MySensors then the SDK isn't the best choice.
The arduino-nrf5 targets to provide the Arduino language. I think this is mostly complete. MySensors brings additional support for enhanced pin output modes and the random number generator (no SoftDevice support here).
Accessing the internal MCU hardware must be added via Arduino libraries. With the new SDK license I think it's possible to put parts of the SDK into libraries supporting Hardware which is not specified in the Arduino reference.
If you want to develop BLE applications with portable code, there are open source implementations like http://mynewt.apache.org/ which are designed to be portable.
-
Good news! The hwCPUVoltage() function measures the Vcc voltage on the Ebyte module in millivolts. I'm able to send that as a barometer reading using the mocksensors sketch, and it arrives all the way into Domoticz, where it is logged and graphed. So, obviously I need to streamline that a bit, but the proof of concept works. :)
-
Good news! The hwCPUVoltage() function measures the Vcc voltage on the Ebyte module in millivolts. I'm able to send that as a barometer reading using the mocksensors sketch, and it arrives all the way into Domoticz, where it is logged and graphed. So, obviously I need to streamline that a bit, but the proof of concept works. :)
Quantization error on the hwCpuVoltage() function appears to about 14 millivolts, which is a nice little improvement over the atmega328p. Measurement accuracy appears to be well within those bounds.
Next step is to measure voltage on an analog pin using an AnalogRead. Not sure if the reference voltage is Vcc (as it typically is with the atmega328p) or something else for those measurements.
-
Given new Arduino Primo contains a buzzer connected to nrf52, we might expect tone() function to be compatible with nrf52 very soon
https://www.arduino.cc/en/uploads/Main/ARDUINO_PRIMO-V022_SCH.pdf
-
Quantization error on the hwCpuVoltage() function appears to about 14 millivolts, which is a nice little improvement over the atmega328p. Measurement accuracy appears to be well within those bounds.
Next step is to measure voltage on an analog pin using an AnalogRead. Not sure if the reference voltage is Vcc (as it typically is with the atmega328p) or something else for those measurements.
@NeverDie said in nRF5 Bluetooth action!:
Quantization error on the hwCpuVoltage() function appears to about 14 millivolts, which is a nice little improvement over the atmega328p. Measurement accuracy appears to be well within those bounds.
Next step is to measure voltage on an analog pin using an AnalogRead. Not sure if the reference voltage is Vcc (as it typically is with the atmega328p) or something else for those measurements.
Strangely, if I do, say, analogRead(A4) on the nRF52832, all I get back is a 10-bit number, not a 12-bit number. i.e. the number never exceeds 1023. That can't be right. Should I be using a different function call to get the full 12 bits on the nRF52832?
-
@NeverDie said in nRF5 Bluetooth action!:
Quantization error on the hwCpuVoltage() function appears to about 14 millivolts, which is a nice little improvement over the atmega328p. Measurement accuracy appears to be well within those bounds.
Next step is to measure voltage on an analog pin using an AnalogRead. Not sure if the reference voltage is Vcc (as it typically is with the atmega328p) or something else for those measurements.
Strangely, if I do, say, analogRead(A4) on the nRF52832, all I get back is a 10-bit number, not a 12-bit number. i.e. the number never exceeds 1023. That can't be right. Should I be using a different function call to get the full 12 bits on the nRF52832?
-
@NeverDie looks like you need to call analogReadResolution first https://github.com/sandeepmistry/arduino-nRF5/blob/425e719af8d85b543def01e49a6ef4048525dc59/cores/nRF5/wiring_analog.h#L74
@mfalkvidd said in nRF5 Bluetooth action!:
@NeverDie looks like you need to call analogReadResolution first https://github.com/sandeepmistry/arduino-nRF5/blob/425e719af8d85b543def01e49a6ef4048525dc59/cores/nRF5/wiring_analog.h#L74
Thanks! That did the trick. Calling analogReadResolution(12) once in Setup() routine, I now get back a 12-bit number (i.e. up to 4095) thereafter when I do an analogRead(...). :)