bhiltz
Posts: 1
Joined: Sat Sep 07, 2019 3:50 am

Installing OLED screen for Pihole

Sat Sep 07, 2019 3:54 am

I followed a DIY guide on setting up a PiHole. I got that up and running and working flawless but I can not for the life of me get the OLED screen to work displaying the stats. I'm 100% new to linux and raspberry pi's so forgive me if this is not the proper place.

https://learn.adafruit.com/adafruit-pio ... y-pi/usage

Thats part of the guide I used. I don't understand how to create a file on the pihole with the code for the stats.py file.

pcmanbob
Posts: 7084
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Installing OLED screen for Pihole

Thu Sep 19, 2019 6:58 pm

Hi.

there are several ways .

1. at a command line on the pi enter " nano /home/pi/stats.py " then type the program in there.
2. at a command line on the pi enter " nano /home/pi/stats.py " then copy and paste the code in to the file.
3. simplest option is to use your desktop pc to download the file and then just upload it to your pi using winscp.

from web site you linked .

Image
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
neilgl
Posts: 1111
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Installing OLED screen for Pihole

Fri Sep 20, 2019 12:52 pm

Ah yes, their guide has login as pi (so that you are at a command prompt) then type in

Code: Select all

nano ~pi/stats.py
to edit the file stats.py. Note "nano" is a text editor. Or you can do what @pcmanbob said.
To save the file when you are in nano, press CTRL and O together, it asks you

Code: Select all

File Name to Write: /home/pi/stats.py
so press RETURN then it saves it. Press CTRL and X toether to exit nano.
Then type in

Code: Select all

ls -lh
to see your files, including stats.py

Return to “General programming discussion”