{"action":"created","issue":{"url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/8","repository_url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com","labels_url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/8/comments","events_url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/8/events","html_url":"https://github.com/SensorsIot/IOTAppstory.com/issues/8","id":199430539,"number":8,"title":"Wifi parameters for stuff which needs the value before setup() loop","user":{"login":"vyruz1986","id":3620147,"avatar_url":"https://avatars.githubusercontent.com/u/3620147?v=3","gravatar_id":"","url":"https://api.github.com/users/vyruz1986","html_url":"https://github.com/vyruz1986","followers_url":"https://api.github.com/users/vyruz1986/followers","following_url":"https://api.github.com/users/vyruz1986/following{/other_user}","gists_url":"https://api.github.com/users/vyruz1986/gists{/gist_id}","starred_url":"https://api.github.com/users/vyruz1986/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vyruz1986/subscriptions","organizations_url":"https://api.github.com/users/vyruz1986/orgs","repos_url":"https://api.github.com/users/vyruz1986/repos","events_url":"https://api.github.com/users/vyruz1986/events{/privacy}","received_events_url":"https://api.github.com/users/vyruz1986/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-08T16:22:42Z","updated_at":"2017-01-12T22:41:33Z","closed_at":null,"body":"Hi,\r\nAs you requested in your video, I am trying to port an existing sketch I had (DHT22 MQTT temperature logger) to an IOTAppStory sketch.\r\nI am running into something that I don't know the solution to:\r\nFor reading DHT22 sensors, I use the [adafruit DHT library](https://github.com/adafruit/DHT-sensor-library) which requires an instance of the library to be created before setup() function is run. \r\nThe problem is when creating the instance you have to pass the pin number of the DHT sensors as a parameter, like so:\r\n```c++\r\n#define DHTPIN D4\r\n#define DHTTYPE DHT22\r\nDHT dht(DHTPIN, DHTTYPE);\r\n```\r\nLooking at the virginSoil code I started with, it seems I will never have my `config` struct variables at boot time, because the  `readFullConfiguration();` function is only called in the `setup()` loop\r\n\r\nIs there a solution to this?"},"comment":{"url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/comments/272307170","html_url":"https://github.com/SensorsIot/IOTAppstory.com/issues/8#issuecomment-272307170","issue_url":"https://api.github.com/repos/SensorsIot/IOTAppstory.com/issues/8","id":272307170,"user":{"login":"SensorsIot","id":13062557,"avatar_url":"https://avatars.githubusercontent.com/u/13062557?v=3","gravatar_id":"","url":"https://api.github.com/users/SensorsIot","html_url":"https://github.com/SensorsIot","followers_url":"https://api.github.com/users/SensorsIot/followers","following_url":"https://api.github.com/users/SensorsIot/following{/other_user}","gists_url":"https://api.github.com/users/SensorsIot/gists{/gist_id}","starred_url":"https://api.github.com/users/SensorsIot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SensorsIot/subscriptions","organizations_url":"https://api.github.com/users/SensorsIot/orgs","repos_url":"https://api.github.com/users/SensorsIot/repos","events_url":"https://api.github.com/users/SensorsIot/events{/privacy}","received_events_url":"https://api.github.com/users/SensorsIot/received_events","type":"User","site_admin":false},"created_at":"2017-01-12T22:41:33Z","updated_at":"2017-01-12T22:41:33Z","body":"This library is written for fixed pins and sensor types, which is understandable for me, because usually, you wire your device before you write/load the sketch. This is somehow different than credentials, or services you want to call. These things can change without physical change.\r\nIf you want to create a flexible script, you have to add a function to the library which is able to change the pin and sensor type on the fly. This is not very complicated."}}
{"actor":{"display_login":"SensorsIot"}}