#help-with-linux-sbcs
1 messages · Page 5 of 1
the manual file and firstrun may have clobbered each other the way I did it
I didn't delete it
not sure if firstrun will trigger on a second boot
That's why I'm reimaging again
ah. then nvm. 🙂
Already 80% done
(just for record - been using 32bit lite, only img handy)
Ok I guess I'm doing everything manually.
Reimaging again.
With no config.
So all of this is caused by the new imager options?
deep sigh
also
(╯°□°)╯︵ ┻━┻
@steady rose It finally booted.
I need to dig up a wired mouse. But it's booted properly.
And connected to the WiFi.
what was fix?
no config from imager, and manually set up WiFi and SSH
Going through set up now.
yah. it's weird. there is this option, which does add scan_ssid=1 in the firstrun.sh script.
but looking at /etc/wpa_supplicant/wpa_supplicant.conf after booting, it's not in there.
uff.
is your ssid hidden?
yes
so there's something broken between firstrun.sh and the actual /etc/wpa_supplicant/wpa_supplicant.conf that gets generated
I'm kinda surprised a bad wpa_supplicant.conf would break the boot
the older manual approach still works though
seems like the general location
it's something after that
I imagine the breaking change must have happened recently. I upgraded my Pi 3B+ to the latest Raspbian back in September and didn’t have issues.
Though… to be fair my Pi are hooked up to Ethernet so maybe it existed then too
Now to see if it reboots again.
waits patiently... light is on, but nothing on display
Unplugged Pi and plugged back in, I am now booted.
Occasionally I crack myself up because of my dyslexia. I read “waits patiently” as “paits watiently”
Thank you so much for sticking with me through all of this, folks.
@lost wolf FYI -- I took a new raspberry pi zero 2w an imaged (Raspberry Pi Imager 1.7.3) the default 32bit desktop OS to it with WiFI setup (SSID password and country=US) and ssh enabled -- also set locale -- I left it named raspberrypi.local for this test. It took several minutes to boot but eventually responded to ping raspberrypi.local -- I then used ssh to log in -- ran sudo rasp-config -- set the Headless Screen resolution (under Display ) to 1600x1200 and then enabled VNC (in Interfaces) then rebooted. I was then able to use VNC from my Mac to bring up the full desktop. No monitor, no keyboard, no mouse.
Trying now with 64bit desktop...
64bit OS is not working for me - reverting to 32bit OS
@ruby night hidden ssid on your network?
yah. "should". it's been about a year-ish? since it was taken out of beta.
https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/
I've used it a lot, but maybe not on a 2W yet. Don't recall.
I use the above sequence regularly to set up new Pi's.
Although, I often just install "lite" without the GUI so only need SSH access but I have done a few with the full Desktop.
hmmm -- The first time I set up the zero2w I had the hostname as raspberrypi.local. I have tried a few more times with a different hostname and it is not working -- My Mac is unable to ping it I wonder if there is an issue with the network seeing the board after it's name has been changed. Investigating....
ah yes -- I can ping it by IP address, but not by its "new name"
that appears to be the issue. Now retrying the 64 bit desktop
i'm seeing same as yesterday. the wpa_sup that shows up in /etc after booting is different than what the firstrun.sh script should have generated
(32 bit lite)
64bit OK too -- as long as don't change the name!
my ssid is hidden, so the missing line is critical
But kattni’s ssid wasn’t hidden, was it?
macOS seems to have some pretty aggressive dns/mdns caching
I seem to be OK now -- 64bit OS configured the same way as above. It just got confused when I was changing the hostanme.
Fortunately, I was able to get the IP address and use it to connect. Also cleaning up my knownhosts file seemed to help. In any case I now have the desktop on a 64bit desktop on the 2w via VNC.
and it now responds to its "proper" hostname....
I’ve had issues with Pi host and shenanigans — I’ve got one that I can ping by host name from Mac, Windows, RaspPi OS, Ubuntu… but not from Mint
Quick ping (sorry for breaking the flow @ruby night ) - is there anyone experienced in ModemManager/NetworkManager lurking in the channel? Ping me if so! I’ve got a modem that mmcli is fine with but nmcli refuses to setup (tells me the modem doesn’t support IPv4 which is just weird!)
Funny thing is it’s only nmcli on ttyS0 not working; nmcli on usb is ok; ppp on ttyS0 and usb are fine..
If your interested I posted here the details : https://askubuntu.com/questions/1452805/network-manager-cellular-connection-over-serial (not sure why it got a downvote though!)
Thank you Jerry. We figured it out. Something's wonky with the WiFi set up when you use the auto-config feature in the Raspberry Pi Imager software. I removed all of the config, and did it manually, and everything was fine.
Glad you got it working -- I have not had any issues with the auto-config but it's good that you found a workaround.
Carter figured it out after carefully eliminating variables. The auto-config doesn't add the scan_ssid=1 line in wpa_supplicant.conf (or whatever the actual line is). And without it, it won't connect to WiFi, and in both Carter's and my case, won't even boot. No idea why. But that's what it was.
I'm still salty about losing 4 hours to this wonkiness. But it is what it is, and it seems to be working fine now.
Also my plant is still about where it was in terms of blooming, so I think I'm still ok for the project.
Hmm. Without a "print screen" key on the RPi keyboard, is there any other shortcut to get a screenshot on Raspbian? Or do I need to go through the menus every time?
https://www.deviceplus.com/raspberry-pi/the-ultimate-guide-to-taking-screenshots-on-a-raspberry-pi/ maybe "scrot"
Hmm.
FN+back on the Logitech K400 keyboard is print screen and it works!
Whew. I really wasn't sure how to use a command line screenshot creator with how I wanted to get these shots
Good to know -- I have a few K400s
Do Raspberry PIs automatically update themselves, or will I need to make a new SD card with a new OS image on it? Reason I ask is that the U.S. senate passed the bill making DST permanent. That'll mean everything in the house will need to learn the new rules, including the RPi I'm using as the brains for our bedside alarm clock.
You have to do the update command
OK, thanks. That'll be a no-brainer via ssh.
Yeah do you you also need the commands
Thanks - it would help to know exactly what I need to type
It's not law yet though
You can find more details online with a search, but the command to update the raspberry pi is: sudo apt update
I know, I'm just preparing for the event it does happen. Plus it's probably not a bad idea to keep the Pi up to date anyway, DST changes notwithstanding.
Yeah and what's the chances the house passes it into law the same month it's supposed to come into effect leaving everyone scrambling to update systems 🤣
You're right. I can see it coming now.
Shouldn't NTP just keep the time properly updated anyway?
I assume that would keep GMT, but I don't know if it concerns itself with local time, time zones, etc.
Yeah, I think any timezone/locale stuff is done locally based on the GMT time received via NTP
@gentle briar ta-daaa - after a good rummage in the parts drawers (boy did i find some fun stuff!) but look what showed up
(ignore the recently deposited cat hair on my desk mat) - that should be a good selection to test the serial ports
Reality check, please. Using the Raspberry Pi HQ Camera on the Pi Zero is evidently (obviously) slower to react than with a full-sized Pi. I'm planning on doing a relatively long term time lapse with probably 6-8 hours minimum between photos. I'm running a Pi Zero 2 W, which isn't what this article used for testing, so it might be a bit faster than they're suggesting. But with my plans for it, I don't think it matters? (I want to make sure there's not some obvious thing I'm missing here.)
It seems to me it should Just Work, but we all know how that sometimes goes.
OMG..... yes...... says the person who spent 4 hours on Monday trying to get the stupid thing to even boot because of a problem in the Imager software.......
By all indications it will work, but I guess I'm asking if I'm right in thinking the slowness won't matter with long-delay timelapse photos.
I remember reading along with that and wondering what was going on. I'd had good luck with the imager recently, so I'm glad I wasn't using that version!
I'd probably turn the camera off between frames, but I suspect it's not necessary.
Ahhh yeah, that's mentioned in the software documentation, that it stays enabled, and draws quite a bit of energy. But, their concern was if you're running off of batteries.
There's easy code to make it turn off though.
i'd think any pi would generally work OK for that
No reason not to include it.
As long as it has a camera connector apparently.
I second guessed it for a second when I thought about it too much.
So here I am asking.
the camera software has also changed fairly recently. if article is more than a year or to old, it may be referencing an older way.
how are you planning on taking the photos?
April 30, 2020.
Um.... what do you mean by "how"?
Using the picamera library, with a Pi Zero 2 W, and the HQ camera module with a 6mm wideangle lens on it.
Or do you mean something different?
nope. thats it. meant software.
have you tried a basic photo capture yet?
Already has timelapse examples, and apparently is really easy to work with.
Using libcamera or whatever it's called?
Yes
I did their basic command and it came up
But not on the Zero
I didn't have the cable yet.
I have it now, but I haven't transplanted everything yet.
a basic capture via picamera...not sure that's been updated to work with how latest pi OS's are interfacing with camera
one sec...there's a blog post from rpi that has some deets...
I haven't used picamera yet, no
I used the built-in thing to preview the camera for focusing purposes.
I'll get everything moved to the Zero 2 W, get picamera installed, and see what we get.
libcamera isn't picamera
libcamera is RPi
picamera is 3rd party
right. but picamera doesn't use libcamera.
libcamera is all I've used so far
what picamera was based on has changed
Hmm ok
In due course we expect to provide additional libcamera-based versions of raspistill, raspivid and PiCamera – so stay tuned!
I've been reading their current documentation, so all the info I have on it is current. I wasn't thinking about what it was based on though.
Ah ok
I misread that sentence when I looked at it in Firefox.
but even that article is from 2020
Yeah.
libcamera isn't mentioned anywhere in their docs. But I don't see anything about what it is based on anyway, so it might simply not get into it.
picamera is apparently on point, according to Liz. She's used it before, evidently.
I didn't even know about it until she mentioned it.
oh yah. it is (was?) great. i used it also in a time lapse project.
Oh nice.
I got all panicked about getting this up and running because it looked like my plant was starting to bloom, but I think it's not actually there yet. So this project guide might be postponed until there are more interesting changes to photograph. Still want to start it soon, because there's no way to know when it will bloom (according to the internet). Which, also, it might have already bloomed, in which case this is less useful. I'm completely new to these plants, so I'm trying to glean what I can.
Interesting.
Of course the documentation is a PDF, and not ReadTheDocs or something else more dynamic. 🙄
Oof. Timelapse is nowhere to be found. I wonder if the same code works with v2beta as v1.13 or whatever picamera is at.
Only one way to find out, I guess 😄
with the interval being on the order of hours, could use other options that just call libcamera-still
Might do.
in terms of general work flow - initially just capture a bunch of still images. then post process for the timelapse.
Oh for sure.
I'm not planning on doing that as it goes.
They'll be put together once I have the photos I want.
Also, picamera2 is already installed, evidently. Simply needs updating.
Given that picamera is built on MMAL, and that MMAL is now considered a "legacy" interface with all exciting future development going into libcamera, I'd say it's wise that people consider picamera "legacy" too.
What are you waiting to bloom?
Tillandsia stricta
Ohhh
I guessed wrong (Schlumbergera bridgesii)
Sigh. HDMI not showing up now after swapping out the Zero 2 W. At least the power/activity LED is blinky and remaining on. So I assume it's booting. Swapping to the tiny simple display again to see if it works there.
I don't even have the energy for a table flip. Splash screen shows on both displays, then no signal. Pi is powered and doing things according to the LED.
Did going between two Pis bork it somehow?
Worked fine a half hour ago on the other Pi.
(╯°□°)╯︵ ┻━┻
There, I got ya
🤓
Reimage from scratch worked!
I wonder if there's some confounding variable here. Like perhaps every time you unseat and reseat the HDMI adapter there's a chance it either works or doesn't?
Although the whole not showing up on the router's connected devices list is an interesting data point as well
I think you answered this earlier but a quick search didn't turn it up: how are you powering this again?
In my experience... Sometimes Pi is just weird. I've had issues that occured on a fresh install, but reflash it would work. Sometimes I'd clone a good install, wouldn't work; second clone would work without changes.
i have been testing a lot of things lately (esp with networking and serial) and have found that small changes can make the Pi unstable so it boot loops or kernel panics a few seconds after login... (running headless over ssh)
Everything is happy now. Powering from a wall USB plug.
I was wondering this as well but reseating it multiple times did not fix it, and remember too, the splash screen showed up. So HDMI was working, but the OS GUI wasn't displaying.
Oops meant to replay to your first message with that one.
It is showing up on our router now. 🙂
Eventually HDMI won't matter as much because it won't be connected to a display for the timelapse project itself. But until I have it working, I prefer to work in the GUI.
How to install java 17?
I have troubles with that. Although running installer commands aimlessly, I only get nothing
There's only 3 java versions in alternative list and they all not 17
pi@raspberry:~ $ echo $JAVA_HOME
/opt/jdk17
pi@raspberry:~ $ java -version
openjdk version "11.0.16" 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb10u1)
OpenJDK Server VM (build 11.0.16+8-post-Debian-1deb10u1, mixed mode, sharing)
I might not know what I am doing, but I am sure there's something is wrong in a way that would prevent me from running JRE 17
Also... It's more of a multi-board computer running x86 architecture
my list of choice looks like this, maybe I am just looking in the wrong direction
pi@raspberry:~/server $ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/java-11-openjdk-i386/bin/java 1111 auto mode
1 /usr/lib/jvm/java-11-openjdk-i386/bin/java 1111 manual mode
2 /usr/lib/jvm/jre1.8.0_291/bin/java 1 manual mode
Press <enter> to keep the current choice[*], or type selection number:
And also I am running on debian 10
If you install Java through apt, you can probably use update alternatives. Since you installed to /opt I assume you used an installer. Otherwise I believe you may need to add $JAVA_HOME/bin to the path?
Does ls $JAVA_HOME succeed?
Debian 10 may be too old to have Java 17 as a package
Maybe that's the case
Hello, I'm trying to SSH into my raspberry pi via MacOS and I encountered this issue:
Does anyone know how I can resolve this?
Have you done ssh before?
Yes
I reimaged the SD card and that was the resulting issue
That would make sense why the key has changed
Do as the instructions say and add the new key to the file
Everything after the colon?
What does the file look like? It should show how the key is formatted
I'm kinda making educated guesses here because I'm not too familiar with how to configure ssh
this message simply means that the device is not exactly the same as it was the last time you SSH'd into it (because of the re-image), so you just tell SSH that you still trust it, and that you know it is not a man-in-the-middle (or some other type of) attack
and if you logged using a key instead of user/password, you'd need to configure that again
I did set use password authentication
you can see the current key there, you'd need to add it to the known_hosts file (whose path was also shown in the warning)
you maybe need to remove the old key too, i dont remember
Okay, it just looks like gibberish to me haha
Not sure what to delete and what to keep
nano /Users/blakeshaekos/.ssh/known_hosts (or open that file with your favorite editor)
on line 2, there should be the old key (as :2 in the warning message indicates)
so, you get that line, remove the old key and replace it with the new one (SHA256:... on the photo you posted)
and next time, it is easier for people helping to "write" this kind of stuff if you send text over an image (markdown-formatted if i can also ask for that :p)
copy-paste over transcribing
im pretty sure you could also remove the whole line and when you try and log on the Raspberry, SSH will ask you whether you trust in the device
Thank you! I successfully SSH'd into the raspberry pi
I appreciate the suggestion on sending the text instead of an image
I'll make note for the future
Hello,
I have a PI zero connected to a 7” HDMI LCD screen (https://www.uctronics.com/display/uctro ... river.html).
I have the terminal only OS and updated/upgraded it.
I have managed to adjust resolution and rotation (portrait mode 3) in terminal but when I launch Pygame, the screen is not rotated and display.list_modes() return only landscape resolutions….
I have tried many things in config.txt, in fb.modes and also tried to add the following environment variable SDL_VIDEO_FBCON_ROTATION=CCW as I have read it may be linked to SDL wrapper.
But nothing works…
Thanks!
i want to ask about a python module that i am trying to install on my raspberry pi buster OS, i've tried to install 2 modules, sftp and paramiko, both of them are giving the same error of
error: can't find Rust compiler
i've installed the rust compiler already
Cargo is also working
- i have no idea about them, so i googled for "pypi <insert each library name>"
- found on its PyPI docs that
paramikorelies on another library namedcryptographywich uses C and Rust extensions, so it would be the one causing trouble - https://www.paramiko.org/installing.html their installation guide (also found on PyPI) seems to cover everything you may need, have you followed it?
Hello, What is the best approach for multi-video playback on Raspberry Pi? I have found options for both Pygame and VLC. I need to be able to crossfade several videos based on button inputs from a user . I did find a blend of both approaches here: https://gist.github.com/smathot/1521059
I don't have much experience with python, but I wonder if this is somehow related to the way Rust was installed. If rust was installed to a local user's directory, the install directory may be added to the PATH environment variable in that user's .bashrc or something similar. Perhaps that environment variable isn't getting set when you run the python installer for any variety of reasons
Hey all, has anyone had any success serving the CP web workflow through a reverse proxy?
I have 2 pico w that I want to be able to access from outside LAN, I have a raspberry pi that I can ssh from outside, but I can't make nginx serve the web workflow assets
Admittedly, this is more of an nginx problem, but someone might have already experienced it here 😅
I've been meaning to get into nginx reverse proxying for a few years</story>
It looks like there are two stages involved, first having nginx serve on the local LAN, does that work? Then propagating the local LAN port (presumably port 80?) through the proxy (presumably on a different port than SSH?).
Hey, I actually had success with serving the home page of the web workflow, but then it can't find the js and css files 😅
I think it's an nginx config error on my part. but I can't seem to figure it out
when setting up NGINX i had some problems with relative/global paths on my files cuz i was mapping to my_ip/server1 and my_ip/server2 URLs, hope that makes any sense 🙃
not that i can say much without seeing your hrefs in the HTML and/or NGINX's conf
and i have 0 idea about the web workflow
I think this is exactly the problem. It tries to request the static files from the root path, but that isn't mapped to the proxy pass. Unfortunately, I don't think it's possible to change the hrefs in the Pico workflow so I need to fix in on the nginx side
I dont have any Internet + CircuitPython device to test, but i would expect the workflow to be somewhat easy to change (even if it requires custom compiling and not just an attribute on some func)
that would require a custom build indeed
I will send you my NGINX config file (and Flask config related to proxy) once I get home, i have a NGINX container and <elpekenin.dev/40dex> maps to a Flask-based container while any other route gets mapped to some static files
This might be a good improvement on the web workflow, imo. I might give a shot on submitting a PR for this 😀
Copy, thank you very much!
a PR doing what though ?
I'm thinking adding a settings.toml key?
Would that be a good approach?
Like CIRCUITPY_WEB_API_PATH_PREFIX
adding code to handle a very unique edge case ? Can't you redirect IPs or subdomains instead, so that you are on the root path ?
or ports actually, that's quite common
Hmm, I'll look into it. I've actually not exhausted all the possible options yet. I just thought it might be a good improvement on the web workflow. Apologies if I jumped the gun 😅
And looking into it, circuitpython is written in C so I'm not the best guy to do this 😅
also the web workflow serves static html files, so changing paths inside of it, even if only a <base ...> tag would be much more work than is worth
but a NAS or proxy should be able to redirect an outside port to a local IP, and there is a config to change the web workflow port, so you could map to the same port
Copy, thanks @tired marsh !
cant say i remember why/how i did it, but this seems to be the Flask's configuration i needed for it to work behind a proxy with an extra path: https://github.com/elpekenin/docker-40dex-web/blob/main/main.py#L50-L56
the web workflow probably has nothing similar, tho 🙃
traffic splitting is made with ```
location /40dex/ {
if ( $remote_addr = <MY_IP>) { # disable logging so i dont spam logs when testing stuff
access_log off;
}
proxy_pass http://40dex-web:5000/40dex/; # container with Flask
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
if ( $remote_addr = <MY_IP>) {
access_log off;
}
proxy_pass http://main-web:5000; # another container with Flask, serving static files
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
What browser(s) are folks using on RPi, specifically RPi Zero 2 W. Because the built in one is crashing this Pi every time, with nothing else going on. Installed Midori, but the search took 3 minutes to come up, or longer.
It's using WiFi also.
So maybe this isn't a bug.
I don’t have a Zero 2 W, but I usually use the default browser (Chromium?)
Yeah it's Chromium. And it's crashing my whole Pi every time I open it.
Everything is up to date.
Midori is at least doing things. Chromium never fully loads.
Strange… I did have an issue with a Pi once crashing when opening anything, reflashed and all was well
I'm not reflashing this, lol. It took me about 20 times to get it to work in the first place 😄
Oof…
I'm going to go at this a different way, and download the PDF on my Mac, and drop it on the Pi.
Stupid workaround, but uff.
Sounds like the best option for your current situation
Indeed.
Pi life is hard…
At least it isn't only me.
Yeah, they’re just finnicky
you could mount the Pi's filesystem on your Mac, so that you can download(or any other operation) directly on it without SSH/SCP (maybe you meant that)... no idea how hard it would be to configure tho
I used netatalk, and it is super simple. 🙂
I had quite a time installing the Python cryptography library on a Pi Zero, even with the help of piwheel. I was going to ask here, but first tried the scattershot approach of several of the suggestions on the web. Individually, they didn't work, but collectively, they finally did.
I use chromium but have to turn off the hardware acceleration, especially for the Adafruit sites.
Hmm fair enough.
Hello, no one has any clue to this? It regarding hdmi lcd screen rotation issues with Pygame #help-with-linux-sbcs message
@steady rose I ended up going with the picamera2 beta, and it's working great. Was having a weird issue with displaying the image preview, but found a completely unrelated issue filed on the repo, that mentioned enabling "Glamor" video in raspi-config. Though they said it was only necessary on Pi 3 and older or something, but I tried it since I'm running Pi Zero 2 W, and that resolved the issue. Will document that, obvs.
Today I discovered zram and my mind is blown.
Who knew you could download ram. Lol.
I'm still pondering the uses of zram
It’s kinda magical in situations where ram is limited and non upgradable. Certainly faster than swapping to disk.
But you’re right. It still does not make dinner or put the kids to bed, but it’s a start.
No but you can use it to help model a world where the kids are put to bed and you have a baked potato.
Now I really want a baked potato.
Same. I miss the loaded baked potatoes my HS had.
Reminds me of RAM Doubler.
Hah. Me too! With some sysctl tweaks it works remarkably well. I couldn’t get the pi to OOM doing any of the things that would normally make it swap and oom and slow to a crawl.
I once built a 128k bubble memory expansion board for a CoCo following instructions in a magazine and modified to work on my Dragon 64. Bubble memory - much vaunted, died a death.
The best thing I remember for pretending there was more "computer" was Desqview for DOS. Still needed more real RAM though
Zram is interesting though (used in MacOS?)
I once built a 4B core memory expansion board for an Arduino. Core memory – much vaunted, died a death.
When the phone rang (with modem ready to answer) I'd hotkey out of Desqview session to the session on the same machine running the BBS. Didn't always transfer nicely, but it was a way to work on the BBS while having it on tap for callers. ;)
Once Linux became a thing for me (1994) that all changed (of course) but by then BBS's were in the decline.
Fond memories of Desqview. Given what it was running on, it did a remarkably good job. IIRC there was a companion XMS/EMS memory manager that came with it. Mind you, I started on a 386 in 1991 with 4mb of memory, so DV was really able to strut its stuff.
And @faint sparrow, I have just one thing to say to you: 1:125/28
;)
It kinda looks like I stepped up for Echomail coordinator by the evidence, but I have no memory of that. Maybe there was a status for 'no public BBS (anymore)' I would have used by then. ;) EDIT Yup, there was Private and Unpublished.
I do remember sussing out a modem getty in Linux but I don't remember when that was.
80386-DX33 here, 1991 or 1992 -- yup. 4mb. Ran Linux without X11 (built kernel at shell prompt). X11 would basically start and navigate but way too slow to use all the time.
Since I didn't have Linux before 1994 that means I ran that same machine for a few years, anyway.
I was running RTU on a Masscomp 5400, later moved to SunOS on a SparcStation 1+
I have the bonnet for rgb matrix and I have performed the PWM solder mod to reduce flickering. Worked great, then after a reboot it no longer worked. The screen didn't turn on. After testing with some of the sample images I found that leaving the pwm parameter off the --led-gpio-mapping-adafruithat worked. Rechecked and touched up my solders but still joy. Any ideas?
so about clustering a bunch of different sbcs...
I have a few different nanopi models, and a few different raspi models all hooked up to the same dumb switch.
desired endstate is a computing cluster running stablediffusion, all controlled by a pi4 running raspbian bullseye
the head node should still connect to my home wifi, but i want it serving DHCP addresses over eth0, which is connected to the dumb switch. but no matter what guide i follow or what service i try to use, nothing works. The pis that get plugged always have the link local 169.* ip address
quick shout out - has anyone used the PiTFT (specifically PiTFT 2.8" - Capacitive Touch https://www.adafruit.com/product/2423) with a Pi 400?
i have had this screen for years and used it with a Pi 3 and don't remember having any issues. I've dusted it off to use with a Cyberdeck HAT for Pi 400 (https://www.adafruit.com/product/4863) but can not get it to work with FBCP (haven't tried anything else yet); Have used the Pi OS image from May 28 2021 as advised here : https://learn.adafruit.com/adafruit-2-8-pitft-capacitive-touch/easy-install-2 - followed all the instructions, but it just won't come up; it's just a white screen...
I will pull the Pi 3 back out and see how it goes, but if anyone can short cut my troubleshooting that would be great!
ok, i didn't get the PiTFT to work (a project for another day) .. but I did get my Hyperpixel working (since I didn't get a Spotify CarThing, I am building my own)... and ... wow! that is a really nice screen!
I am using the Pi 400 for now as I have in front of me most of the time; I am working on the 3D printed case and it will pair with a Pi Zero2 W in the end
adding a rotary encoder... just need to get the code to work!
does the raspberry pi zero 2 w have a power input pins
short answer, yes! long answer though is the pinouts are here: https://www.raspberrypi.com/documentation/computers/raspberry-pi.html as well as the general documentation on voltages and powering by the header; you can also refer to the schematics here https://datasheets.raspberrypi.com/rpizero2/raspberry-pi-zero-2-w-reduced-schematics.pdf - note the 5V header is on one side of the regulator, the 3V3 pin is on the other. So it's easier to power by 5V
you can also read a bit more here: https://thepihut.com/blogs/raspberry-pi-tutorials/how-do-i-power-my-raspberry-pi
At The Pi Hut we offer a range of different micro-development boards, which all require slightly different power sources! Some are very stringent in their required input; for example, the latest Raspberry Pi recommends 5V @ 2A as a minimum for stability, but some are more flexible, the Arduino can accept a range of vol
Anyone know why on RPi, setting hdmi_enable_4kp60=1 would cause gpu_freq=750 overclock to be ignored and set to 550mhz instead (which is what hdmi_enable_4kp60 does)? I'm pretty sure this used to work as expected -- did something change in firmware maybe?
Individually setting each of the values gpu_freq sets resolves the issue, I guess. 🤷♀️
It's System On Chip (SoC) so if they control the design of both they don't have to be externally consistent with pretty much any idea at all. ;)
seems that way. 🤷♀️
The video support section, in the RPi3 (and RPi4) kernel variants, is highly unusual for people (like me) used to amd64 implementations.
I do use, iirc, Ctrl+Alt+F1 (or F2, F3 .. iirc) to get to the text based Linux Virtual Console there.
For within the GUI I use Ctrl+Alt+<arrow> there, with left or right being the two relevant arrow (cursor movement) keys. With fluxbox (or its equivalent; there are a few of them now, I believe) as the Window Manager. idk what the default one is called there.
That's how I switch (left or right) to the adjacent 'Workspace' .. which is probably present (if not supported) in all of them (in any Window Manager at all).
The majority of my workspaces all have an identical font and size xterm (terminal) and I have a script that places them exactly the same place, so that task switching in this way causes no slight shift in the windows' frames locations.
#!/bin/sh
sleep 3; xdotool getactivewindow windowmove 8 74
('xdotool' itself is not present without asking for it; idr if Raspbian (or the latest) offers it.)
/var/lib/dpkg/info/xdotool.list
Not for use with a Pi 400, but I just setup my PiTFT 2.8" Capacitive Touch yesterday after quite a delay and my old process for doing so wouldn't work anymore (deprecated on github) but I followed the below link:
https://learn.adafruit.com/adafruit-pitft-3-dot-5-touch-screen-for-raspberry-pi/easy-install-2
I effectively loaded a fresh Raspberry Pi Lite OS install, then did the following:
'cd ~
sudo apt-get update
sudo apt-get install -y git python3-pip
sudo pip3 install --upgrade adafruit-python-shell click
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
cd Raspberry-Pi-Installer-Scripts'
Followed by:
'sudo python3 adafruit-pitft.py --display=28c --rotation=90 --install-type=console'
Hey! Thanks ☺️
Sadly i did that (on a pi 3 and pi 400) with no improvement 😦
oh dear, I'm sorry, was really hoping it would be helpful
just showing a white screen?
No worries, I was too! Appreciate you thinking of me and coming back with what you found, though
Sadly yes, I wrote a (very long) post on the forum here https://forums.adafruit.com/viewtopic.php?t=199014 and just saw support answered 😀
“You may be seeing a Pin 18 conflict. Try this fix: <url that a discord bot is getting grumpy about!>
Indeed! But a fix to try 😃
Oh… options 1: cut a trace … option 2 remove the diode … not what I had in mind … funny that post talks about hyperpixel displays and I have one of those as well and it works perfectly!
(Posted about this earlier - such a gorgeous screen) and is it just me, but does Adam Jones look like chewbacca?
Yeah, removing diodes or cutting a trace don't sound appealing at all, but if the issue persists on a Pi3 and a Pi400 it may necessary, though I'd try and retry configs quite a few times before going that route
I was going to note the fantastic choice in music, love how Maynard always hides in promos
Yes. Spotify was in an excellent mood when I was building that! Yes, my thoughts exactly - I didn’t use the cyberdeck on my Pi 3… but some new things to test
@mortal hare
heh. cute.
firing up a Pi 3 - using my Lego NES case for food luck...
is there any way to create image of current os and the things installed on it? (OFC yes) I search online and found this can I trust the guy answered, or is there a better way?
https://raspberrypi.stackexchange.com/a/116816
Context: I have mainsail os (rasbian based 3d printing os) and instaled a wifi driver and do some stuff with it to work with wpa_supplicant. I want to back it up just incase I forgot how to do them later.
It's just making a compressed filesystem image, not too much special about that. I'd use a bigger block size for more speed, but it would work the way it is.
Can you ballpark a block size?
And thank you
I'll normally use 32k, 64k, or even 1M blocks, depending on what the system will support.
I do mine over ssh, but basically the same: ssh user@remote "sudo dd if=/dev/sda | gzip -1 -" | dd of=image.gz
ssh pi@np "sudo dd if=/dev/mmcblk0 bs=4M | gzip -1 -" | dd of=image.gz bs=4M status=progress is probably better though. That has a progress indicator and your block size. I haven't had issues with 4M.
and I use RPi Imager to write the img.gz, but I haven't yet tested if it boots, but I'm told it will (but both root and boot partitions mount fine and are browsable).
but I think ApplePie-Baker is more flexible compared to RPi Imager.
I hooked up usb speakers to Raspberry Pi and they were crackly, I think the best audio comes from 3.5 or hdmi with pi
Does anyone know hot to setup hot swap from hdmi audio to 3.5mm when 3.5mm inserted and back to hdmi when removed ? I know this can be done via the os as it happens but it's an extra step
from where?
"We don't talk about Bruno"
less uselessly, I know of this link
https://rpilocator.com/
I think the head of the rpi foundation said something about second half of the year it should unclog?
I’ve been checking rpilocator every day for the past forever and I haven’t been able to grab a pi
The 3 A+ tend to last longer if you don’t need Ethernet or a lot of USB
That’s the model i want
I grabbed one last week that’ll be in by Wednesday
I just need wifi and a usb port for my 3d printer
I’ve seen the 3A+ stock last over an hour
Alright y'all maybe a dumb question Maybe not so I have a SD card with to partitions on it and I want to install a new pi image on it but it only is selecting the larger one btw I'm on pi os doing this
why not just use RPi Imager on anything else?
well, I meant on anything other than linux. Never used RPi Imager on linux, but have you tried unmounting the partitions and then looking again with RPi Imager?
I believe the imager will format the entire card in the process of imaging. Are you trying to keep the other partition, or overwrite the entire card?
No I want everything on the sd card gone so that's good thanks
A successful raspberry pi OS will have two partitions. If you have more than that, you should also be able to manually format the card before reimaging.
Here’s your chance https://www.adafruit.com/product/4027
Why not?
"i haven't gone over the budget yet" -dad
Oof...
i can see the stock disappear in real time but can't get it
What program for the Pi is recommend to have like a clipboard manager (basically where I can copy and paste multiple things at the same time)?
Clcl?
Need help on raspberry pi 400. I can ssh on it before and when i reboot the pi. I cant access it now via ssh. Reinstalled OS and still no luck. I can ssh on my other computers but just not on my raspberry pi 400. Any thoughts? Enabled ssh, installed it again and again. Nothing
Could be a network issue.
I can ssh on other computer and my orange pi.
Raspberry pi 400 shows ssh active running. Just cant connect
What kind of "can't connect"? Is the host found? Is there a route to the host? Is the port open? What specifically happens?
Host is open and port 22 is open. When i try to ssh via my computer using putty. Cant access it. Tried other computer to ssh via putty and its working.
how are you seeing ssh as being active? do you have a monitor connected to the pi 400?
Yes i am connected to the pi 400 via hdmi and i enabled it via interface and also tried doing raspi-config.
what does ifconfig show for the wlan0 interface?
It shows my ip address on wlan0
can you ping something on the internet from the pi?
ping www.google.com
can you ping the pi's ip address from the other PC's?
ping 192.168.0.123
(but with whatever your ip address is)
what was shown in ifconfig
I used cmd on my other computer and show’s request timed out
sounds like the pi is unreachable then. so some kind of local network configuration issue.
or ssh, etc. aren't actually running (so nothing running to handle ping request)
I tried to ping my computer using the pi 400 and i cant reach it also
I can ping my laptop that i use for my 3d printer for now.
The only thing i cant ping on my computer is the pi 400 and the only thing that pi 400 cant ping is my computer. This is weird
I had a problem like that a while back, it turned out I had a brief power failure and some of my computers jumped to the other network so they could no longer see the ones that had stayed on the original network.
It's also used ipv6 to ping there worth trying ping -4 google.com to confirm ipv4 is working too
^^ good catch. could be related
Odd question with pi os it says I have four desktops how would I make it only one
It's super annoying when I'm trying to do anything and I accidentally scroll
If I distribute a systemd service file with some code i want to run on startup, should I instruct users to just sudo cp myserver.service /etc/systemd/ or is there a better way using systemctl? Ideally systemctl install myserver.service
I don't think there's an "install" function; I've had users copy them to /etc/systemd/system
Cool, thats what i'll do then
Why not just create an install.sh?
I think the bigger question may have been: do some systems keep service files somewhere other than /etc/systemd/system
@edgy oar thats a good idea. just want to make sure the install.sh is doing the right-est thing it can.
@tawdry aspen luckily I am only targeted a very specific system (Raspberry Pi 1). Maybe later models too. But they all go in either /etc/systemd/system or /lib/systemd/system
Its to revive a dead IoT device that is still pretty and useful
I think the paths that are not /etc (e.g. /lib/systemd/system or /usr/lib/systemd/system) are usually where symlinks get created when you enable/disable services
might even be worth it to make a deb package?
something users could install with apt
(even if it's not hosted in the package repos)
In theory /lib/systemd is where packages install unitfiles and /etc/systemd is where administrators add unitfiles
You have a mouse connected, right?
Try ls -b to show hidden/control characters in filenames
What? yeah
You can also try selecting that green text, right click, select copy, then paste it in
Nope it looks like there’s no hiding characters
Did that
Didn’t work
Don’t you mean ls -al?
Grrr autocorrect
No, I was wondering if there was maybe an invisible control character in the name so it looks like minecraft-pi but is really min^Cecrz^Haft.pi or somesuch
maybe minecraft.pi doesn't have proper permissions
That leaves more obscure errors such as current directory issues (try pwd to see), missing dynamic libraries (I'm unsure if Raspbian has ldd), hard vs soft floating point support, weird bash path issues, or something else
chmod +x minecraft.pi just to be sure
Maybe try file minecraft.pi to see what it thinks it is.
It could be a weird "magic number" problem
ye ole magic number problems
I had one of those just the other day with a bungled shebang
It’s talking about it being for 32bit I’m on 64 I’m wondering if that’s why crap
might be able to run in 32bit mode... I remember reading something about this before
How would I run it in that mode
Ah, it is dynamically linked. Maybe try ldd minecraft.pi to see what dynamic libraries it's trying to find (may not work if ldd isn't the right command for that particular operating system)
It says it’s not dynamic
Ah, so file says "dynamically linked", but ldd says it isn't. That seems bogus. Which might be the same 32-bit support issue skerr is describing
What would that do
Which is? Sorry I’m trying to learn I’m kinda knew to all of this
in this case it would be an additional arm architecture on top of the Raspbian 64-bit image.
basically allows it to interpret other architectures
and run those programs on those architectures.
I ran into a somewhat similar issue trying to run fancy packages on a Pi Zero, which is an ARMv6 architecture, while the packages were for the more common ARMv7 used on most of the other Pi boards.
very... high level of what's happening but maybe madbodger can explain it better.
operating systems are hard
it seems like it's harder and harder to keep things straight to run stuff lol
No kidding. Reminds me of the early days of Unix when you had weird commands like v6run to run Version 6 executables on Version 7.
Can’t tell if it worked
like when I was building these verilog examples yesterday and today. the export PATH="yadayada/oss-cad-suite/bin" bit wasn't linking those to PATH but using the source yadayada/oss-cad-suite/ worked like a charm.
Bro still not finding it
Does pi have strace?
You can try stuff like truss minecraft-pi
Or truss. Lol.
Good point, I don't know if the Pi has truss, strace, or something else
what are the permissions on the file?
Note, it produces lots of output, showing every single thing the executable tries to do
is it like 644?
Truss doesn’t work and strake gives me the same errors
-rwxrwxrwx
hmmm
Here is the perms
so it should be able to execute
Yup
I found this on the raspberry pi forum
sudo dpkg -i Minecraft.deb
I also wonder if it should be minecraft-pi instead of mincraft.pi
That’s what I have been doing I just wasn’t gonna correct y’all because there’s was no need really
Ok this is kinda weird
This for Java anyway
I’m using Minecraft pi edition
yeah, i'm a bit confused
May I ask what your confused about
it not working
Anyone got any idea what deb http://httpredir.debian.org/debian jessie-backports main contrib non-free is?
I looked into this
And what I found i need to add Librarys for the architecture
And what I also found online is that to add those people were suggesting that repo
i'm pretty sure you need to sudo apt-get update after adding an arch for it to have an effect
that's a link to a source (pro-tip if you surround text with backticks it does a box like this on US keyboards the backtick is next to the 1)
I did
Is it an executable?
Hold on my pi is booting
I ran the command and it didn’t do anything
Did chmod say anything?
No
Try it with sudo
Still didn’t do anything
When you say "didn't do anything", did nothing happen? No error message, just a fresh shell prompt?
Nope noting just went to the next line to
echo $?
if you ran any successful commands in between, including the echo command, then $? might have been reset
Yeah that’s why I retired
you can also run ls -l on the file to make sure it changed the execute bits
Idk what I’m reading
that should be a lowercase l (lowercase of "L"), not i. and you should see stuff like rwx or r-x in one of the left columns next to the filename if it worked
I feel like we’re going in circles
that looks right to me. what problems are you having?
Just scroll up it’s takes a while to explain
TLDR i am trying to run Minecraft pi edition and it’s 64bit I’m running 32bit
Sorry it’s 32 bit
I’m running 64 big lmao
where did you get it from? and were there installation instructions for it?
Minecraft’s website and kinda it only told me to open the zip and I did that and then it told me to run ./minecraft-pi
Which I did all of that
and running that command still fails? what's the error?
i don't see a screenshot of what happened when you tried to run it after dpkg --add-architecture, but i might have missed it in all the scrollback
Just another prompt? What does echo $? do immediately afterward?
In any case, it's probably time to start using power tools, like Rachel's suggestion of strace
Im at school rn but I'll try it when I get home
question: were I to use a Pi4, would it be possibile to have two windows on separate screens without the desktop running?
'cause I found this nice toy, and would like to show a music player interface on one monitor, and either the playlist, or ffmpeg's spectrogram on the other screen
As I understand it, you need a window manager to have windows, is that what you mean by "desktop"? Or do you want to hide any desktop icons, navigation tools, etc., and just have the software take over the whole screen(s)?
Software like omxplayer can take over entire displays without a desktop environment, so I was assuming that’s what they’re looking for. Unfortunately, I have no idea how to develop applications to display like that.
the latter. like this, but each screen has its own GUI program running
does each hdmi have its own fb device, or is it shared?
ok, it looks like I might use a properly configured lightdm
https://www.enricozini.org/blog/2019/himblick/x-autologin/
now to find out whether multi-screen works, and how to manage it...
alternative: get a wiiiiiiiide screen, and position the two windows within its area with a given size and position
8.8inch IPS Side Monitor, 480×1920, HDMI, HiFi Speaker, No Touch
well, I'll be...
I did manage to create the command for having ffplay in a window of my linking and so on, but... there's no way to funnel an audio stream into ffplay, so I'm apparently wasting time 😑
i wonder if some ffmpeg trickery funneling into ffplay would work
And I wonder if I could make a permanent FIFO, make mpd output there, and then open it with ffplay, hoping it won't crash in case of change of samples/bitrate/whatever
Maybe I could have it resampled, so to be at least consistent in the FIFO
It should work, in theory.
ncmpcpp needs it for its visualizers, so I guess it might follow the same mechanism.
Good news, I can set a format for the FIFO! That's a step forward
Any progress?
Not for today, it's late
Not really SBC but more file system and data.
I have switched back to windows and have two ext4 drives which windows can't see.
I'm installing a large drive (2tb) which is enough to backup both drives and I'll set it as NTFS.
What's the best way to transport these files from ext4 drives to this large NTFS?
Should I do format the 2tb drive in windows then do a live usb of Ubuntu and copy there or should I use a ext4 reader for windows application
I wouldn’t recommend ext4 readers for windows if you have access to a live usb and you can format it to ntfs using gparted no windows required
If you aren’t dual-booting i find live media to be the best option for stuff like that
I think so too crudefern, I've decided against using windows at my workstation so this is no longer a problem
Even though i prefer linux i dual-boot windows because 1: games 2: convenience (mostly) 3: it came with the darn thing and I don’t want to trash a perfectly good windows license
There are ways to retrieve the original licence key. 😁👍
Wym?
Does anyone have a cluster hat this thing and if so is it good in anyway
that looks neat, but what would I need it for?
I would probably use it for pi hole kind still figuring out the rest
still seems like overkill. Still neat though.
Hey, anybody got experience with HDMI displays on Pi? Mine seems stuck showing vertical columns, very bright and blinking rapidly - almost looks like all the rows are getting added together… I’ve posted a video and more info: https://youtube.com/shorts/RcNiEmfxfEc?feature=share
Trying to get this display to work: https://www.adafruit.com/product/2395
I used the config.txt at: https://learn.adafruit.com/hdmi-uberguide/2395-7-display-w-touchscreen-1024x600
The screen is showing all vertical lines, nearly white, and blinking rapidly. What it suggests to me is that it's adding together every value in each column, almost...
I’ve gone through the directions and troubleshooting, tried a different Pi (4 and 3 Model B), re-flashed the MicroSD card multiple times… still stuck 😭
Checked for shorts, too!
More info: https://docs.google.com/document/d/1f2SFrAyI7DvA8gGYmzGh2jCGmqez7w_gqHPI9HCS-V8/edit?usp=sharing
Video: https://youtube.com/shorts/RcNiEmfxfEc?feature=share Trying to get this display to work: https://www.adafruit.com/product/2395 HDMI 4 Pi: 7" Display w/Touchscreen 1024x600- HDMI/VGA/NTSC/PAL I used the config.txt at: https://learn.adafruit.com/hdmi-uberguide/2395-7-display-w-touchscree...
I want to use it for my Polly Pocket-themed cyberdeck for Pi Day 😄 ...but may have to go with a clunkier display if I can't get this one working
I you sure it’s not the screen??
Have you reseated the screen ribbon cable
Hmmm, just re-seated it and same thing :/ Been assuming a driver issue
But I'm down to try whatever!
Def hope it isn't the screen, but if it is, at least I've got a backup
Danke 🙂
@analog agate am curious when you figure out the problem though!
If I do, I'll update the google doc and drop a note here 🙂 I futzed with it some more and couldn't get it working, so tomorrow I'll be trying my luck with other options
I wonder if something wrong with the screen it's self
actually Maybe I'm forgetting but I think my friend had a similar problem and it was a issue with the refresh rate if I remember correctly
Oooo, I’ll have a look into that later! Got my hands on a 10” display in the end - less “cyberdeck” size, but working with what I can for the prototype…
check the frequency too. had something similar happen on a feather TFT while attempting to overclock it from 30Hz to 70Hz. set the refresh rate and frequency back to stock and was right as rain. it started glitching and then banding very similar to what yours looks like.
Are you GlowASCII on Twitter? 😄
If so, I love your content
I think I also follow you on mastodon
As for displays, look for HDMI or MIPI compatible displays. Much better and faster than SPI/Parallel TFTs
You can get some nice color OLEDs
I’d love to get one of these eventually https://m.aliexpress.us/item/3256804556441252.html
It’s a flexible color oled
ffmpeg -nostdin -loglevel quiet -f pulse -i alsa_output.pci-0000_00_1f.3.analog-stereo.monitor -f nut pipe: | ffplay -x 960 -y 480 -noborder -left 960 -fflags nobuffer -f lavfi -i 'amovie=pipe\\:,showspectrum=color=intensity:orientation=vertical:overlap=0:s=960x480:slide=scroll:mode=separate:fscale=log:scale=cbrt:legend=1[out0]'
edited to take my windows parameters into account
tested by running VLC while the line was executed, it doesn't close with null output
Nice
when there's no sound, it just keeps on scrolling blank
You could add hw acceleration by adding -hwaccel auto at the beginning
on ffplay side?
Ffmpeg
oki
I haven’t tested it in ffplay
The option doesn’t exist in ffplay
I just tested it
I do know it uses the gpu for rendering the spectrogram
ok, it works 👌
Noice
It brought my transcode speed up from less than 1x to 7x (transcoding 1080p video) and remained there
also removed the legend segment, it's just for eyecandy anyway, and it'd be awkward to have an infinite counter at the bottom, not considering the burnin the legend would cause
Good idea
now, let's hope it'll run on a Pi as well 😄
ffmpeg supports hw acceleration on the pi
nice, nice
On the pi there’s a player that uses hw acceleration
omxplayer
It might work
But for a 960x480 video it probably won’t matter
I'll have to do some trial and error as I add pieces.
a next step will be if it can capture audio going to spdif, once I'll have the necessary card, and then I'll try again once I'll have the final USB DAC
spdif?
sorry, toslink, and yes, it'll work as a temporary output, connecting to a soundbar
toslink, but on an RCA connector XD
S/PDIF can be carried over coaxial/bnc connectors
(I'll probably get some boot yeeted at me for this sentence)
S/PDIF is used on both toslink and coaxial cabling (color coded orange)
the audio scene is... picky when it comes to definitions
Yes
to use a gentle term
Picky at best defenestrate anyone who doesn’t 100% agree with them at (semi)worst
Defenestrate essentially means “yeet out a window”
aye
btw, blessed be -loglevel 0 for cleaning the terminal
About a third of memes on the internet were/are the emperor’s new groove memes
Oooo
Easily my most favourite word in the English language.
YES
here it is 🙂
along with yoink
Not sure that one is in any proper dictionary. Lol
jokes aside, another test I might run is wether the pipe made by mpd works as well
in due time
Oh yay, yes I am (she belatedly replies) 😄 nice to meet ya!
👋 @hard pike @analog agate 🙂
✨
Can I connect any mipi camera (raspi cam) to mipi camera interface (matching pins), or it has to be exact model intended?
I have a issue with RPi 4, I have installed Blinka and hooked up a LED strip of Neo-pixels with a level shifter and that is all working. I made sure I was not on any of the GPIO pins that are use by the analog audio jack. When I hook up a speaker to the audio jack and play a wav file the LED strip stops working. After doing anything with the strip I cannot play audio from the jack. I tied the speaker via bluetooth and I can play both sound and use the LED strip. Just the audio jack is causing me problems.
I wonder if there's a conflict for a timer/interrupt
👋 @gentle briar
I just did a sudo apt update and sudo apt upgrade on my pi. it updated the kernel from 5.15.x to 6.1.19. Then this guide: https://learn.adafruit.com/adafruit-braincraft-hat-easy-machine-learning-for-raspberry-pi/audio-setup didn't work. Anyone else having this problem?
Not that specific problem, but I did have to do some installation and tweaking to run an OPCUA library on my Pi.
found out I had to do a "git checkout v6.1" and reinstall
Slow again lol! I decided to make TWO – a small extra-portable with an official 7" display, and a big one with the 10.1" screen (for home use). Kinda gave up on the one I was asking about here – for now – but if I do eventually get it working, I'll definitely post the outcome!
if i bought any SBC such as orange pi or rock .... could someone give me a quick run down how to make it battery powered. i'm aware i'd maybe need a buck converter but is it just a case of finding the right regulator board, connecting the battery and the buck to the sbc?
I think adafruit has a pi battery supply, I don't recall it charges, but maybe it'd at least work with a pin compatible board? a point of research
Thanks I'll take a look
The simplest way to do it would be to use a USB power-pack battery.
I would but it all depends on the SBC it gets paired with
i need help with raspberry pi
whenever i try to import requests module of python3
i get the following error
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'
Openssl version = 19.0.0
urllib3 version = 1.24.1-1```
unable to use pip aswell
tried re installing all the modules, Didn't helped
sudo apt install python3-pip
It was an issue with open ssl, solved it, thanks
Getting this error while trying to install updates on my Pi Zero
Could be you ran out of space on the filesystem. Normally I'd look at the console log, and try the usual tools to see the mount points and their permissions, how full the filesystems are, etc.
It is a clean install
But it does have problems booting sometimes
could be the storage card is failing
It is a few years old, but I haven't used it since I switched from Windows to Android in 2016/2017
How can I check?
I think the easiest way would be to get a new SD card and see if the problem still happens
It would, if I had the funds for it
You can try formatting the SD card and giving it a clean install
I did that already
Try h2testw (f3 for linux) on the card
Can anyone shed light on this error message? complete newb
/home/user/.local/lib/python3.10/site-packages/board/.py", line 169, in <module>
elif board_id in (ap_board.JETSON_ORIN_NX, ap_board.JETSON_ORIN_NANO:
AttributeError: module 'adafruit_platformdetect.constnts.boards' has no attribute
'JETSON_ORIN_NX'. Did you mean: 'JETSON_TX2_NX'?
comes up when I try to import board
first happened after i installed a new library for a bme 280 sensor
It seems like the module is asking the board package if it's one of a few particular Jetson boards, but the board package doesn't have definitions for all those specific boards. The easiest fix is probably to just remove that board reference (since presumably that is not the board you have).
update platform detect to latest release. looks like that was only added a couple of days ago:
https://github.com/adafruit/Adafruit_Python_PlatformDetect/releases/tag/3.44.0
@shrewd flume I've confirmed the best place for Jetson questions is here in #help-with-linux-sbcs because it's considered an SBC and runs Blinka on Linux.
what's strange is that i'm not using a Jetson board at all, its an FT232H. I think I must have downloaded a wrong library when adding my BME280 now nothing is working
i've tried uninstalling the new downloads as I imagine there were conflicting dependencies, but my original correct modules still aren't working
I'm considering a fresh re-install of the linux OS and re download the appropriate libs
but that issue is fixed right ? what other problems are you seeing ?
running pip install -U adafruit-blinka Adafruit-PlatformDetect resolved the error message, but now when I use the module board non of my pins are detected
when I run dir(board) it doesn't show my pin names
i get, [Blinka', builtins', cashed' etc...
you did do export BLINKA_FT232H=1 ?
or run python like this:
BLINKA_FT232H=1 python myscript.py
yeah environment variable is set
in the same environment ? like you are not calling python with sudo ?
nope
what do you get printing board.board_id ?
name board is not defined
maybe import board first
now i get GENERIC LINUX PC
what about:
import os
print(os.getenv("BLINKA_FT232H"))
i get back > none
so somehow it doesn't see the environment variable, can you check that it's set ? How do you run python ? Do you run it inside an app like Thonny ?
just inside the terminal atm, just use thonny to write programs
so the environment variable isn't set even when I run export BLINKA_FT232H=1?
it should be if you do something like that in the same terminal:
export BLINKA_FT232H=1
python
or a single line like that:
BLINKA_FT232H=1 python
at least in bash I guess
unless somehow python is run in its own thing, but I don't know how that would make sense, this is beyond my linux knowledge 🤷
well thanks for the help anyway, we've at least narrowed down the issue a bit
What going on?
try setting it in your python script like this, before importing other modules:
import os
os.environ["BLINKA_FT232H"] = "1"
k will try that just need to reboot everything keeps freezing 🫠
Hey its working now!
I just don't understand exactly why but hey
atleast I can continue my relay project
I ran into this issue after running pip3 install adafruit-circuitpython-bme280
👋
I have a fresh install of OrangePi's Debian image running on an OrangePi5 and having a hard time getting eth0 to actually do anything.
Running ip a I can see that the os has eth0, but the device is down. Running sudo ip link set dev eth0 up to try to bring it up, I get RTNETLINK answers: No such device.
Plugging the cable into my laptop can confirm the cable is just fine and can access my router and beyond. However, plugging the cable into the OrangePi, I get no status indicator lights.
I'm not entirely sure where to go to interrogate Linux kernel modules or log files to examine this issue further. It might be an issue with that port being DOA. Not entirely sure. Might just be that there is a special kernel module I need to install specifically for this device.
You can start by checking dmesg to see what's detected by the kernel. Also sometimes modern Linux will create Ethernet adapters using different names, like enp0s24 or weird stuff like that. You can also use tools like lspci and lsusb to see what's on those busses to try and find the controller.
there's no green indicator light on the Orange next to the cable? (also, make sure the network connector is seated solidly in the socket on the Pi - an extra push never hurts)
Yea, it is pushed in all the way. Pushed in as far as it will mechanically go. No green, no amber.
If there's no driver running, you may not get link lights
I get scrolling error messages: stmmac_open: Cannot attach to PHY (error: -19)
and no phy at addr -1
Yeah, looks like the driver needs updating: https://bugzilla.kernel.org/show_bug.cgi?id=117541
That's pretty old though, hmm
It certainly sounds like a driver/module issue. Are there any other Linux flavors that support the OrangePi 5 that you could try?
Sorry, had to step away for a bit. Ummm. Not that I know of. The bug report you linked seems to be from 2016. I am running 1.1.4 Bullseye with Linux 5.10.110-rockchip-rk3500.
If there is a patch I need or a drive update. Potentially I can download it and transfer it to the device using a flashdrive?
Should be able to, but it seems odd that a newer kernel would have the same issues. I saw there were other weird interoperability issues between that Ethernet controller and various PHYs, so it might be worth searching for the controller and the PHY to see if you can find anything
Scrolling up further, I can see: IRQ eth_lpi not found, Looking up phy-supply from device tree, Looking up shy-supply property in node /ethernet@fe1c0000 failed
Checking the status on the firmware via cat /sys/firmware/devicetree/base/ethernet@fe1c0000/status returns Okay. So I guess the firmware is good? But the driver needs to be updated?
Possibly? It might be worth trying another distro to see if you have the same issue. Compiling kernel modules is always a bit of a pain
Hi! I am tryong to make a Jetson Nano send motor speeds to an Arduino over serial using Pyserial, and I am getting a several minute delay between the data being "sent" and the arduino receiving it. Has anyone else had this issue, or know why this is happening?
Are you looking for an "expected sequence"? What is your timeout set to?
does anyone know if tinyusb works on a pi 4?
I think it should. It says it supports the BCM2711, which is the SoC in the Pi 4, and explicitly mentions the Pi CM4 as a supported board. https://docs.tinyusb.org/en/latest/reference/supported.html
i saw that the CM4 was called out, just wanted to make sure there isn't difference aside from form factor
I don't know for sure. That weirds me out a little too, so it may work but just not completely out of the box, needing a little config or setup or something.
Since the Pi has built-in USB ports, it would be a little bit more of an unusual use case versus the CM4 that might not have them broken out.
getting this when trying to compile a tinyusb example on a pi4
AS boot8_asm.o
make: aarch64-none-elf-gcc: No such file or directory
make: *** [../../rules.mk:139: _build/raspberrypi_cm4/obj/hw/mcu/broadcom/broadcom/boot8_asm.o] Error 127
managed to fix that by symlinking aarch64-none-elf-gcc to gcc, now i'm getting
CC board.o
CC main.o
CC msc_disk.o
CC usb_descriptors.o
CC tusb.o
CC tusb_fifo.o
CC usbd.o
CC usbd_control.o
CC audio_device.o
CC cdc_device.o
CC dfu_device.o
CC dfu_rt_device.o
CC hid_device.o
CC midi_device.o
CC msc_device.o
CC ecm_rndis_device.o
CC ncm_device.o
CC usbtmc_device.o
CC video_device.o
CC vendor_device.o
LINK _build/raspberrypi_cm4/cdc_msc.elf
/usr/bin/ld: cannot find -lnosys
collect2: error: ld returned 1 exit status
make: *** [../../rules.mk:172: _build/raspberrypi_cm4/cdc_msc.elf] Error 1
The /usr/bin/ld: cannot find -lnosys line looks like the linker has been told to include a library (-l) named "nosys" but that library is not present in any of the locations it looked.
any idea how to get that installed on an PI? my google seems to be failing me
It looks like it would be part of the libnewlib package. However, I'm somewhat suspecting you could be going down a bad path, as this might be compiling an example to run bare-metal on the Pi's CPU rather than running inside a Linux environment.
there was a little bit of metal on one of the chips, i gave the pi a gentle clean.... maybe this solved it
it's also running super hot. i think a bad over clock killed that pi
i tried reaching out in #tinyusb but got no response as of yet. any suggestions?
No, I haven't worked with this sort of thing. May I ask why you want TinyUSB on a Pi rather than using its native USB?
same question, tinyUSB is for bare metal coding, as far as I know it's not gonna run on linux
so, what are you trying to do ?
there is a project that emulates a portal of power for skylanders
it uses an LCD screen and buttons
i've got a 5 year old and about 80 skylanders around my livingroom. i was hoping to port his code for a pico to a pi4 and use a touch screen.
You might be able to do that on a Pi Zero but I don't think the Pi can normally act as a USB device
The Pi 4 can act as a USB gadget on its USB-C port, like the Pi Zero does on its USB (non power) port
yes
do i maybe want to use libusb?
I don't know, this is out of my wheelhouse. Does it use HID ? If so you might look into hidapi
Is there a Linux command to change a hex value at an offset in a file?
If it's a hex file, you can do that with a text editor.
Apparently hexedit but I'm unsure if that's bundled with Linux or if it has to be installed
But I'm guessing you want to edit a binary file with the values represented in hex.
Yeah, i just had an idea for a GIF where changing the num of frames/length value via a command would cause it to end on a completely different frame, but I'm not sure if GIFs are parsed like that so I'd have to research it more.
Apparently most GIFs are LZW compressed, but you can also make them uncompressed which would probably work better.
/ imagine
I really like ImHex. I think it can do editing
has anyone gotten GadgetFS to work on a raspberry pi 4? I've got dwc2 mod loaded, create the directory and mount the gadget, but it doesn't create the in an out only fe980000.usb
Hi! I am new to RaspberryPi and I am doing a 64x64 led matrix project using the resources below:
- The tutorial I followed: https://learn.adafruit.com/rgb-led-matrix-cube-for-pi/software-part-2 (but I only use one matrix)
- The Library: https://github.com/adafruit/Adafruit_PixelDust/tree/master/raspberry_pi
The demo (demo1-snow) works well, but I want to change the led rgb value, so I adjusted the code and saved it as a new file named “demo1-snow-modified” which is a cpp file
My questions:
-
How to make cpp file executable and run the code like demo (sudo ./demo1-snow) in terminal.
Photos are the errors and I tried to use “g++ demo1-snow-modified.cpp -o demo1-snow-modified “ to create an executable file, but it failed. How to include the led-matrix library when I compile it? -
Does anyone know how to create our own image with Adafruit_PixelDust Library? I saw there is a application like this: https://github.com/porrey/ledmatrixide ,but I have no idea how to run the application?
Thank you!!
Library-ified version of "LED sand" code. Contribute to adafruit/Adafruit_PixelDust development by creating an account on GitHub.
It seems like you're doing it right, there's just some small problem that crops up where you said "but it failed." The error message(s) from that failure will help us figure out what you need to adjust.
@gentle briar Here is the error!
Is that because it can’t find the library I used?
This is the ‘demo1-snow-modified.cpp’ that includes some libraries. But I do see the libraries in my folder…
Since this is complicated, I suggest you open a forum thread: https://forums.adafruit.com.
If you can copy the text rather than take photos, that may be easier to debug, since the photos only show one screen's worth.
Describe exactly what you did.
I posted there and got help! Thanks!
Looks like you need to add linker flags?
anyone have experience with emulating a usb device with a pi4?
Sorta of, state your problem maybe I can't help, but someone else would
I eventually used 'make' to compile my cpp file and it works!
Ok, so update on my Raspberry Pi Zero W not booting, I now have a green LED light next to the power input flashing 4 times
Google gives conflicting answers, but generally seems to confirm I have a boot problem
Did you try another SD card?
I don't have another one, nor do I have the funds
SD cards can be found in many devices (cameras, phones, GPS units, some toys, etc.). Depending on where you're located, some retailers (such as MicroCenter) offer free ones from time to time with coupons as loss leaders to get you into their stores.
is there any chance you live in the seattle area?
Complete opposite side of the country
darn, not even anywhere in the midwest?
I'm driving to michigan tomorrow so if you were along 80, 90, or 94 it might have worked out 😂
I'm literally surrounded by water, lol
Is there any chance you live in the Baltimore/Washington area?
Nope
Hello, have a coding question that I think fits this channel (please let me know if not). I have been working on my LED matrix for a while but have hit a roadblock with it updating. I have a timer as a variable that is supposed to run from 2 minutes to 0. I have tried to incorporate the matrix into an already existing/working code I have. Problem is I cannot get the matrix to wipe the old value that was on the LED matrix and place the new one. I have tried running a clear on the canvas and matrix along with a fill of 0,0,0. I have also tried moving the updating command which I think is canvas = matrix.SwapOnVSync(canvas), to be after I run the clear, then after setting the text. I am wanting to avoid it blinking from a reset/clear every second it is updated as it is going to be a scoreboard for a public event and a smooth transition is something that I would prefer.
text = "{:02d}:{:02d}".format(minutes, seconds)
if text != previousText:
#canvas.SetImage(black_image)
text_width, text_height = draw.textsize(text, font=font)
x = (64 - text_width) // 2
y = (32 - text_height) // 2
draw.text((x, y), text, font=font, fill=color)
canvas.Clear()
canvas = matrix.SwapOnVSync(canvas)
canvas.SetImage(img)
canvas = matrix.SwapOnVSync(canvas)
previousText = text
Also attached is the example of what happens when it counts down from 2 minutes.
Thank you
I'm guessing you're double buffering, so you'd draw on one canvas, then swap canvases to update?
Can you provide all of your code? I think you need to clear the canvas, draw the text and then swap the canvas.
I tried updating and it partialy works.....but yes i will
Code is at the bottom
There is still very much a trace left by them
@heady sand Try adding draw.rectangle([(0, 0), (64, 32)], fill=(255, 255, 255), outline=None, width=1) before the draw text (line 300). That should draw a filled rectangle over the image
Personally I would create a new image each time.
How would I do that?
I am not very skilled in python so I am using mostly what I can find on the internet and trying to understand it
Well, try the fix I mentioned first.
I am right now.
Also, I just re-installed the library to be using quality, yet it still flickers, how would I fix this? I saw there was an option you need to set?
What do you mean by "using quality"?
When installing using this guide, there is a quality and convenience settings
I just soldered GPIO 18 and 4 together and re-installed with the quality setting yet it doesnt seem to have gotten rid of the flickering
I think its the PWM stuff
I found the option
--led-gpio-mapping=adafruit-hat-pwm
Do the examples flicker?
I suggest doing that to make sure your setup is good and not a code issue
Yes the examples do as well
a wonderful Friday morning from Sweden to all who dwell in this channel! I could really do with some help from anyone who knows Linux Audio well
I am trying to route the audio (mono audio and micriphone) to and from a USB Audio device plugged into a Pi, running headless on latest Bullseye lite (so no desktop environment and access over ssh) to a Bluetooth headset
I have a Telit LE910C4 mini PCIe module which supports Audio over USB (mono audio + microphone). I have the module plugged into a Pi 3B+ via USB and everything looks great; the module works as expected, and I can see the USB audio device. I am just missing the last link to be able to use my bluetooth headset - essentially I am missing the "?" in the attached diagram
On the Linux side I see this:
[14447.968572] usb 1-1.2: New USB device found, idVendor=1bc7, idProduct=1230, bcdDevice= 3.18
[14447.968606] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14447.968624] usb 1-1.2: Product: LE910C4-EU
[14447.968637] usb 1-1.2: Manufacturer: Android
[14447.968651] usb 1-1.2: SerialNumber: 0123456789ABCDEF
[14447.970257] option 1-1.2:1.0: GSM modem (1-port) converter detected
[14447.970698] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB0
[14447.975116] qmi_wwan 1-1.2:1.2: cdc-wdm0: USB WDM device
[14447.987227] qmi_wwan 1-1.2:1.2 wwan0: register 'qmi_wwan' at usb-3f980000.usb-1.2, WWAN/QMI device, 8a:e4:11:3c:a1:8a
[14447.990048] option 1-1.2:1.6: GSM modem (1-port) converter detected
[14447.990595] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[14447.991285] option 1-1.2:1.7: GSM modem (1-port) converter detected
[14447.992215] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[14447.992964] option 1-1.2:1.8: GSM modem (1-port) converter detected
[14447.993488] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB3
[14447.994166] option 1-1.2:1.9: GSM modem (1-port) converter detected
[14447.994546] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB4
[14448.349932] usbcore: registered new interface driver snd-usb-audio```
I have enabled USB audio in raspi-config and I see this
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: vc4hdmi [vc4-hdmi], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: LE910C4EU [LE910C4-EU], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0```
$ aplay -L
LE910C4-EU, USB Audio
Direct hardware device without any conversions
plughw:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
Hardware device with all software conversions
sysdefault:CARD=LE910C4EU
LE910C4-EU, USB Audio
Default Audio Device
front:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
Front output / input
surround21:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
4.0 Surround output to Front and Rear speakers
surround41:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=LE910C4EU,DEV=0
LE910C4-EU, USB Audio
Direct sample mixing device
usbstream:CARD=LE910C4EU
LE910C4-EU
USB Stream Output```
speaker-test 1.2.4
Playback device is usbstream:LE910C4EU
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
ALSA lib pcm_usb_stream.c:508:(_snd_pcm_usb_stream_open) Unknown field hint
Playback open error: -22,Invalid argument```
this is not my area of expertise by any stretch of the imagination, but very eager to learn if anyone can point me in the right direction 🙂
11th hour update: reading up on amixer no idea if that’s right or not 🙃
Seems this is leading to alsaloop </rubber duckying>
some progress but also questions
- why does
aplay -Lhave so many options for the LE910? I know from the docs that the Audio over USB for LE910 is mono only; I guess it shows the upmix / downmix options though - looking at the
alsaloopdocs (https://linux.die.net/man/1/alsaloop) it seems that you specify the capture device and then the playback device; so then my interpretation is that audio generated by the capture device is looped to the playback device; so if I use the LE910 as the capture device, and the default sound card as the playback; in theory if i have a call going to the LE910, then the phone audio would be looped to my headphones - which would be great; however from what I can see in the output above, how do you know which device is a microphone? I am assuming I need to create two loop devices for the full bi-directional communication - so I need to create a loop with the capture device as the Raspberry Pi's microphone (which is coming from a USB-sound card now) and playback as the LE910 - but again no idea which device on the LE910 is the microphone
back to the docs! but if anyone knows directly, ping!
alsaloop allows create a PCM loopback between a PCM capture device and a PCM playback device.
Guessing you already formatted and re-imaged the SD card so you might look at checking the solder connections for the SD card slot, maybe a poor data line connection. Magnifying glass might be handy to do this.
Anyone familiar with pi400 wifi nonsense?
I regularly switch SD cards either various OS builds. About a week ago, my pi400 just decided not to connect to wifi, across all of them.
I can run any kind of wifi tools, like the aircrack suite etc. Using my alfa adapters. However, the alfa adapters and the native wifi card, are having no response trying to connect to a wifi. Enter password, connect, nothing. No error. Doesnt return "incorrect password" or "connected without internet" nothing. Just doesn't work.
Ifdown and ifup both return "unknown interface" for both cards. Iwconfig returns both with no issues.
With various*
I'm baffled because
- It's across OS's
- Effecting the external alfa cards as well
- Happening across multiple wifi networks
Yes i was able to fix this by updating tye wifi chipset firmwere
sudo apt install firmware-brcm80211
If it still dosent work,use journalctl and post your issue on github either at the broadwell drivers page or the bootloader project
Just so you know,this is a chipset issue as i have seen it in both pi4,pi400 and a cm4 pcie card
Thank you.
@gentle briar @fickle rose happy running ubuntu for a couple of months now. i'm using an older display driver as i had no uptime on latest nvidia. ubuntu is nice, but disabled the ubuntu dock in favour of cosmic dock
Nice
(Pro tip) if you want to try different desktop environments you can install multiple and switch on the login screen
There’s a command you can use but i forgot the name edit: it’s tasksel
Idk if it’s on ubuntu but timeshift is a great backup program that backs up your whole system (minus the home dirs by default)
The SD clone app Raspian has is easy too.
i'm happy with gnome
A programming question not sbc or circuitpython but... Is there a good book that teaches python to a new user of linux? I got into linux from the Raspberry pi and into Python with circuit python. Now I have a linux workstation with Python 3.11 and am trying to do more. Thanks for any information given.
Maybe check out Al Sweigart and his books, especially Automate the Boring Stuff with Python - he makes them available for free under a CC license (or available to purchase): https://alsweigart.com/
@vocal lava Thanks Paul, I am looking into them. And buying to support the knowledge.
@fair ravine I'll second the Al Sweigart books, and if you're interested I can provide some other tools / puzzles / games I've used to teach Python over the years as well.
I can't get pillow to install on my raspberry pi with python3.10
Here is the errors:
Discord is making me paste in a txt file
so I see:
The headers or library files could not be found for jpeg, a required dependency when compiling Pillow from source. Please see the install instructions at: <https://pillow.readthedocs.io/en/latest/installation.html>
and in that URL I see things like:
Prerequisites for Ubuntu 16.04 LTS - 22.04 LTS are installed with:
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
libharfbuzz-dev libfribidi-dev libxcb1-dev
Well, I had to install a different installation manager. I then got pillow to correctly install.
So I'm having an interesting problem which... I think I know the answer too but don't know enough of.
I'm using the Sparkfun Qwiic Twist encoder (https://github.com/sparkfun/Qwiic_Twist_Py) with a Pi 4. I'm using the interrupt pin. I'm setting the interrupt pin to an internal pull-up on GPIO setup.
And here's where things go wrong.
Initial state of the pullup is high (As it should be). I fiddle with the Qwiic and it drops low (Again, as it should). And then it never goes back up to high again.
I'm thinking the internal pullup resistor is just a little bit not enough, and I'm going to need to add a separate one.
ooorrrrr
there's a clear_interrupts() call that I just missed
So here's the thing. The python package is a port of the arduino code - except they didn't port over all of the examples. So there's no interrupt example. I read a bit and thought I understood how it was working and turns out I only understood 95% of it.
Soon as I looked at the arduino interrupt example I was like "Oh. Yeah. OK.")
is this sense HAT compatible with a Raspberry Pi Zero 2 W
I'm guessing it is: the GPIO on all the modern (40-pin) Pis are pretty much compatible.
I see one chart saying the B+, 2, 3 and Zero have identical pinouts
product brief for 2023 on the pi sense hat 1.0 does not note incompatibilities, or compatibilities
"The Sense HAT is compatible with any Raspberry Pi computer with a 40-pin GPIO header."
https://www.raspberrypi.com/documentation/accessories/sense-hat.html
I ponder lighting up 64 neopixels (?which those may not be) through a pi zero though...
Thanks, I got some of Al's books and am watching YouTube for python programming which helps. I don't want to inconvenience you but, if it is just a link to the information I will take a look. Again thanks.
No worries at all. I keep lists from when I teach Python. I'm out and about today but I can send it over tonight sometime
Sorry it took so long to get back to you but hopefully this is helpful. Note that these are all oriented towards learning Python in general and not specifically CircuitPython
Thanks, I will check some of these out. I have already found some of the differences but the most important thing I want to learn is the correct syntax of the language. I had a problem with scope of variables already.
Yeah, the use of global and nonlocal keywords can be a bit surprising, if that's what bit you.
heya! I'm not sure if this is the right place to ask (I'll remove my question if it isn't :') ) but I was wondering if anyone had any experience working with SPI. I'm trying to talk to an rm3100 magnetometer chip from a raspberry pi using SPI and I'm having some trouble. I've read through the datasheet and I'm using python and spidev to control the SPI stuff but I seem to just be getting the same reading over and over again for the magnetometer readings. I can send my code if needed and I really appreciate any help!
Honestly if you're starting from scratch or coming from another language, the place I started was the official tutorial in the docs on Python.org. It goes really slowly and methodically with the syntax and the features. I actually printed the whole thing out (big mistake) and carried it around in a three ring binder to read at lunch and stuff. 🤣
You might try #help-with-projects and post code snippets there and have more responses. I know several people here might have several of these channels muted and might miss your question
That said, go ahead and post your code snippets anyway 😁
Don't know if this is the right channel, but hoping someone here can help or point me to folks who might. I'm trying to connect Reef-pi on a Rpi3 via Node_Exporter to a remote Prometheus db and then scrape that with Grafana. I have Reef-pi installed and logging. I have Node_Exporter installed and running (I can browse to http://<ip>/metrics and see data. I have Prometheus running, and it sees the reef-pi target and reports it up. And I have Grafana up, with the Prometheus db source added, and it reports the data source is working. But I can't get the Node Exporter dashboard to report anything...
is the node-exporter dashboard connected to the DB source? can you make "just another graph" from the prometheus DB? usually if everything is connected correctly, it's just a matter of checking to make sure the query parameters are aligned with the source
Howdy folks.
I've recently been running into issues in my Pi project. (Pi4, 4gb). I'm getting i2c issues, and on doing i2c detection I'll get transient random things showing up (using https://learn.adafruit.com/scanning-i2c-addresses/raspberry-pi). I've stripped it down to just the Pi and I'm still getting them.
I'm presuming this means something on the Pi has been damaged somehow?
Do you have a scope screenshot of the transients?
So I swapped Pis. Wasn't getting things when it wasn't connected to anything. But now I've reconnected everything and... weird bad data is back. Hm.
What are your pullups?
Whatever's built in on the devices.
Interestingly, everything was working fine a few days ago and now it just. Doesn't work.
OK so I've got three things on there.
Custom PCB has an ADC that doesn't have any pullups.
The PCF8523 RTC (https://www.adafruit.com/product/3295) which has two 10k pullups
The Sparkfun Qwiic Twist (https://www.sparkfun.com/products/15083) which has two 2.2k pullups.
I've tried dropping the baud rate down to 10k (From the default 100k) but I don't think that helped.
Ok so your total pullup resistance is 1.8k. That's a little low, but I don't think it's low enough to cause issues.
I assume you've tried communicating with each board individually (disconnecting the others)?
The qwiic board is connected via the custom pcb that the ADC is on. But the ADC works.
I haven't set up the RTC yet, but it seems to perform just the same without it connected.
The reason I'm asking is because I'm suspicious of signal integrity issues. Despite the common usage, I2C was not designed to go through cables. Qwiic/StemmaQT wires are usually pretty short though.
I mean. Neither of them are particularly long cables, but they aren't the nicest cables either.
I'm not using the Qwiic cables because that device was a late addition/swap, so it's just soldered wires
What happens if you connect only the RTC?
That's also connected via the adapter board but since that's a quick connect I added, I might be able to manage that. Through some additional jumper wires.
The key here is to disconnect the custom board. I'm wanting to determine if that's the issue.
I've been using this board (And setup) for about a week now, no issues. Then friday night it just started acting up.
Ah I see
Well my only theory at this point is that the pullups are too strong and damaging the GPIO pins. I'm not convinced that's the actual issue though.
Do you think disconnecting the Qwiic's 2.2k ones and letting it ride on the 10ks of the RTC would work?
Well. Not necessarily fix the issue, but.
Shouldn't hurt.
with i2cdetect I'm still occasionally getting random addresses popping up but not sure how common in general that is
It isn't.
So I went ahead and ordered some parts - The Sparkfun Qwiic hat, the Adafruit PCF8591 ADC (To replace the ADC I had on my custom board), and some cables to connect them. Preliminary tests show everything seems to be working.
So something changed on my custom board, which. Isn't a huge surprise since it was a little outside of it's original design at this point and there were a few extra wires attached.
Hi, any Linux gurus here?
What is needed to run Pygame program from command line without startx on Raspbian?
I get pygame.error: No available video device
It requires X to run, so you do need to somehow start it -- it's not a CLI program
pi zero 2 isnt in stock anywhere unless you wanna buy it for 90 dollars
should i just buy a pi zero or a radxa zero or banana pi m2 which one is faster
im trying to re encode mjpeg video to h264 so i can stream it via rtmp
Ok, thanks!
could X11 port forward it over SSH but that might be too slow for most games. Usually youd hook it on a TV if it's a linux device without a screen
you still have to have X running on the Pi to have something to forward (X is a client/server protocol, so the server has to run in order to display anything anywhere)
yeah but normally the server doesn't require a display and is happy if it can forward the client port somewhere else
the problem happens if I cant do either of these things
right?
correct - X does not require a physical monitor to be connected, but it does have to have some kind of "display" driver to initialize - iirc there used to be a "headless X" server option
I have some difficulty understanding why that is a problem anyway since I just run pygame off my rpi and the TV
the OP was trying to run PyGame without any kind of X server
ah I think I get it - like they didn't install the required packages for X and like the runlevel with X or startX before the display manager wouldnt work at all either since they dont have the barebones X packages installed ?
I'm just trying to start PyGame program quickly as possible from boot.
startx, pygame - done
there's ways of running just a barebones X server (no display manager) and then PyGame, but i don't know how well that would actually work
I should have said my goal on first post...
i would recommend starting with reading man startx
Ok, thanks!
i have atricky question
would i get better performance if i was live streaming with ffmpeg on a rpi zero with gpu codec (hardware accel)
or if i was live streaming with ffmpeg on a sbc thats 6 times better than the rpi zero (radxa zero) but im using software codec
so before I do a deadly mistake again