0

PiOLED for Mini AdBlocker noob question
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: PiOLED for Mini AdBlocker noob question

by millercommamatt on Fri Sep 13, 2019 1:48 pm

You can't change the brightness, but setting the display to turn on/off at given intervals or during certain hours wouldn't be hard.

millercommamatt
 
Posts: 427
Joined: Tue Jul 31, 2018 4:57 pm

Re: PiOLED for Mini AdBlocker noob question

by adafruit_support_carter on Fri Sep 13, 2019 3:30 pm

Easiest would probably be to have the program only display the information for X amount of time and then go blank. And then use cron to run it at some regular intervals (larger than X).

adafruit_support_carter
 
Posts: 12991
Joined: Tue Nov 29, 2016 2:45 pm

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Fri Sep 13, 2019 6:54 pm

What script should I put and where should I put it? Would you point me to any tutorial or document on how to do it?

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Re: PiOLED for Mini AdBlocker noob question

by adafruit_support_carter on Fri Sep 13, 2019 7:36 pm

Actually there's probably an even easier way by just adding some blanking to the script. I've made a PR for this:
https://github.com/adafruit/Adafruit_Le ... s/pull/840

adafruit_support_carter
 
Posts: 12991
Joined: Tue Nov 29, 2016 2:45 pm

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Fri Sep 13, 2019 8:11 pm

adafruit_support_carter wrote:Actually there's probably an even easier way by just adding some blanking to the script. I've made a PR for this:
https://github.com/adafruit/Adafruit_Le ... s/pull/840

Thank you, I will check this out when I return from holiday after 3 days. I will let you know how it goes.

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Re: PiOLED for Mini AdBlocker noob question

by adafruit_support_carter on Fri Sep 13, 2019 9:46 pm

The PR has been merged. The change is very simple. It just shows the info for 10 seconds then blanks the screen for 50 seconds and repeats. You can get the updated stats.py from the repo link above or from the guide, which has also been updated.

adafruit_support_carter
 
Posts: 12991
Joined: Tue Nov 29, 2016 2:45 pm

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Fri Sep 13, 2019 10:49 pm

Will do, thank you. Will update you once I get it done.

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Mon Sep 16, 2019 3:55 am

adafruit_support_carter wrote:The PR has been merged. The change is very simple. It just shows the info for 10 seconds then blanks the screen for 50 seconds and repeats. You can get the updated stats.py from the repo link above or from the guide, which has also been updated.

I just checked the link you gave, I wanted to know if I just open stats.py and edit it with the script? Or is there another way to type a command via ssh to download and update the stats.py automatically.

Thank you

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Re: PiOLED for Mini AdBlocker noob question

by adafruit_support_carter on Mon Sep 16, 2019 11:50 am

You can just edit the file you have if you want, since the changes are minimal. There are others ways. How did you originally get the file?

adafruit_support_carter
 
Posts: 12991
Joined: Tue Nov 29, 2016 2:45 pm

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Mon Sep 16, 2019 9:08 pm

I think i created it during the PiOLED setup. It said I need to make one by inputting the command nano ~pi/stats.py.

If I wanted to edit the stats.py file do I just use the same command?

If I wanted to just download and overwrite the file from the link you gave previously what command do I put?

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Re: PiOLED for Mini AdBlocker noob question

by aphexx0407 on Mon Sep 16, 2019 10:33 pm

Update:

I went ahead and updated stats.py using command sudo nano ~pi/stats.py

I deleted everything and copy/paste the updated script and saved it. Now the screen cycles On and OFF which I reckon will prevent screen burns. The stats on the screen still updates real time.

This sorts out pretty much all my queries.

I want to thank everyone who replied to my post

Thank you.

aphexx0407
 
Posts: 30
Joined: Tue Sep 10, 2019 1:41 am

Please be positive and constructive with your questions and comments.


cron