Wemos D1 with Wemos OLED shield and buttons.

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Wemos D1 with Wemos OLED shield and buttons.

#1 Post by mattlward » 06 Feb 2018, 19:45

I am trying to figure out how to use the buttons on the side of the display shield. I would like to either send and MQTT command with a button press or use one button to wake up the display on a nightstand sensor. Maybe even 1 button to turn wake the display and the other to set the screen contrast now that it is working in the dev branch.

Any ideas??? Hate to have 2 buttons that are not doing anything! :)

Thanks Matt

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos D1 with Wemos OLED shield and buttons.

#2 Post by TD-er » 06 Feb 2018, 20:06

Nice to see people are already using the contrast feature :)

The Oled Framed plugin does support some button. But I guess I could add a command to set the contrast (temporary, without storing it to flash).
Then you can call it from rules.

Are these buttons connected to some GPIO pins?
The you can use the switch plugin on them.

Domosapiens
Normal user
Posts: 307
Joined: 06 Nov 2016, 13:45

Re: Wemos D1 with Wemos OLED shield and buttons.

#3 Post by Domosapiens » 06 Feb 2018, 20:18

If you look here
https://wiki.wemos.cc/products:d1_mini_ ... led_shield
this document
https://wiki.wemos.cc/_media/products:d ... v2.0.0.pdf
Shows Key1 is default connected to D3 (GPIO0)
Key2 is default connected to D4 (GPIO2)
with the option to solder other connections (SJ3-SJ6 and SJ7,SJ9-SJ11)
30+ ESP units for production and test. Ranging from control of heating equipment, flow sensing, floor temp sensing, energy calculation, floor thermostat, water usage, to an interactive "fun box" for my grandson. Mainly Wemos D1.

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: Wemos D1 with Wemos OLED shield and buttons.

#4 Post by mattlward » 06 Feb 2018, 20:21

They can be attached to about any GPIO via a solder bridge! That would be so cool if you could do that. If it controls the contrast then it could control the on or off state of the display.

Relevant section of the board schematics:
Attachments
GPIO-display.jpg
GPIO-display.jpg (13.81 KiB) Viewed 7363 times

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: Wemos D1 with Wemos OLED shield and buttons.

#5 Post by mattlward » 09 Feb 2018, 21:51

How would one tie a gpio to contrast control on the led?

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: Wemos D1 with Wemos OLED shield and buttons.

#6 Post by mattlward » 09 Feb 2018, 22:38

That should have read, how would one tie gpio state changes to OLED contrast control?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos D1 with Wemos OLED shield and buttons.

#7 Post by grovkillen » 09 Feb 2018, 22:38

I would use a switch device per button and then use rules together with a dummy device to make the button control stuff.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: Wemos D1 with Wemos OLED shield and buttons.

#8 Post by mattlward » 09 Feb 2018, 22:40

Does that mean that the rules have access to control OLED contrast?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Wemos D1 with Wemos OLED shield and buttons.

#9 Post by grovkillen » 09 Feb 2018, 23:02

No, you're right. The contrast is not yet a command. Please open a issue on GitHub and we'll see what we can do.

Only "On", "Off" and "Clear" are being obeyed when calling this command: "OLEDFRAMEDCMD"
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Wemos D1 with Wemos OLED shield and buttons.

#10 Post by TD-er » 09 Feb 2018, 23:14

grovkillen wrote: 09 Feb 2018, 23:02 No, you're right. The contrast is not yet a command. Please open a issue on GitHub and we'll see what we can do.

Only "On", "Off" and "Clear" are being obeyed when calling this command: "OLEDFRAMEDCMD"
Any suggestions on syntax for such commands?
Please note them here: https://github.com/letscontrolit/ESPEasy/issues/839

mattlward
Normal user
Posts: 70
Joined: 24 Jan 2018, 15:20

Re: Wemos D1 with Wemos OLED shield and buttons.

#11 Post by mattlward » 10 Feb 2018, 00:46

Added comment to the Git thread.

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests