This doesn’t work for everybody but for me I use Raspbian with Desktop. And when I’m all done with getting everything working, and its a headless setup, I just set it to boot to command line to save resources. IMHO its almost as good as running the Lite version. You will use more space on your SD card, but with the cards i use I always have lots of free space anyway.
Cant use enviro+, due to lack of documentation on software requirements
PMS5003 and MiniGarden
Thanks both.
Alphanumeric: I couldn’t find it in those locations.
Shoe: This is the code I currently have, it comes from nopheads
EnviroPlusWeb.py app, where he has add fan speed control on GPIO 4. It was what I was running with the EnviroPlus board before I deconstructed the project to individual sensors. Which has been interesting!
from pms5003 import PMS5003, ReadTimeoutError as pmsReadTimeoutError pms5003 = PMS5003() # PMS5003 particulate sensor IO.setmode(IO.BCM) # Set pin numbering IO.setup(4,IO.OUT) # Fan controller on GPIO 4 pwm = IO.PWM(4,1000) # PWM frequency pwm.start(100) # Duty cycle
PMS5003 and MiniGarden
It was a bit of a shot in the dark, those two locations are where Pimoroni’s Plasma software stored config files. I figured it couldn’t hurt to look there.
HyperPixel 4.0 PIM475 HDMI adapter
thanks for the reply
I need the 4 inch square screen for my project.
Something like that?
Use Pirate Radio phat LCD as main display/ display other information
Hi,
I’m trying to use a pirate radio w/lcd as a main display for a pi zero w or alternately show custom information through it (via a web server or other application) but I’m unable to do so. Can anyone point me to information for doing so?
In addition, I’ve tried the examples pimoroni has published on github for the phat and they seem to fail due to the PIL library being missing.
Thanks
HyperPixel 4.0 PIM475 HDMI adapter
Thats for driving a display with a 40 pin ribbon cable. Not going to work with the Hyperpixel.
HyperPixel 4.0 PIM475 HDMI adapter
So I must invent a usb to 40 gpio pin adapter to make some money :) haha
Use Pirate Radio phat LCD as main display/ display other information
If your running Raspbian lite you’ll have to install PIL manually. I’ve forgotten how you do that at the moment.
Getting boot info on the display should be doable. Check out how Adafruit does it and you may be able to pull it off.
They have several small displays that connect via SPi, See if you find one that’s the same size and uses the same driver chip and library. Then go from there.
something like this
PMS5003 and MiniGarden
HyperPixel 4.0 PIM475 HDMI adapter
One way to do it would be to use a Pi that is capable of gadget mode. Then set it up to connect via USB as maybe a DisplayLink device. I think there is a thread on that topic on the Pi foundation forum. Seems to me to be a lot of work, not something I have the skills to pull off that’s for sure.
The Hyperpixel isn’t your standard Pi SPI Display, just so you know. It’s a very complex setup.
Use Pirate Radio phat LCD as main display/ display other information
Try running the following.
sudo apt-get update
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy
sudo apt-get install python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy
It’s what I ran for my 1.3" SPI Color LCD (240x240) Breakout, which I believe is the same display used on the Pirate radio boards.
Problem installing Enviro software on Pi zero
Ok…a quick follow up. So my second fresh start has worked much better.
TLDR: The Curl command method worked much better for me this time.
I did a fresh SD card image with full raspbian buster desktop install to a Pi Zero W.
I did an apt update and dist-upgrade.
I tried for the first time; the All-in-One Curl bash install command . Previously I used the git method.
The All-in-One curl command seems to have worked with very little editing of the examples scripts.
And I got the “weather-and-light.py” script to work this time around. However “python3 weather-and-light.py” works where “python weather-and-light.py” fails with a syntax error.
Thanks!
PMS5003 and MiniGarden
Yes, but first I’d simply try modifying your script to read;
pms5003 = PMS5003(pin_enable=x, pin_reset=y)
It’ll be safer and will avoid potential complications in the future.
Problem installing Enviro software on Pi zero
So last night I installed my Enviro PHAT on my Pi 4 and couldn’t get the LCD to work. After a fresh install of Raspbian and Enviro via the curl method everything works perfectly. I wonder if the script setup is borked by other software installs which modify packages.
PMS5003 and MiniGarden
Thanks I will try that. It will give me more flexibility if I ever want to back to the EnviroPlus.
Adjust Python examples
Back again for a bit, but no new insights. I end up with the error:
Traceback (most recent call last):
File "./clock.py", line 71, in <module>
unicornhatmini.write_string(
AttributeError: 'UnicornHATMini' object has no attribute 'write_string'
I copied the def write_string from the Scroll HAT Mini (ok to be precise it’s from the Scroll PHAT HD, afaik there is no library for the Scroll HAT Mini) its init.py, and copied into the Unicorn HAT Mini its init.py, rebooted the Pi but still get the same error. I also put the init.py in the same folder as the clock.py script, but it didn’t change anything. Any idea what could be the problem?
Adjust Python examples
For some reason the UnicornHATMini def of write_string doesn’t seem to be getting picked up, are you certain you replaced the init.py in the UnicornHATMini’s library folder? You might need to upload the code somewhere so we can take a poke through it.
Adjust Python examples
I double checked it and the def write_string is there. I changed it on the Pi itself, but now also on my copy of the repository so you can see how I did it: https://github.com/placebo83/unicornhatmini-python
Adjust Python examples
Ah, right, do you see line 161 which starts if __name__ == "__main__":
? That’s a function which checks if the module is being run as a script directly, and then does some fancy demo stuff. However, if you’re importing the module into another script that doesn’t ever get run, so your function isn’t ever declared.
Try moving the function to line 159ish, after the get_shape
function but before if __name__ == "__main__":
.
Adjust Python examples
I did as you told, first in my repository, then on the Pi, checked, rebooted, checked again but still the same problem :(
Luckily I just assembled my pan/tilt HAT and it’s working like a charm, so when I get frustrated with this I tinker a bit around with that one and a Sphero RVR