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

Feature Request: Expose LCD On and Off? #5

Open
Humancell opened this issue Jan 6, 2019 · 4 comments
Open

Feature Request: Expose LCD On and Off? #5

Humancell opened this issue Jan 6, 2019 · 4 comments

Comments

@Humancell
Copy link

When I looked at the i2clcd npm module, it has the ability to turn on and off the LCD backlight.

I was curious if you might consider exposing this ability to node-red, maybe adding a few new keywords like "on" and "off"?

@johnty
Copy link
Owner

johnty commented Jan 6, 2019 via email

@Humancell
Copy link
Author

I wrote the issue before looking at your code. It was too easy and straight forward ... and it works on my units!

I simply inserted the following lines, after your "init" if statement:

if (msg.topic.localeCompare("on") == 0) {
             lcd.on();
}

if (msg.topic.localeCompare("off") == 0) {
             lcd.off();
}

It works perfectly in Node-RED! I send the on/off commands and my backlight turns on and off!

@johnty
Copy link
Owner

johnty commented Jan 8, 2019

Great! This was exactly what didn't work for me so I never added it - probably due to my hardware.

Feel free to submit a pull request and I'll merge it in. Thanks!

@johnty
Copy link
Owner

johnty commented Jan 9, 2019

update: actually, looks like I was trying to use the setBacklight() function instead of just the on/off ones. the latter works fine. I'll push the updates.

Thanks again!

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