Skip to content
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

Add support for LCD backlight brightness #1

Closed
m1dst opened this issue Nov 24, 2017 · 2 comments
Closed

Add support for LCD backlight brightness #1

m1dst opened this issue Nov 24, 2017 · 2 comments

Comments

@m1dst
Copy link
Owner

m1dst commented Nov 24, 2017

There was provision made on the PCB to control the brightness of the LCD. It should be possible to set a value in the code prior to deployment.

The default should be 100%.

I don't see any sense in creating any kind of UI to manage this as it is likely only set once and left. It would be just as easy for someone to change the value and redeploy.

@g4fre
Copy link

g4fre commented Feb 7, 2018

Having this feature would be good. setting its value before deployment would work as it will not need to be changed often. My LCD illuminates the whole shack

m1dst added a commit that referenced this issue Feb 18, 2018
This is experimental.  If you find any issues with hanging we should
roll this feature back.
@m1dst
Copy link
Owner Author

m1dst commented Feb 18, 2018

This is experimental. If you find any issues with hanging we should roll this feature back. It took several hours, around 15 PC hangs and many deployments to get to this state.

Annoyingly it ended up being 6 lines of code.

The biggest issue was instantiating the PWM too early. I almost gave up as the Netduino would crash for no apparent reason after about 11 seconds. Eventually with trial an error I found that if I enabled PWM later in the startup, the Netduino didn't crash and stayed stable.

To modify the brightness, open Program.cs and find the following line towards the top of the file...

        const byte LcdBrighness = 100;

The default is 100.

Good luck. Please report any issues.

@m1dst m1dst closed this as completed Feb 18, 2018
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

2 participants