Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

Feature Request: Encapsulate settings / config in extra file #27

Open
tristndev opened this issue Dec 2, 2019 · 4 comments
Open

Feature Request: Encapsulate settings / config in extra file #27

tristndev opened this issue Dec 2, 2019 · 4 comments
Assignees
Labels
discussion enhancement New feature or request

Comments

@tristndev
Copy link
Contributor

Hi all,

another idea that just came to my mind: Wouldn't it be good to move the configuration information (i.e., Wifi credentials, lamp setup (number of LEDs and their arrangement)) from the main code Super_Simple_RGB_WiFi_Lamp.ino into a separate file?

Maybe an according header file would do where you could define your variables.

Would make it a lot easier to keep your config when updating the code base, or also facilitate not including it in pushes to the repository.

What do you think?

@thebigpotatoe
Copy link
Owner

This is starting to sound like a library. Probably should start heading in that direction. But for now there is one reason why these variables are at the top of the main sketch; simplicity.

The project is meant for beginners. People who have never used Arduino or have an code experience, just a will to build the project.

So I wanted to reduce the number of steps it would take to set up the sketch and get it going. Adding another file may be confusing to navigate to and setup even if it was easier to read.

So maybe instead we can start pushing the code into a library instead where we can have header files and such for this reason. Would also allow us to build a nice API which would be human friendly and more verbose. What do you think

@thebigpotatoe thebigpotatoe added discussion enhancement New feature or request labels Dec 3, 2019
@tristndev
Copy link
Contributor Author

In the long run, it probably makes sense to aim for a library.

But also in this state, excluding the config information would actually reduce complexity imho. Sure, it's one additional file, but therefore you have the config stuff isolated in there, i.e. the complexity of the rest is even more hidden.

@Phantisy
Copy link
Contributor

Phantisy commented Dec 3, 2019

Coming from 0 knowledge of Arduino, this project was the reason I bought one, and a very low lever beginner in coding, I personally would not find it hard to have a configuration library isolated. Just as long as the documentation is clear and easy to follow, I think it could work well. Many times I pushed my code and forgot that I needed to revert the config settings back to their original.

@NemoN
Copy link

NemoN commented Dec 3, 2019

Would also be an important feature for me (I had already started it in my fork).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants