Go to advanced search

by neilgl
Sun Oct 17, 2021 4:39 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

I have an I2C oled display (ssd1306). This example script (from luma.oled github) python3 hello.py gave the "Hello World". Maybe you could change it to use SPI. ? hello.py: from luma.core.interface.serial import i2c, spi, pcf8574 from luma.core.interface.parallel import bitbang_6800 from l...
by neilgl
Sat Oct 16, 2021 4:32 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

Looks like it is how the demo scripts and libraries work. In demo_opts.py he reads the command line arguments using actual_args = sys.argv[1:] which gets a list of strings representing the arguments (as separated by spaces) on the command-line. You could write your own script Hello_World.py with fix...
by neilgl
Sat Oct 16, 2021 4:08 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

On his github https://github.com/rm-hull/luma.examples it has usage: demo.py [-h] [--config CONFIG] ….. so it might be python3 demo.py —config myconfig.txt In myconfig.txt we would put our parameters, probably like --display=capture --width=800 --height=8600 --interface=spi --spi-bus-speed=16000000 ...
by neilgl
Sat Oct 16, 2021 2:24 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

Ah, look at his github, as we said earlier, “you can put the command line arguments into a config file to save typing each time”
by neilgl
Sat Oct 16, 2021 10:51 am
Forum: Beginners
Topic: My RPi closes all my terminal after some time
Replies: 12
Views: 426

Re: My RPi closes all my terminal after some time

I thought we were going to direct output from the python script temperature.py to a file (with extra logging) not to /dev/null
by neilgl
Sat Oct 16, 2021 10:47 am
Forum: Automation, sensing and robotics
Topic: Some questions about automating plugs based on sensor data?
Replies: 6
Views: 302

Re: Some questions about automating plugs based on sensor data?

The fans are usually powered by an external power supply not the pi. The pi controls the fan using GPIO and a transistor to switch the fan on/off (or PWM). Search the forum for a fan control diagram from pcmanbob. To productionise stuff, I put several devices (pi or esp8266) around the house near to...
by neilgl
Fri Oct 15, 2021 10:33 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

I think they have (confusingly) for versatility coded their examples to take many command line parameters and given the option to have those in a “config file”. For “hello world” example I would have set the parameters in the python script, e.g. interface = “spi” rather then read it from arguments o...
by neilgl
Fri Oct 15, 2021 7:03 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

That looks like a massive improvement as it says

Code: Select all

Interface: spi
so you are on the right track.
Reboot the pi and run it again so we don’t get GPIO in use errors.
Also, earlier we had “…the one with the bouncing balls work”, what command was used ?
by neilgl
Fri Oct 15, 2021 5:21 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

What happens if you add the spi —interface spi option like in their example

Code: Select all

 python3 bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --gpio-data-command 9
by neilgl
Wed Oct 13, 2021 10:39 pm
Forum: General discussion
Topic: Advice on best GUI framework for home apps
Replies: 4
Views: 283

Re: Advice on best GUI framework for home apps

An easy way to do it is to have cheap esp8266 based devices (Wemos D1-mini) send temperature data (from DS18B20) over WiFi using mqtt to a raspberry pi (pi3+ in my case). This is on the Wifi in your house - no external network needed. I have 9 of those working now. For display I use openhab , then w...
by neilgl
Wed Oct 13, 2021 7:07 pm
Forum: Automation, sensing and robotics
Topic: Some questions about automating plugs based on sensor data?
Replies: 6
Views: 302

Re: Some questions about automating plugs based on sensor data?

Have a look at “smart” plugs you can get in your area that support Tasmota. Tasmota firmware (open source) has a WiFi access point, mqtt, timers etc. I am using that on several cheap Teckin “smart” sockets.
by neilgl
Wed Oct 13, 2021 2:34 pm
Forum: General discussion
Topic: Voltage sensor
Replies: 5
Views: 275

Re: Voltage sensor

What I do is use a cheap Arduino style board i.e. Wemos D1 mini (esp8266) that has an analogue input. It then reports the voltage over WiFi to a Raspberry pi, using mqtt . I scale the voltage being measured (14.5 V max) using a two resistor divider to match the input range of the ADC on the esp8266....
by neilgl
Wed Oct 13, 2021 1:03 pm
Forum: Beginners
Topic: Download Link for Folders in HTML [SOLVED]
Replies: 9
Views: 276

