Open w8abz opened 6 years ago
Sorry, tried to include the code in a "code" markup (markdown) but it didn't take. And the path to the folder with the variant.h file I modified is:
C:\Users\myusername\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.5.1\variants\Generic
Also, thanks, Sandeep! I've been using this library with about a half dozen different devices. This library and the BLEPeripheral library have been very useful!
Dale
@w8abz we'd welcome a work in progress pull request for this, and can help you on it if you open one. Just ask some questions, examples of creating a new variant can be found in:
Sandeep and all,
I was able to modify the boards.txt file and add this as a separate variant "makerdiary nRF52832-MDK" (rather than using the "Generic nRF52832" variant with only a modified variant.h file) on my Arduino IDE install. I'm sorry I haven't had time to dig in and do the pull request. Maybe this weekend... But the new variant works nicely, and the pull mods should go pretty quickly once I have a chance to sit down and work my way through the exact steps I went through and the structure.
Thanks for the guidance so far! Let me know where I mess up -- I need to learn git anyway!
Also, I now have a couple of the makerdiary nRF52840-MDK boards, so I hope I can help with adding support for the 52840 to this library.
Dale
Sandeep and all,
Okay, I'm learning as I go, and I hope I did this appropriately. If not, I'll gracefully -- and gratefully -- accept corrections and hand-holding!
First, I did a fork from this repository to w8abz / Arduino-nRF5. Then, I created a branch called makerdiary-nrf52832-mdk. Then, I created a new folder in the variants folder called nRF52832-MDK and added the three files that need to be there: variant.h (modified for this board), and pins_arduino.h and variant.cpp, which are unmodified copies of the ones for the Generic nRf52832 variant. Then, I edited the boards.txt file (a couple folders up the hierarchy) to add the lines for this board, after the last nRF52832 variant and right before the set of nRF51822 variants. (I hope I got the folder references here to match the folder name above!) I committed all those changes, and I tried to write reasonable commit statements about what I had changed.
So, at this point, I think it's ready for folks to try out. Am I coming up on being ready to do the pull request?
One thing I forgot to do is include the Issue number (301) in my commit statements. Sorry.
Dale, W8ABZ
So, at this point, I think it's ready for folks to try out. Am I coming up on being ready to do the pull request?
Sounds like it!
I'm not sure if any of the maintainers own one of the boards to try out, however we are happy to review your changes. Maybe someone else from the community can try them out.
All, I was able to get the "generic nRF52" device to support the makerdiary.com nRF52832-MDK (which I got from Seeed Studio) by modifying the generic variant.h file to line up the various pins, especially the RGB LED and tx/rx pins for serial support. The modified variant.h is listed below. That was all I needed to modify to get everything I needed working.
Not so much an "issue" as hoping this helps someone else.
Sorry, I don't know the Arduino library/hardware structure well enough to create a whole new variant.
BTW, I hope you'll support the nRF52840-MDK soon, too!
Dale