{"action":"created","issue":{"url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/106","repository_url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib","labels_url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/106/comments","events_url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/106/events","html_url":"https://github.com/TheThingsNetwork/arduino-device-lib/issues/106","id":183607309,"number":106,"title":"Node: Setup TTN class via Node class","user":{"login":"FokkeZB","id":2699409,"avatar_url":"https://avatars.githubusercontent.com/u/2699409?v=3","gravatar_id":"","url":"https://api.github.com/users/FokkeZB","html_url":"https://github.com/FokkeZB","followers_url":"https://api.github.com/users/FokkeZB/followers","following_url":"https://api.github.com/users/FokkeZB/following{/other_user}","gists_url":"https://api.github.com/users/FokkeZB/gists{/gist_id}","starred_url":"https://api.github.com/users/FokkeZB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FokkeZB/subscriptions","organizations_url":"https://api.github.com/users/FokkeZB/orgs","repos_url":"https://api.github.com/users/FokkeZB/repos","events_url":"https://api.github.com/users/FokkeZB/events{/privacy}","received_events_url":"https://api.github.com/users/FokkeZB/received_events","type":"User","site_admin":false},"labels":[{"id":482720888,"url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/labels/device/node","name":"device/node","color":"1d76db","default":false},{"id":426929047,"url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-18T07:14:38Z","updated_at":"2016-12-08T15:02:40Z","closed_at":"2016-12-08T15:02:40Z","body":"Since the Node class is specific to our device we can do something like the following and hide all Serial and TTN stuff:\n\n``` c\n#include <TheThingsNode.h>\n\nconst byte appEui[8] = { 0x70, 0xB3, 0xD5, 0x7E, 0xF0, 0x00, 0x00, 0x3E };\nconst byte appKey[16] = { 0x2A, 0xDE, 0x11, 0xDE, 0x50, 0x49, 0xB3, 0xBD, 0xFD, 0x1C, 0x75, 0x5C, 0xA4, 0xAC, 0x37, 0x7F };\n\nTheThingsNode *node;\n\nvoid setup() {\n\n  node = TheThingsNode::setup();\n\n  node->configNetwork(TTN_FP_EU868);\n\n  node->ttn.showStatus();\n\n  node->println(\"Hello\");\n}\n```\n\nWhat do you think @johanstokking ?\n"},"comment":{"url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/comments/265761269","html_url":"https://github.com/TheThingsNetwork/arduino-device-lib/issues/106#issuecomment-265761269","issue_url":"https://api.github.com/repos/TheThingsNetwork/arduino-device-lib/issues/106","id":265761269,"user":{"login":"FokkeZB","id":2699409,"avatar_url":"https://avatars.githubusercontent.com/u/2699409?v=3","gravatar_id":"","url":"https://api.github.com/users/FokkeZB","html_url":"https://github.com/FokkeZB","followers_url":"https://api.github.com/users/FokkeZB/followers","following_url":"https://api.github.com/users/FokkeZB/following{/other_user}","gists_url":"https://api.github.com/users/FokkeZB/gists{/gist_id}","starred_url":"https://api.github.com/users/FokkeZB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FokkeZB/subscriptions","organizations_url":"https://api.github.com/users/FokkeZB/orgs","repos_url":"https://api.github.com/users/FokkeZB/repos","events_url":"https://api.github.com/users/FokkeZB/events{/privacy}","received_events_url":"https://api.github.com/users/FokkeZB/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T15:02:40Z","updated_at":"2016-12-08T15:02:40Z","body":"I think we should close this (original) request. I'd prefer to keep this class for working with the Node's sensors and the TheThingsNetwork class for the communication. I wouldn't mix them as it would create 2 ways of sending stuff over TTN. One using TheThingsNetwork directly and one via TheThingsNode.\r\n\r\n@amkuipers please create a new issue asking for a class with known Serials of devices. e.g. allowing the user to do:\r\n\r\n```c\r\nTheThingsNetwork ttn(TTN_DEVICE_SODAQONE, freqPlan);\r\n```"}}
{"actor":{"display_login":"FokkeZB"}}