Re: Download Link for Folders in HTML

Probably using nginx?
by neilgl
Tue Oct 12, 2021 8:48 am
Forum: Beginners
Topic: My RPi closes all my terminal after some time
Replies: 12
Views: 426

Re: My RPi closes all my terminal after some time

Put some print statements into your python scripts that log an “I am running ok” with timestamp to their log files.
by neilgl
Mon Oct 11, 2021 10:23 am
Forum: Beginners
Topic: Send Image/Video to PC with Sockets
Replies: 2
Views: 110

Re: Send Image/Video to PC with Sockets

Is this a continuation of this Lepton3 camera post?: viewtopic.php?f=91&t=320634&p=1921472#p1921472
by neilgl
Sun Oct 10, 2021 11:25 pm
Forum: Graphics, sound and multimedia
Topic: New time-lapse software for the Raspberry Pi
Replies: 8
Views: 277

Re: New time-lapse software for the Raspberry Pi

Is it open source on github ?
by neilgl
Sun Oct 10, 2021 5:21 pm
Forum: General programming discussion
Topic: pi webserver
Replies: 3
Views: 358

Re: pi webserver

I also use telegraf in that setup.
by neilgl
Sun Oct 10, 2021 3:39 pm
Forum: General programming discussion
Topic: pi webserver
Replies: 3
Views: 358

Re: pi webserver

What I do is send temperature data from a remote microcontroller (esp8266) to the pi using mqtt over wifi. The pi stores that in a database (influxdb) and uses grafana on the pi to draw graphs of the data on web pages (pi runs apache2).
by neilgl
Sun Oct 10, 2021 3:26 pm
Forum: General discussion
Topic: HDMI output only sustained for several minutes
Replies: 1
Views: 112

Re: HDMI output only sustained for several minutes

Which software are you using for the Airplay ? (E.g. Shairport Sync or other ? )
by neilgl
Sun Oct 10, 2021 2:27 pm
Forum: Beginners
Topic: Run program at boot problem
Replies: 4
Views: 169

Re: Run program at boot problem

sudo crontab -e will edit the root user’s cron, crontab -e will edit the pi user’s cron (if logged in as pi which you will be). To check the log file, login as pi, open a terminal if needed, then cd kilnController then cat firing.log Strangely, on his github it says auto start using “sudo nano /etc...
by neilgl
Sun Oct 10, 2021 2:20 pm
Forum: General discussion
Topic: Setting up raspberry pi's network with a web page
Replies: 3
Views: 225

Re: Setting up raspberry pi's network with a web page

Yes, what the smart devices typically do is to start up their own WiFi access point with a web page that you connect to via a phone/iPad with Chrome/safari etc.That page allows you to connect the device to your home WiFi and hence the internet (if needed). A pi can do that by starting its own WiFi a...
by neilgl
Sat Oct 09, 2021 4:49 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

Their example terminal.py shows how to print text to the display.
Does that work?
If so, edit a copy of it to just print "Hello World".

Also looks like you can put the command line arguments into a config file to save typing each time.
by neilgl
Sat Oct 09, 2021 4:24 pm
Forum: Python
Topic: How to Print “Hello World” to This SPI OLED?
Replies: 25
Views: 690

Re: How to Print “Hello World” to This SPI OLED?

That link says you can use SPI with the examples in the luma.oled library: You can run an example like so: python3 bounce.py --display sh1106 --height 128 --rotate 2 --interface spi --gpio-data-command 9 (add --spi-device 0 for the back slot, or --spi-device 1 for the front slot) Does that work for ...
by neilgl
Sat Oct 09, 2021 11:43 am
Forum: Networking and servers
Topic: Wifi accesspoint "authentication problem" "password may be incorrect" from android
Replies: 1
Views: 117

Re: Wifi accesspoint "authentication problem" "password may be incorrect" from android

I would start with a fresh copy of RaspiOS Buster, then follow the official raspberry documentation.

Go to advanced search