Skip to content

Are built-in examples on GitHub too? I'd like to propose an improvement to the Fade sketch #5115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
YakovL opened this issue Jul 10, 2016 · 2 comments

Comments

@YakovL
Copy link
Contributor

YakovL commented Jul 10, 2016

Hello Arduino Dev community, I've searched this repo but haven't found, so please guide me where the built-in examples of Arduino IDE are stored and can I propose some improvements?

More specificly, the Fade sketch has these lines:

if (brightness == 0 || brightness == 255) {
  fadeAmount = -fadeAmount ;
}

which I'd say is not a good code as if we change fadeAmount to, say, 7 than we will miss the == 255 value (brightness will rise up to 7*36 = 252 and then will become 259 and will grow further). It should be

if (brightness <= 0 || brightness >= 255) {
  fadeAmount = -fadeAmount ;
}

instead, I would say. So, where do I propose such improvements?

@matthijskooijman
Copy link
Collaborator

I noticed the pullrequest, so seems this one is answered. Closing.

@matthijskooijman matthijskooijman added the Type: Invalid Off topic for this repository, or a bug report determined to not actually represent a bug label Jul 10, 2016
@per1234 per1234 removed the Type: Invalid Off topic for this repository, or a bug report determined to not actually represent a bug label Nov 7, 2017
s0ren pushed a commit to STU-IT/arduino17-18 that referenced this issue Dec 6, 2017
..so that changing fadeAmount (to, say, 7) doesn't break the algorithm making an infinit loop (see arduino/Arduino#5115)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants