{"action":"created","issue":{"url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/301","repository_url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5","labels_url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/301/comments","events_url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/301/events","html_url":"https://github.com/sandeepmistry/arduino-nRF5/issues/301","id":349692666,"node_id":"MDU6SXNzdWUzNDk2OTI2NjY=","number":301,"title":"Makerdiary.com nRF52832-MDK supported by generic device","user":{"login":"w8abz","id":7034858,"node_id":"MDQ6VXNlcjcwMzQ4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/7034858?v=4","gravatar_id":"","url":"https://api.github.com/users/w8abz","html_url":"https://github.com/w8abz","followers_url":"https://api.github.com/users/w8abz/followers","following_url":"https://api.github.com/users/w8abz/following{/other_user}","gists_url":"https://api.github.com/users/w8abz/gists{/gist_id}","starred_url":"https://api.github.com/users/w8abz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w8abz/subscriptions","organizations_url":"https://api.github.com/users/w8abz/orgs","repos_url":"https://api.github.com/users/w8abz/repos","events_url":"https://api.github.com/users/w8abz/events{/privacy}","received_events_url":"https://api.github.com/users/w8abz/received_events","type":"User","site_admin":false},"labels":[{"id":340593712,"node_id":"MDU6TGFiZWwzNDA1OTM3MTI=","url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-11T00:50:40Z","updated_at":"2018-08-27T15:07:43Z","closed_at":null,"author_association":"NONE","body":"\r\nAll,\r\nI 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.\r\n\r\nNot so much an \"issue\" as hoping this helps someone else.\r\n\r\nSorry, I don't know the Arduino library/hardware structure well enough to create a whole new variant.\r\n\r\nBTW, I hope you'll support the nRF52840-MDK soon, too!\r\n\r\nDale\r\n\r\n```\r\n  /*\r\n  Copyright (c) 2014-2015 Arduino LLC.  All right reserved.\r\n  Copyright (c) 2016 Sandeep Mistry All right reserved.\r\n  This library is free software; you can redistribute it and/or\r\n  modify it under the terms of the GNU Lesser General Public\r\n  License as published by the Free Software Foundation; either\r\n  version 2.1 of the License, or (at your option) any later version.\r\n  This library is distributed in the hope that it will be useful,\r\n  but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n  See the GNU Lesser General Public License for more details.\r\n  You should have received a copy of the GNU Lesser General Public\r\n  License along with this library; if not, write to the Free Software\r\n  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r\n*/\r\n\r\n#ifndef _VARIANT_GENERIC_\r\n#define _VARIANT_GENERIC_\r\n\r\n/** Master clock frequency */\r\n#ifdef NRF52\r\n#define VARIANT_MCK       (64000000ul)\r\n#else\r\n#define VARIANT_MCK       (16000000ul)\r\n#endif\r\n\r\n/*----------------------------------------------------------------------------\r\n *        Headers\r\n *----------------------------------------------------------------------------*/\r\n\r\n#include \"WVariant.h\"\r\n\r\n#ifdef __cplusplus\r\nextern \"C\"\r\n{\r\n#endif // __cplusplus\r\n\r\n// Number of pins defined in PinDescription array\r\n#define PINS_COUNT           (32u)\r\n#define NUM_DIGITAL_PINS     (32u)\r\n#define NUM_ANALOG_INPUTS    (8u)\r\n#define NUM_ANALOG_OUTPUTS   (0u)\r\n\r\n// LEDs\r\n#define PIN_LEDG               (22)   // P0.22\r\n#define PIN_LEDR               (23)   // P0.23\r\n#define PIN_LEDB               (24)   // P0.24\r\n#define LED_BUILTIN            PIN_LEDG\r\n\r\n/*\r\n * Analog pins\r\n */\r\n#define PIN_A0               (2)  // P0.02\r\n#define PIN_A1               (3)  // P0.03\r\n#define PIN_A2               (4)  // P0.04\r\n#define PIN_A3               (5)  // P0.05\r\n#define PIN_A4               (28) // P0.28\r\n#define PIN_A5               (29) // P0.29\r\n#define PIN_A6               (30) // P0.30\r\n#define PIN_A7               (31) // P0.31\r\n\r\nstatic const uint8_t A0  = PIN_A0 ;\r\nstatic const uint8_t A1  = PIN_A1 ;\r\nstatic const uint8_t A2  = PIN_A2 ;\r\nstatic const uint8_t A3  = PIN_A3 ;\r\nstatic const uint8_t A4  = PIN_A4 ;\r\nstatic const uint8_t A5  = PIN_A5 ;\r\nstatic const uint8_t A6  = PIN_A6 ;\r\nstatic const uint8_t A7  = PIN_A7 ;\r\n#ifdef NRF52\r\n#define ADC_RESOLUTION    14\r\n#else\r\n#define ADC_RESOLUTION    10\r\n#endif\r\n\r\n/*\r\n * Serial interfaces\r\n */\r\n// Serial\r\n#define PIN_SERIAL_RX       (19) // P0.19\r\n#define PIN_SERIAL_TX       (20) // P0.20\r\n\r\n/*\r\n * SPI Interfaces\r\n */\r\n#define SPI_INTERFACES_COUNT 1\r\n\r\n#define PIN_SPI_MISO         (11) // P0.11\r\n#define PIN_SPI_MOSI         (12) // P0.12\r\n#define PIN_SPI_SCK          (13) // P0.13\r\n\r\nstatic const uint8_t SS   = (14) ;  // P0.14\r\nstatic const uint8_t MOSI = PIN_SPI_MOSI ;\r\nstatic const uint8_t MISO = PIN_SPI_MISO ;\r\nstatic const uint8_t SCK  = PIN_SPI_SCK ;\r\n\r\n/*\r\n * Wire Interfaces\r\n */\r\n#define WIRE_INTERFACES_COUNT 1\r\n\r\n#define PIN_WIRE_SDA         (15u) // P0.15\r\n#define PIN_WIRE_SCL         (16u) // P0.16\r\n\r\nstatic const uint8_t SDA = PIN_WIRE_SDA;\r\nstatic const uint8_t SCL = PIN_WIRE_SCL;\r\n\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n\r\n#endif\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/comments/416258638","html_url":"https://github.com/sandeepmistry/arduino-nRF5/issues/301#issuecomment-416258638","issue_url":"https://api.github.com/repos/sandeepmistry/arduino-nRF5/issues/301","id":416258638,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjI1ODYzOA==","user":{"login":"w8abz","id":7034858,"node_id":"MDQ6VXNlcjcwMzQ4NTg=","avatar_url":"https://avatars2.githubusercontent.com/u/7034858?v=4","gravatar_id":"","url":"https://api.github.com/users/w8abz","html_url":"https://github.com/w8abz","followers_url":"https://api.github.com/users/w8abz/followers","following_url":"https://api.github.com/users/w8abz/following{/other_user}","gists_url":"https://api.github.com/users/w8abz/gists{/gist_id}","starred_url":"https://api.github.com/users/w8abz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w8abz/subscriptions","organizations_url":"https://api.github.com/users/w8abz/orgs","repos_url":"https://api.github.com/users/w8abz/repos","events_url":"https://api.github.com/users/w8abz/events{/privacy}","received_events_url":"https://api.github.com/users/w8abz/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T15:07:43Z","updated_at":"2018-08-27T15:07:43Z","author_association":"NONE","body":"Sandeep and all,\r\n\r\nI 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.\r\n\r\nThanks for the guidance so far!  Let me know where I mess up -- I need to learn git anyway!\r\n\r\nAlso, 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.\r\n\r\nDale\r\n\r\n"}}
{"actor":{"display_login":"w8abz"}}