#help-with-linux-sbcs
1 messages · Page 2 of 1
you do step 5 regardless. it has specifics about command line parameters for dd depending on partitions
Yeah I could only see the second one and the caution because of an ad
dd is a bit opaque, no? Like it just takes as long as it takes and doesn't tell you how close you are to done?
The Act light is blinking up a storm so I assume something is happening
yep. dd is like that
Is there a website that would give update recommendations of packages or even better a list you can import into synaptic for a light bunch of important things to install ?
😦 it's too small for me to read
thanks; the issue is that I'm intentionally looking to use the GPIO for power input (e.g. with a PImoroni Wide Input shim) and the USB-C port to connect to a PC at the same time, since I anticipate the Pi being connected to USB ports that can't source enough current. sounds like you're saying there's no back-powering protection on the USB-C port.
an alternative might be to split power and data on the USB-C connection with an adapter like this:
https://www.pishop.us/product/usb-c-pwr-splitter/
Yeah. I put a schottky diode between the GPIO 5V pin and the external STM32 target it was powering, so that the STM32 could not try to power the RPI4 by reversing the direction of current source/sink there. ;)
and then either continue to provide power via GPIO and leave the power port on the splitter unused, or switch to using the splitter's power input instead of GPIO.
was the diode voltage drop okay for the STM32, or was it a 3V3 part anyway?
It's way out of spec to cut any wire in a USB cable and put a switch inline with it.
oh sure, I mean the Pi USB-C port isn't exactly spec anyway 😉
I think on that one I ran it 5.2 Volts on the bench supply (RPI 4 factory supply was to be matched; when it was on the bench I dialed it in as close as possible).
Someone said there was a PTC on the RPI board but I didn't find it on that schematic (if you could call it that) that rpi provides.
Looks to me like the VBUS bonds directly to what they're calling 5V.
Ordinarily that'd mean it's agnostic as to GPIO pin vs USB-C other than do not have BOTH at the same time. ;)
would be nice if the board had a jumpered or cut-trace option to turn on back-powering protection.
The boards aren't really designed for ornate projects. You're supposed to work with what they give you and use a conservative approach. ;)
I mean, gadget mode is pretty cool IMO. it's just that the Pi 4 is the only one in the line that can do it while not losing its host-mode USB-A ports, and it also happens to be the most power-demanding, making it the least suitable for gadget mode.
having some issues with vnc, can only see 3 items when trying to add packages 😦
expected vnc viewer to resize the screen but it just stretch it ...
can you provide more info? like what device you are viewing it on
hi all, i have a https://www.adafruit.com/product/4279 connected to a raspberry pi. i'm following along with https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/use-gpsd but i'm not sure how to get the correct usb /dev/ device for gpsd start options from this: root@raspberrypi:~# lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
do you know how to use dmesg?
if it knows it will be serial0 maybe there is a bad connection?
what is the error or symptom
from this I would imagine: sudo gpsd /dev/serial0 -F /var/run/gpsd.sock
I'm sorry I am not familiar with it specifically.
how to use optical rotary encoder? i've read the document https://docs.circuitpython.org/en/latest/shared-bindings/rotaryio/index.html here but it didn't work
I was told last year that rotary encoders don't work with Blinka using CircuitPython on a Pi. I don't remember why off the top of my head
can anyone help me why i am getting this error in raspberry pi pico...
i am trying to connect my camera ov2640 with SCL GP3 and SDA GP2
You might have better luck in #help-with-circuitpython - this channel is more for the Raspberry Pi computer
ok thanks
Is anyone aware of a CM4 carrier board that is powered through the PCIe port? I basically want to plug it in to the PCIe x1 port on my computer and have it so that I can access all the ports through the back of the computer
I don't even need it to communicate with my computer directly, just want it to like be there in the case
I’ve not heard of one but that would be pretty cool to see
Found this one, but it's just a physical carrier. Needs power from PoE or a USB cable plugged into the back panel, I think.
https://aliexpress.com/item/3256804386522898.html
Oh honestly that's perfect
oof that price tho
But yeah I guess I was more looking for something that could be inside my case
Yeah, not sure why it's so much more than other carriers.
Hi there, I’m looking to be able to use an RFID-RC522 module as a sort of ‘password’ for my raspberry pi. So instead of typing in a normal password you could just scan an NFC card/tag and that will give you access.
Is this possible? I’ve searched around for a while but haven’t found any useful information. If it’s not possible/is difficult to do then I’ll be fine with using a RPI Pico and type it in when scanned.
you probably want the well-established linux PAM framework (Pluggable Authentication Modules), and an NFC module that plugs into it. maybe this one, or one like it:
https://github.com/thomasread99/linux_pam_nfc
looks like "RFID" is a better search term for PAM modules
Okay thank you, I’ll look into that now. I didn’t realise NFC and RFID aren’t that interchangeable lol
For the DHT11 Temperature-Humidity Sensor, it is stated that Operating voltage : 3.3V ~ 5.5 V. Does using a 5v/3.3v voltage within the range affect longevity of the sensor?
I.e: Is there a 'better' voltage
do you have it already or you are thinking about ordering it?
Just looking at specs, I'm glad I picked the BME280 over the DHT11..
its not recommended by adafruit
the longevity issue will probably be that you want something better way before it stops working
What isn't?
Ohh, sorry.. you were answering CastingCat.
yeah
Yeah.. I picked the BME280 because it includes temp, pressure and humidity, but it turns out it has a better temp range and resolution anyway.. plus it's I2C.
dht11 seems less accurate than my skin when i read the specs..
Lol
I already have.
I'm on a budget so had to choose that cheaper one
Hi im having major issues with my PI 4B 4GB's wifi (wlan0), i tried everything and have been searching all day for a solution, right now I believe the issue is caused by the PI not wanting to go below channel 36 (5180Mhz) for whatever reason, and my router is channel 13(2472Mhz) and incompatible with 5G
The pi worked fine before but the last few days it just doesnt want to find any network because of this.
I have tried setting the channel to channel 13 via [sudo iwconfig wlan0 channel 2472Mhz, sudo iwconfig wlan0 channel 13] commands but when i go check the channel its quite frankly really random which one it sets it to ( ranging from 104 to 120 or 132 or the majority of the time channel 36 )
looks like you have conflicting histories in your main branch
How do I view the changes?
well first you want to "commit your changes or stash them" and pull, it should then tell you about conflicts that you can resolve
I already did the commit, idk what it means by stash, and I can't pull because of the pending commit
what does git status --short say ?
It's showing a false positive of a modification
what do you mean false positive ? if it's showing a modification, resolve it
git stash removes the changes and saves them in the "stash" which you can look at and restore with git stash list and other commands
you should then be able to pull and be shown the merge conflict
There's no changes between that file and what's on the repo
does git diff say nothing ?
diff shows the differences between the working directory and what is in the local git repository
what did you do ? did you make, commit and push changes from one computer and then make another commit from another computer without pulling and then try to push ?
if you do git log, and look at the history on github, do they match ?
I was able to get a pull while you were AFK
The only thing that actually changed on the Pi was a db file, which has an economy system in it
Luckily, I was smart and made a backup
Which, btw, the db file is what I want to push
so you committed it ?
So, idk
i think i figured out my issue, i believe my usb cable is charge-only and does not have the data wires 😦 i don't want to cut it to check because it's the only usb c to a i can find
didn't the push fail ? what is your situation now ?
It says it pushed, but GitHub is saying the last commit was made 16 minutes before the push. Last commit though was over an hour ago, so idk
oh I don't know what's going on
refresh ? check it's the right branch ? I don't know, sounds weird
I did refresh, lol
I don't know either
Maybe someone else knows
i think i know whats up
are you using forks ?
i think you need to force push your change.. it's being rejected because you're out of sync somehow
i find it's easy to get out of sync when you don't use forks and/or branches
or actually it says your local is behind the remote, so you need to pull in the remote changes, rebase your local changes on top of the updated remote, and then repush (probably a force push) for your branch (hopefully you're using a branch, if you're not you'll probably have a bad time)
It's already been pushed, we just don't know why it's saying "16 minutes ago" instead of like "30 seconds ago"
you committed it 16 minutes prior to push?
ie git commit blah blah, then 16 minutes later: git push
and then if you use pull requests/merge requests you'll also have that merge time..
Ah, ok
you can also do "git log" to show a log, it includes the timestamp for the commit
Which is better I2C or SPI for LCD programming?
basically canbus > spi > i2c. But you don't really need something fast for an LCD because the printing of information is going to be slower than most thing you could measure and want to display , crystals in it can take 200-300ms to react and it refresh about 50 to 200 times per second at most so even i2c is overkill for it
I'm just gonna put some stats on it like CPU to Temp to Activity
if by LCD you mean small character displays, not graphical ones
it goes back and forth with a delay
it's a 16x2 Character Display that fits on the Amiga 1200's HxD floppy Drive emulator LCD
yeah these are super common but the display controller matters more than the characters it can display
and 16x2 LCD that looks the same might be made by different companies, have different specs and different display controllers
got mine from Adafruit
also i2c need an adress to properly select a device, two devices with the same adress spells troubles
almost all of them seem to use the HD44780 or a clone as the controller
sometimes you can't change them
as the camera question this morning
where as with SPI you can use the chip select pin to select exactly which one you want to use
also SPI don't require annoying pullups
if you have enough available GPIO lines, you can directly talk 4- or 8-bit parallel commands to the HD44780, which might be easier in some cases
well I'll have to short SPI enable for the Backpack then
oh, Raspberry Pi is notorious for having trouble with I2C clock stretching, so if the GPIO expander on the backpack does that, that might another reason to prefer SPI
that's why I'm gonna use it it's just gonna be wired to the needed pins anyway
once I'm done coding what I want on the LCD I need to have it Auto Run when it boots up to my Desktop too
Can you safely power a raspberry pi zero through gpio by having it attached to 5v from a usb port
I bought a hdmi-mini hdmi adapter and blocks the micro usb power ports
Ah but still I can't use any USB peripherals in that case
Nvm
How might I end an active session on my raspberry pi remotely? Say a session is up on my pi that's running, and then i connect to my pi through my laptop, how would i go about ending the session on my pi from my laptop?
I would open htop and then guess what to kill. Probably cleaner and more pointed answers somewhere.
I found it
Look at the process table before and after a typical login.
There's probably a shell instance you can send SIGHUP or SIGTERM to, that'll end that login session (you're relying on the system to end the other processes 'for you').
Pretty much the same thing as when a (GUI based) login session crashes, and you're back at the Display Manager prompt (XDM, GDM &c.)
An ~/.xsession runs like a regular script, so it has the side-effect of keeping the GUI session active. So if your window manager is the last line in your ~/.xsession (if you have an ~/.xsession) .. then, when the window manager ends, so does the session itself (and you are once again back at the DM prompt).
is it possible to remove the usb connector on a pi pico and replace it with a male connector?
Certainly, but I don't know if those SMT pins will align exactly.
Desoldering and using wires should be fairly trivial.
You can find all the design docs and such there.
thank you!
I'm trying to recall... There might be a 3rd party board using the RP2040 with USB-C.
for me its not so much usb c thats important, its having a male connector instead of female (c or standard micro)
Fair
I'm considering designing a custom board myself, for a very specific project.. USB-C is definitely on the plans already.
Female though, just because standards.
nice
i would love to make my own RP2040 pcb too, but im still a beginner with electronics in general
baby steps i guess
Same here, but I love diving beyond my usual depths.. sometimes. Lol
I'd have to pay for assembly, just to be safe.
I'm not sure if it's a possibility for your needs, but they do make little male-to-male adapter dongles: https://www.amazon.com/BOLS-Adapter-Full-Featured-Support-Charging/dp/B08QR9DQDT/
this is actually what I'm trying to get away from 😅
its the easiest solution but it does add a bit of bulk to my project
You're basically not supposed to have specific combinations of connectors on the opposite ends of a USB cable. If you can't find it from a reputable supplier, that's because it's unsupported (like USB-A male on both ends .. that'd let two PC's blow eachother's USB power busses up).
3rd party to who? You mean like the Kee Boar Driver or the Feather RP2040?
I meant 3rd party as in not the official Pi Pico boards, so I believe that would apply.
🙂
The beauty of open source is you can literally download Adafruit's hard work and send it to the printer... with or without modifying it.
My main intent for a custom board will be for my portable weather monitor.
I want to incorporate the sensors, screen and buttons into one package.
Exactly. I am doing the same thing with something I have. Really the part I needed was missing so I am putting everything on one board.
There is more for this sort of thing in the help with hw design channel
I should have my OLED by the 16th, then I need to order whatever extra sensors I fancy.. I've already got some other bits in my stash. 🙂👍
How can I set the OTG port on my Zero W to act as a line input to my computer? I need to receive an I2S signal and output it as a USB audio device.
Has anyone else been getting an "Cannot build wheels" error when trying to install/upgrade a module from pip?
@agile depot use an I2S amplifier to 3.5mm jack?
@lucid nebula yeah actually i got one this morning coincidentally.
I know, right? So weird
Idk how to fix it though
it's not trivial. you'll need to configure the pi as a USB audio gadget, either with the g_audio kernel module or using about 20 lines of shell script to set it up with configfs. then you'll need to route the audio from the I2S sound card's output to the audio gadget's input.
I'm actually working on a project like that, but I'm at the beginning stages. my audio gadget is showing up as a single-channel device for some reason, and configfs parameters like function_name that the kernel docs say should exist for a UAC1 device... don't seem to exist.
there are a lot of examples of people making USB ethernet/HID/storage gadgets with raspis, very few for other classes of device like audio
anyway, searches for things like "usb audio gadget raspberry pi" or "g_audio gadget raspberry pi" or "uac2 usb audio gadget configfs" should turn up examples. the audio routing will be trickier; I think it can be done with ALSA, but I'm planning to use PulseAudio. more exotic options include JACK or shiny new PipeWire. you probably want to search for stuff about creating a "loopback" betwen two devices, your I2S card and the gadget audio.
Seems the Floppy Drive and Greaseweazle is using a bit more amps - how I can make sure the pi has enough power to power greaseweazle? it's through usb
Yeah i did this last night, would I need something like VLC or Omxplayer to play the I2S input through the audio gadget?
no, I don't think either of those will record from an audio input and play back on a different device in real time. there's the alsaloop command, which can set that up as long as it's running (and it has an option to daemonize to the background).
What would be the device name of the I2S input?
the name of your I2S input and gadget output are things you'll have to figure out. if you're using alsa, aplay -L and arecord -L should list names you can feed into e.g. alsaloop. for pulseaudio, pactl list sources and pactl list sinks can help. it may take some experimenting.
I did some experiments looping my webcam to my speakers, and I was able to pick a plughw device name from aplay -L and arecord -L and get a loop going with:
alsaloop -C plughw:CARD=WEBCAM,DEV=0 -P plughw:CARD=PCH,DEV=0 -t 20000 -n
Still having an issue. It's mainly pyproject.toml-based projects
@midnight flume Any updates on getting it fixed?
No and I’m the wrong person to ask.
Well, I'm working on that
Can I use alsaloop on the Pi's I2S input even if there's nothing connected to it or can I not use it until something is connected and communicating? I would assume the latter because the clock pin wouldnt be set.
I ask because I'm trying to set up my I2S ADC to use with it, but the parts haven't arrived yet. I still want to set it up so I can just put it together and (hopefully) have it work.
possibly dumb, one-off question. Can you drive a 64x64 RBG matrix with a feather rp2040?
I think this is the wrong channel for RP2040 related stuff, but i actually asked the same thing a while back and apparently yes: #help-with-circuitpython message
We're you successful?
I haven't tried yet, I can't afford a matrix at the moment 🙁
I just tried to get it to work with 2 32x64 panels and I can't get it to work. I know this code works on my MatrixPortal in 64x64. None of the guides make mention of the Featherwing for the rp2040 being able to do 64x64 that I saw
good evening, im looking for a recommended setup for putting a sdd on a rpi 4, whats a good setup to have one of those
as long as your ADC is attached and has an audio driver loaded, it should let you record from its input (or use it as a source for a loopback), even if there's nothing connected. the ADC likely doesn't know or care if you have anything plugged in, it's happy to sample whatever noise might be on the traces to the audio input jack(s).
for testing, you could load the snd-aloop module that creates a virtual sound card with a pair of loopback devices (I haven't tried this). whatever you play on one device should appear when you record on the other. you could set up an alsaloop with your gadget as the output and loopback device 0 as input, then play something on loopback device 1, and it should flow through the loopback device, through alsaloop, and appear as audio output from the gadget on the host.
https://sysplay.in/blog/linux/2019/06/playing-with-alsa-loopback-devices/
Any chance I can get the VL53L4CX distance sensor working on a Raspberry Pi with Python? Circuit Python unfortunately does not support the VL53L4CX sensor.
no driver for the CX unfortunately
is there a good way to test display resolutions? Trying to force a custom rez and not sure what the highest refresh rate it will work at
xrandr maybe .. I don't remember what system Rasbian uses to do video on this harware (RPi3/4).
xrandr --output HDMI-1 --mode 1920x1080 .. something like that
xrandr by itself will name the device .. and tab-completion works in the shell.
Hey, got the Raspberry Pi CM4 IO board and some i2c problems.
Linux shows following i2c buses in /dev/:
0 1 10 20 21 22
i2cdetect -y X is completely empty, regardless of devices connected.
There is the exception of both 20 & 21, which are completely filled with seemingly gibberish.
Config.txt (only used parameters, in order):
disable_splash=1
max_framebuffers=2
armboost=1
arm_freq=2000
dtparam=i2c_arm=on
dtparam=spi=on
disable_overscan=1
enable_uart=1
camera_auto_detect=1
display_auto_detect=1
arm64bit=1
dtoverlay=dwc2
dtoverlay=vc4-kms-v3d
dtoverlay=mcp2515-can0,oscillator=12000000,interrupt=25,spimaxfrequency=2000000
dtparam=i2c_vc=on
detailed i2cdetect output: https://pastebin.com/dtGYbWQm
dmesg output:
[seconds, truncated]
[ 1 ] i2c_dev: i2c /dev entries driver
[ 1 ] brcmstb-i2c fef04500.i2c: @97500hz registered in polling mode
[ 1 ] brcmstb-i2c fef09500.i2c: @97500hz registered in polling mode
i2c i2c-22: Added multiplexed i2c bus 0
i2c i2c-22: Added multiplexed i2c bus 10
[ 8 ] mcp251x spi0.0 can0: MCP2515 succesfully initialized
...
[ 44 ] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
[ 45 ] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
[ 46 ] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
...
[ 277 ] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
The timeout messages start to appear, once I start to i2cdetect 10 and 22 which also only scans one address per second.
Canbus does not show up.
I am on ubuntu server 22 for rpi4.
The hardware should be fine as I scanned it on ubuntu desktop before where it scanned fine.
I need all of the amp usage on the Raspberry pi so I can give it more amps for my usb ports I've done the boosting from 600 to 1200ma
as for GPU would using more ram increase the amp useage?
Using more system memory (like using 3/4 GB over 1/4GB RAM) should not increase the current usage
checked with my Greaseweazle and the 3.25" Floppy Drive it uses 1.0V which makes the pi have a minor under voltage, I guess I'll need to have a PSU for the floppy drive then
I need a speaker and microphone for the raspberry pi zero w. Every time I looked it up it gave a long video with a bunch of complicated solutions. Is there anything easy that I could do to get a speaker and microphone connected to it?
Easy... USB.
hm
how compact would that be?
I mean i'm not too picky, beggars can't be choosers, but i'd like it to be relatively compact
YMMV...
i've no clue what that means
talk to me like i'm 5 years old, I don't know hardware
Your mileage may vary.
as in it's different for everyone?
Like, it's just a thing you'll have to deal with... If you can find something compact, or not.
Sadly not.
that's alright, ty either way
by usb, you mean like get a usb c to otg adapter and then plug in a usb sound card, right?
nvm, i figured it out, ty for your help
Can anyone help me in understanding how to find frame rate for ov2640 camera module connected with raspberry pi pico
This channel is for Raspberry Pi computer questions, not the Pico. Use #help-with-arduino or #help-with-circuitpython for the respective language you are coding in.
But to find frame rate, can't you just calculate how long it takes to get and write a frame?
https://www.adafruit.com/product/1475
Like this...
Hey, still need help with #1017940177676685334
Hello all, Thank you so much for your help with my previous questions on this server. I am unable to find information on how to connect more than 2 SPI devices to the RPi. Is this possible? Can it be done the way it is with I2C devices, to use common MISO, MOSI, CLK lines i.e. all 3 devices are connected to this same SPI bus, but a separate CS pin for each of the devices to select them one by one?
Yep, see the "Independent slave configuration" section: https://en.m.wikipedia.org/wiki/Serial_Peripheral_Interface (SS in the diagram is the same as CS on the RPi)
The Serial Peripheral Interface (SPI) is a synchronous serial communication interface specification used for short-distance communication, primarily in embedded systems. The interface was developed by Motorola in the mid-1980s and has become a de facto standard. Typical applications include Secure Digital cards and liquid crystal displays.
SPI d...
hey, still need help with #1017940177676685334
Hı i am using servokit on jetson but servokit step just 1 degree, i want to more little step. How can i do.
I'm trying to open terminal via duckyscript on a pi400.
If I physically press
CTRL-ALT t
Terminal opens.
If I run
"CTRL-ALT t" in duckscript, it doesn't work.
What I think is happening is that the "Fn" key in between CTRL and ALT on the pi keyboard, is confusing the duck script.
The workaround is to run the whole process of opening and scrolling through the GUI menu with the
GUI(Raspberry key) +delay [2 lines]
DOWN arrow 6 times +delays [12 lines]
RIGHT arrow +delay [2 lines]
DOWN arrow 9 times +delays [18 lines]
ENTER +delay [2 lines]
This itself is more code than the entire script should be, by about 7 times lol.
Whereas "CTRL-ALT t" is just one line of code and should drop me directly into terminal.
I want to make a pi cluster, but I noticed that the guides I found say to use a router. Would using a managed switch have the same outcome?
how do i shut down a raspberry pi zero w? i don't have a connection to it because i was following an outdated tutorial
so all i have is a power cord into it and i don't wanna corrupt my micro sd card
i don't have ssh either
because i wasn't aware the default ssh account no longer exists
nvm i just pulled the plug while it was idling
it corrupted a few files but i was wiping the drive anyways
do i need anything else than a RPI to run two servos? like resistors or anytihng?
Anyone have any insight to my above question? still banging my head on the wall
what is your ducky script ? what library ?
you wrote you put "CTRL-ALT t" but it doesn't take "-"
so it would skip the line
i'm not too sure how electronics work, but if i'm putting my pi in a box, should i poke holes for ventilation or smth?
I would say no with a Pi Zero, they don't tend to run hot. Models like the 4 can if you run intensive stuff on it, which will decrease the performance because the chip will throttle itself
Ignore the qoutes
It doesnt?
I think I have an outdated doc if thatsthe case
each key has to be on its own separated by spaces
I thought I tried that. I'm gonna do it real quick now
Nope.
It brings up this wierd little search bar in the upper right hand corner of the screen instead of the terminal.
Same thing the other ones were doing.
a possible issue might be that the shortcut has to be help long enough, I don't know how long duckyscript holds the key presses
weird search bar ?
can open it by typing something on the keyboard ?
like is you type ALT-t or just t ?
try to see what triggers that
I don't know what it is is the problem
ah
what ducky script/library are you using ?
I'll snag a screenshot if I can of it.
I'm writing it.
At this point it's just opening the terminal, cause I haven't got past that lol
I've never done it sgainst a Linux machine before and it's not being cooperative lol
you write the code ? I don't mean the payload, the code that runs the payload
ok we can test to see if delays matter, what happens with the following code ?
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
kbd = Keyboard(usb_hid.devices)
import time
time.sleep(2)
for key in (Keycode.CONTROL, Keycode.ALT, Keycode.T):
kbd.press(key)
time.sleep(0)
kbd.release_all()
time.sleep(1)
I've never seen that text bar before.
ok what if you change time.sleep(0) with 0.5 ?
Nothing
ah I forgot to import time
I always do
ah no I didn't
it doesn't error either ? do you see the REPL in case I made a typo...
how do you rerun the script ?
I am wondering if you unplug it and plug back in it might need a bigger delay at the start
I'll throw a big delay in there and try
Didn't help
I'm gonna try to see what that process is called
why does this happen when i try to open vscode on my raspberry pi zero?
i believe segmentation fault means that it's trying to access memory that it's not allowed to
should i elevate it or something?
wait no it's memory that's not reserved
I’m silly, was trying to run 64x software on 32x architecture
How do I connect matlab to a raspberry pi? Which boards are compatible
any recent easy way to configure the root filesystem as read-only in Raspberry Pi OS, like DietPi's config toggle? I know it's historically been very difficult in the official OS.
I did find that article, but it says it's only for the /boot partition. maybe the raspi-config option covers the root FS too, though, and the article doesn't mention it?
I'll have to try it out. the body of the article keeps talking about /boot, but the screenshots show a separate question about enabling overlayfs, which seems like it would cover the root FS.
thanks for the link to get me to take a second look
I've jumped SPI and here's the pinout for the pi to Adafruit's Backpack
it says Pi SCK to the backpack's CLK do they mean the Pi SLCK Pin?
It seems like this pin https://pinout.xyz/pinout/pin23_gpio11
The comprehensive add-on boards & GPIO Pinout guide for the Raspberry Pi
it's on and working now I just need to use Adafruit's LCD library to display CPU Temp, Usage and ram usage from the pi on the LCD
I'm thinking using 12c as I'll use pin 24 for amiberry and wish I could move that pin to somewhere else for the LCD
using 12c now instead as I'll need 24 for amiberry
okay how I can make this happen on my LCD using Adafruit's LCD library?
I'm reworking it
I need it to change to these two of the CPu status then to ram usage and loop back to the cpu status
I've tried everything to get it to display what i need as status
On my pi zero w, I’m having some issues installing the google-cloud-dialogflow package, namely when it gets to building wheel for grpcio
I just downgraded to python 3.7 because that’s what a tutorial said to do but
Idk if it’ll fix it, it’s currently still building wheel for grpcio
But lots of people say it just takes a long time to do that either way
after running it overnight, it still hasn't done anything.
does anyone have some advice that could help?
Still having an issue with grpcio, does anybody know anything that could help me?
I'm really miffed at USB on the pi 4 after discovering it's actually a downgrade from the pi 3 for full-speed devices. spent a month and a half on a project that anticipated using several USB audio devices, and finally trying it out, the pi 4 runs out of USB bandwidth after connecting just 2 of them. 😳 turns out the VIA VL805 controller/firmware is limited to about 10Mbps total for full-speed devices, across all USB-A ports. what in the what
reading more about it, a hub with a multiple transaction translator (MTT) may help; the built-in VIA hub is single-TT, so that tiny bandwidth is divided among all connected devices. I did try a USB2 hub and a USB3 hub that's supposed to be MTT and those didn't help, but I got to 3 audio devices with a USB3 dock/hub, so not sure what's up. I ordered another MTT hub with a VIA VL817 for testing.
nearly nobody puts MTT/STT in product descriptions or docs, so even finding one is an odyssey.
relevant thread; apparently it was even worse before a firmware update in 2020.
https://forums.raspberrypi.com/viewtopic.php?t=263124
maybe there's a CM4 carrier board somewhere that uses a MTT USB3 hub chip; that kind of search is just about as difficult. and not even sure it's a fix yet.
list of USB hub controller chips, MTT/STT capability, and some devices that use them:
https://improwis.com/notes/usb-hub.webt
@modern matrix what usb mic would you recommend? i'd like to record nature sounds from my farm
I'm kind of a hobbyist and more on the indoors side of recording, but what's your budget? I'm assuming you mean for connecting to a raspberry pi, given the channel, but a secondhand digital field recorder like a zoom H4N/H5 might be better at the task.
USB mics are usually indoor affairs, since they're expected to hook up to PCs. you might be interested in mics designed for video, paired with a USB or HAT audio input? maybe a Sennheiser MKE 200, Rode VideoMicro or VideoMic GO (mini shotguns, very directional)? or for stereo, x-y pairs are popular, like the Audio Technica Pro-24CM?
I don't have experience with any of those; my outdoor recordings have been lo-fi with a lavalier mic salvaged from a '90s car phone installation running into a minidisc recorder. =D whatever you get, for outdoor, probably wrap it in a "dead cat" or fuzzy/hairy windscreen to cut wind noise.
maybe this belongs in #help-with-audio, heh
yeah so i have a rover with a pi camera on it, and it'd be cool to have a mic on it so i could capture sound as well
thanks for the ideas - i'm going to dig in to them
Hello, its possible to make usb host cable like this for pico?
what I want to do is, connect ps4 controller to pico then pico to computer, and pico would act as ps4 controller
pico will be like proxy
you can do something like this (ps4 proxy) on arduino with usb host shield, but I can't find any usb host module for pico. I could use two picos, one as host, other as client, then communicate via serial, but it adds unnecessary latency.
I did some testing, and a multi-TT hub doesn't solve the "not enough bandwidth" errors when connecting 3+ full-speed audio devices to a Pi 4. 😔 I think I'm stuck.
what's weird is I can replicate this failure by putting those devices on a single-TT USB 2.0 hub and plugging that into my laptop, but then if I move the devices to a multi-TT hub, plug that into the single-TT hub, and plug that into my PC, it solves the issue. so it seems like there's a bug with the Pi's VL805.
I have some weird problems with cmake/make.
I'm currently on tinyusb 0.8.0~2 (232c1e591) and try to compile examples/device/cdc_msc for raspberry pi pico.
When I just run make BOARD=raspberry_pi_pico from the directory, the internal make call fails with exit.c:(.text.exit+0x2c): undefined reference to '_exit'
If I delete the build directory and run
cmake -S . -B _build/raspberry_pi_pico -DFAMILY=rp2040 -DBOARD=raspberry_pi_pico -DPICO_BUILD_DOCS=0
and
make -C _build/raspberry_pi_pico
manually (which is what the makefiles do internally), it builds without a problem
For some reason it wants to compile ELF2UF2Build with arm-none-eabi-gcc instead of gcc
Hey
Anyone online
I need help with my rpi and screen
It shows the rain bow thing then just has a blank screen
Tryna power from car
Red light sold green flashing
Maybe the SD card is corrupt. Is the green light flashing in a repeating, consistent pattern?
Fault codes will be a number (maybe zero) of long flashes, some short flashes, and 2 seconds of off.
Is this an HDMI display or a HAT?
Gpio
It works on another display
Hmm, then maybe the display’s software isn’t set up right
Try going through the setup process again?
It’s like a weird os called lineage so it’s supposed to mimic an android tablet but when I tried to update to sthe os I didn’t see a place to
anyone know if bare metal circuitpython on a raspberry pi zero w supports i2c?
it's been working great for usb_hid and stuff but idk if I can use a 128x32 oled with it through i2c
would this be the suitable channel to ask for help with installing circuit python libraries on a Pi or would #help-with-circuitpython be more appropriate?
Either channel should be fine, might as well ask here
Are there any good Apple ][ Emulators for Pi I could look at source and learn on how to code a cool Bare Metal Emulator based round a Apple ][ Emulator?
coding it to be a "bare metal" Emulator is gonna be tricky
it needs to have a keycode combo to pull up a menu and all of the settings into one menu and have it change model of Apple][ one wishes to use
I might see if I can use it as my base and code it when I learn how to
sadly confirmed that I could hook up like 5 USB sound devices on a pi 3 no problem, while the pi 4 starts throwing "Not enough bandwidth" errors at ~3. not a fan of its VL805 controller at all.
makes me imagine weird workarounds like a pi zero in gadget mode throwing audio across SPDIF hats to a pi 3 with a bunch of USB audio outputs
great...I have a Pi2B which I've installed Blinka on as per adafruits instructions and i've downloaded the libraries bundle 8.x from the circuitpython website, on a board such as a teensy it is straight forward just put the libraries in the Circuitpython/libs folder but how would I go about doing it on a Pi?
What GIPO PINS are connected the 3b+'s power led?
I could use the txd to have it on and show status
This is not the proper place to ask (this area is for broadcom devices, not rp2040) but people have used PIO to enable a second USB port on the Pico already, example: https://www.hackster.io/news/sekigon-gonnoc-unlocks-a-second-usb-port-on-the-raspberry-pi-rp2040-using-pio-state-machines-70d1f46c21fd
is there a soldier trick i can use to get a hub75e panel working on the Matrix HAT + RTC?
Does “Reached target network” mean that the pi has an internet connection?
no, I believe it means the systemd startup orchestration package has finished starting all services that are part of the "Network" runlevel. basically, stuff like the encrypted wifi connection manager "WPA supplicant" you see just above it. it's all running now, but doesn't guarantee a connection. for example, if known wifi networks are out of range and there's no ethernet cable plugged in, you won't have a connection.
https://www.thegeeksearch.com/beginners-guide-to-systemd-targets-runlevels/
I think there's a raspi-config option to make systemd initialization halt and wait for internet local network connectivity? I don't remember if it's still enabled by default.
under the hood it looks like it makes the DHCP daemon block the boot process until it's able to get an IP address assigned from somewhere.
Is this the place to ask about purchasing?
Ahh thanks
No, this forum is for technical help and discussions.
Alright im loosing my mind. I have had zero luck connecting my pi to my pc via ssh. Wether it is via USB or wifi.
It does not show up on the network, cant see it on the router and when im on usb it says "could not resolve hostname"
any ideas? running headless, no way to use the pi with a keyboard or mouse
Did you use the Raspberry Pi Imager to create your SD CArd? If so , did you enable SSH and your network info before flashing?
What do you mean by connect via USB if you are not using a keyboard?
headless setup info if it helps:
https://learn.adafruit.com/raspberry-pi-zero-creation
Hey guys,
I'm trying to send an advertisement via BLE of my Raspberry B3+ with the Circuitpython library.
The scan function works for me and I can find for example my Bluetooth LE Speaker.
`from adafruit_ble import BLERadio
ble = BLERadio()
print("scanning")
found = set()
scan_responses = set()
for advertisement in ble.start_scan():
addr = advertisement.address
if advertisement.scan_response and addr not in scan_responses:
scan_responses.add(addr)
elif not advertisement.scan_response and addr not in found:
found.add(addr)
else:
continue
print(addr, advertisement)
print("\t" + repr(advertisement))
print()
print("scan done")`
But I wonder how I could send only an advertisement for a specific duration? (15ms in this case)
I don't need to build up a connection to a peripheral so I tried this code:
import time from adafruit_ble import* ble = adafruit_ble.BLERadio() ble.start_advertising(advertisement, interval = 0.15, window = 0.15)
But this is not quite right I guess.
Thanks for your help!
How do I install zoneinfo?
Hello?I am having a hard time
configuring a blueatooth headset on a raspberry Pi Zero W
I installed bluealsa and have been able to stream audio using A2DP profile
but couldn't manage to make the microphone work
using SCO profile
Hello, hopefully someone can help:
I have Pygame 2.1.2 installed on Rasbian.
If I run .py file on terminal it uses Pygame 1.9.6 by default.
How do I change that?
I'm using command python3 ...
So the problem seems to be running the file as root
root having a different version than user would be vaguely odd to me
depends how you installed it, pip install or sudo pip install, in general it's preferable to not sudo if you can avoid it, but if you have to run as root, make sure you install as root
and possibly uninstall the local version
Ok, thanks!
Any recommendations for a camera module for the Pico W? ArduCam looked promising, but there's no official MicroPython support (C and CircuitPython are there), and I wasn't able to find examples of people using ArduCam's cameras with the Pico W. I came across https://github.com/namato/micropython-ov2640, but it's not immediately obvious to me whether this would work (even with basic modification) on the Pico W. CircuitPython has basic WiFi support on the Pico W now, but I've been having trouble getting an MQTT client to connect. Not sure if it's guaranteed that ArduCam's CircuitPython implementation would work on the Pico W anyway. Am I just barking up the wrong tree wanting to send low framerate video from the Pico W? Or, is it just early enough in the game that the camera ecosystem hasn't matured as much around the Pico W?
Trying out getting a remote desktop connection into my Pi
hello. does anyone know a circuit design to power up my rpi using 4 18650 batteries with charging?
The mnt reform (open laptop) uses
https://www.analog.com/media/en/technical-documentation/data-sheets/680324fa.pdf
They used four 18650 cells and provide three taps (one tap between each pair of cells).
86 megabyte pdf:
https://mntre.com/media/reform_md/mnt-reform2-operator-handbook.pdf
do you have an easier setup? like using tpu4056?
Tp4056 is a single-cell charger, it’s unfortunately not designed to handle the load or charge balancing for multi-cell batteries.
what can I use instead?
I wish I had an easy solution, but it’s not something I really have explored much. I know 4S batter management systems are available, you could technically combine one of those with a buck converter to step voltage down to 5.2V, but hardly a clean solution. There are definitely battery packs that hold two 18650s and output 5v, but I don’t know if there’s one for 4 of them…
https://www.amazon.com/gp/aw/d/B09NKFYHVK/ for what I was thinking. There are cheaper products, but the ones that are less than 20 USD on Amazon are a bit suspect…
assuming you don't need to DIY, the Nitecore F4 takes 4 18650 cells and wraps them in a charger + USB battery bank enclosure.
hmm, may be discontinued, though? this site claims to have a few in stock:
https://www.batteryjunction.com/nitecore-f4-charger.html
this is really nice. does it output enough current in 5v to support the use for a raspberry pi 4? 😄
oh its 5v 2a. i guess thats enough for a raspi 4?
yeah, it may depend on what you're doing with it or what else is connected to it. I think officially they recommend 3A, but I exercise mine lightly and I don't get the lightning bolt icon flashing on a 2A supply.
thank you man, appreciate it. but i guess i will just stick with the 1 tpu4056 for 4 18650 in this configuration
Are there any walk throughs for programming rp2040 on a custom board. I've tryed using the uf2 file for the pico, didn't work.
Just found this...https://github.com/earlephilhower/arduino-pico
I'm unable to upload a uf2 file to rp2040. I get 'A device which does not exist was specified'. Flash_Nuke.uf2 works but nothing else.
how are you uploading the UF2?
click and drag
where is that message showing up?
It pops up immediately after dropping the uf2. The device reboots into run mode.
do you have some drive software that runs like acronis or something ?
No (not that I know of). I am able to drag other files to the device, although they don't appear after rebooting, I don't get the error.
you're dragging the UF2 to a folder named RPI-RP2 in each case?
you have a custom board right ?
the pop up with the message is like an OS dialog window?
Yup
do you have a non-custom RP2040 based board to check basic expected behavior?
I don't. I was able to upload a flash_nuke.uf2 without error...
not sure how much of a success indicator that is though
what are the other UF2s that aren't copying over?
CircuitPython for pico
downloaded from here?
https://circuitpython.org/board/raspberry_pi_pico/
does your custom board use the same QSPI flash as the pico?
I don't believe it is exactly but close enough? W25Q16JVSNIQ
sry. i'm not going to be much help on what might matter between those two. at least not off the top of my head. but maybe there's some minor difference?
It's cool, I just need to figure out how to complie cp myself. Then its easy enough to make those values match and test it. Thanks for your help.
it's a weird error message that might mean a hardware issue, it doesn't fail after installing the UF2 and running it, but immediately
I'll admit the board was designed by an amateur. But I was expecting it to be a bit more stable. Now I can't get it to bootsel at all.
'Amateur' might be generous.
I figured it out. It was hardware (or designer).
Although no examples showed it this way, the designer wanted to consolidate the reset and bootsel buttons into one button.
After cutting the trace joining the two functionalities, the board worked like charm.
Time to take a break and think about what I've done.
That's something my parents told me to do often.
I was a little punk
I've gotten that pi fan for my 3B+ and wish to use it to keep the CPU Cool when I use Amiberry and since it's gonna be inside my amiga 1200 case, fan blowing in or out?
if it is primed to take heat from the source, out I'd figure, I can imagine many complicating factors to the question though
any airflow through the heatsink(s) is a massive help either way though
afaik exhaust fans work correctly and fans that pull air into a cabinet create nodes (like surfing a 'hole' in a river in a kayak).
So, exhaust fans, as with PC power supplies. The air comes in from the far side of the chassis, and is pulled through the power supply, and exhausted at the fan's port.
hello guys, I am new here. can I use this level shifter to control ws2812b led with a raspberry pi in high speed?
This is TXS0108E
Yes, the level shifting capability is plenty fast enough.
@turbid rivet you mean for this TXS0108E level shifter?
Yes
[Software] [Linux] [Pi OS] [Non-pi hardware]
Hello PI users, I am delighted with RPI os, and even almost daily-drive a PI-OS Desktop on my X86.
- The LiveCD function saved some of my laptops.
Now I am looking to burn it to CD, with addition of some data recovery and disk managing programs. - I know, I'll better have a different distribution built for that, but there's so many of them, and only PI-OS make me feel safe and at home.
@turbid rivet how did find out that it is fast enough, by the chip which is used on here?
The level shifter is likely a Chinese clone of https://learn.sparkfun.com/tutorials/level-shifter---8-channel-txs0108e-hookup-guide/
Given a ws2813 data rate is about 800kbps, and the level shifter is well over 100Mbps, the limiting factor is not going to be the level shifter haha
@turbid rivet sorry, my mistake. it is ws2812b not ws2813
Ws2812b is functionally equivalent in this context. Same answer applies.
okk
If there does exist such a toolset for pi OS similar to that of windows or Ubuntu, I would be very surprised, especially considering the typical installation of pi os is to use raspberry pi imager on a separate device to format and flash an SD card. I’be never tried to run pi OS on an x86, but aside from any third party tools, I think the best way to back everything up is to save an image the entire drive or archive your home folder?
I've never used a PI installer before, rufus totally covered me up.
The Desktop PI OS on my x86 works fine, totally covers my productivity and gaming needs
I know that PI os is just debian in disguise, but I like it as is, with LXDE environment it has to offer.
On one of the computer science lessons, we were told to make a special iso version of Windows PE using some proprietary software, with included programs. I kinda don't like to tinker with windows much, even though I barely an experienced user in linux.
Pi OS for PC wont fit on a CD. You need at least a DVD.
It would be much easier to use an USB drive. You can simply write the Image to it and Boot your PC.
I have a really old laptop that doesn't support USB boot
Although I am looking forward to network boot
Just don't know where to start
Oh that is really old. I dont think it will run on such a Laptop.
Yeah, that's why I think choosing other one is an option
I have never used network boot at all.... sorry
Me too.
I've asked some network guy in our passion project server in hopes that he knows
I think to choose different linux, I know for sure it's gonna be debian
Debian with lxde Desktop is very close to pi OS.
Here you can get a net install cd and it should work. But be Sure to use an older Version. Like stretch.
So far, I think there is no more lightweight GUIs than LXDE
I know, I have to build stuff myself, just I'm afraid to do that alone. That's why I'm here, in the closest place related to linux as my interests get.
Ok. Try it. Download the debian net install Image. Burn it to CD, give you Laptop some Internet and See if it works.
If you just want to Boot and rescue files, knoppix can be something for you.
I think my primary goal right now is to restore the disk, because it's so proprietary, I don't have the fitting tech for it
other than this very laptop.
I'd also like to do some more networking stuff later, mainly hosting a file server on my linux machine
Then search for knoppix. It is made for this Tasks.
For amd64 I usually install from hard disk, with a grub custom file:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Debian Installer amd64' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos2'
legacy_kernel '/deb_inst.d/hd-media/vmlinuz' 'quiet'
legacy_initrd '/deb_inst.d/hd-media/initrd.gz'
}
# /etc/grub.d/44_custom (END)
It'll look for a companion .iso file. ;)
I will ask again to make sure. will I run into any compatibility issues? because one guy tested this shifter and said that the led flickers with it
The best anyone can do is help you understand the specs, unless you get real lucky and find someone who has used the exact part you're looking at. Sometimes you just gotta buy the part and hope it will meet your needs. Sometimes it won't, see about arranging a trade or see if you can use it in a different project. I learned this the hard way paying in excess of US$700 between a Ublox ZED-F9P and ZED-F9R (and antennas to go with) but I figure I can find something to do with 'em (build a public corrections data base station if nothing else with the base station unit).
Even if someone has used exactly the same part from the same provider, there's almost always going to be a difference in specific use cases; so someone can at best tell you how it worked out for them for their use case, but no one's really likely to be able to guarantee it will work for yours.
Hello, my pi 4 randomly stopped booting and now the screen is just black
The green led flashes 7 times before turning off for a little bit, and the red one is solid
https://support.pishop.ca/article/33-raspberry-pi-act-led-error-patterns Scroll down a bit and you can find a list of error codes for the 4.
If your Raspberry Pi board isn't booting, and the green 'Act' LED is flashing, count the number of flashes to look up which of the following issues that indicat
Looks like a kernel image not found error. Try flashing raspbian on another sd card and try booting from it.
Update: I tried a couple other SD cards, one of them never before used
Kernel.img was also on the old and new cards
Try booting from a bootable USB stick.
Do I just boot it up with no SD and a USB?
USB flashed as normal
Yup. Idea's to rule out a hardware problem with the port.
At that point I don't think you can say it isn't and must suspect it is. Whether that's a bent wire in the socket, messing up the connection with the card, or something with the disk controller connected to the port. If USB works but port doesn't, even with multiple cards.... it's the port or something between port and CPU or port and RAM... and that honestly doesn't leave a lot.
If it turns out it's the port, then I'm likely going to have to do it from USB forever?
Also, if you have anything connected to it and also connected to something else, disconnect those things. I get a no-boot situation if one of my GPS receivers is plugged into I2C and also into USB on my tablet... guessing something funky with power going places it isn't meant to.
Or find a way to fix the port.
The only thing I had plugged in was the HDMI and the power
I'll try without HDMI just in case too
Well, USB worked
Thank you
Prolly the SD port then. In a lot of cases, that's a bent wire inside the port. might be able to bent it back in place or repair it. That's beyond my ability to walk someoen through though; you might be able to google som instuctions on that thopugh
Good news! I can now boot USBs with a new ISO that I've burned. It was a wise choice, but now I have to choose which OS to Live CD
While trying out RP-D OS, I've got kernel panic (it's too modern)
I have a pi400 (and other on the way - thanks for having them in stock adafruit) and have a cyberdeck board. I shut the pi400 down, unplugged, attached the cyberdeck, then booted and checked i2cdetect as I have an LCD on the way and a RTC to attach. Well with nothing attached I get the following:
pi@pi400:/sudo i2cdetect -y 20
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: 08 09 0a 0b 0c 0d 0e 0f
10: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20: 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
30: -- -- -- -- -- -- -- -- 38 39 3a 3b 3c 3d 3e 3f
40: 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f
70: 70 71 72 73 74 75 76 77
pi@pi400:/tmp $
I also shutdown, removed the cyberdeck and booted to try again. Same result. I have zero other modifications to the pi400 and am up to date. It's booted via a nvme->USB adapter.
That's pretty normal for that bus. You ultimately only care about busses 0 - 7 (minus 2 and 7). I'm not sure what the 10's and 20s are; but they're not the ones you should be looking at.
Oh that's funny. So the first thing I checked on the pi400 was "ls -al /dev/i2c*" and saw the 20 and 21 busses. So this AM I went into raspi-config and sure enough I had not enabled i2c. Got bus 1 now. Thanks for the nudge!
np, glad I could be of help. :)
I think displays show up on the higher i2c buses? like for fetching EDID info from HDMI.
I'm wondering about the Pi's Two 5V Pins can those be programmed to say turn off LED or another thing that been put onto the pins?
another thing how I have program in a LED to act as my power LED let's say I used pin 22 (GPIO 25)
here's what I was hoping for the Pi will turn on the Fan when the CPU's Temperature hits around 50-60 degrees C - and will keep on on until it's around 45 C - 38 C
I think those are just directly connected to the power supply, so can't be software-controlled, AFAIK.
a lot say you use a transistor to control the fan that way - as for my power LED how I can get that power up so I now the pi is on as it's in an Amiga 1200 case
is there a go-to microphone for raspberry pi? for example it seems like the pi camera 2 is the go-to camera
Hey y’all how are you? Has anyone successfully built a raspberry pi voice recognition app? I have been trying for months but I can’t seem to manage getting anything working correctly.
Have you tried whisper by OpenAI?
I’ll look into it. I’ve never heard of that.
I don't think it will work on real time though.. check this out https://github.com/openai/whisper/discussions/50
Is it possible on the raspberry pi Pico to flash a boot rom that I could use to support "native support" for a cut down version of a bespoke language that exposes only a certain subset of the hardware?
I don't think you can replace the boot ROM on the chip, but you can have it boot into your code as a second-stage bootloader to support your own environment.
It technically is open source so maybe it’s possible?
The boot rom is, let me try and find it
The process is not for the faint of heart so proceed at your own risk. There’s great potential to brick zee chip
It’s probably not advisable. Or very easy
Oh, I thought it was a literal factory ROM, not reprogrammable.
I believe with a JLink you would be able to load a new boot rom
But that kind of ruins the intended use of the chip. I think open sourcing the bootrom was more to bring transparency to the rp2040 first stage bootloader rather than encourage people to change it
Hi, I can’t for the life of my figure out what I’m doing wrong. Just trying to code a strip of neopixels. All the details are in this Reddit post. Ty!
thats incredible to know, ill have a look (just didnt know what search terms to look for before, now you have given me a great jumping off point)
a strip with dead pixels sounds likely. do you have another strip to see if it is dead pixels?
Unfortunately not. Might order a tiny strip as a baseline test for this purpose. Any way to check if the data is making it through the circuit without the lights? Just to cover my bases about other potential issues.
(Just a thought) adding a LED and resistor to data out might tell you if anything is making it through
If you have a oscilloscope that will work too
The boot rom is burnt into the chip at the factory so you can always (if the circuit works) load the BOOTSEL menu and upload a new .UF2 if needed so i don’t think you can brick the chip with faulty code
i want to avoid reflashing the whole rom every time, which is why i wanted to do it the way i asked, but i will be doing a 2nd stage bootloader
I was just saying that if your bootloader is boot-looping or some other problem nothing will stop the bootsel bootrom
how can I keep a raspberry pi from corrupting sd cards if it has sudden power loss
PSU, or read-only.
12V UPS + DC/DC converter to 5V
is there a guide on how to make it read only
@civic rune
How can I help?
I am trying to power one Pi Pico from another. I connected their VBUS >< VBUS and GND >< GND, but the second Pi does not seem to get any power. What am I missing? Thanks!
how is first pico receiving power?
There might be a protection diode keeping power from flowing back from the VBUS pin into the second Pico.
looks like there is for VSYS, but VBUS should just be a direct connection to USB pin, at least afaict
micro usb from computer
what is you indication that the second pico is not being powered?
I wrote a script that just turns on the LED and installed it on both Pis, both of them work when plugged in directly, but never indirectly
what is the script written in?
CircuitPython
I probed with a multimeter and it seems like I get 5V reading from the main Pi for about a second, then it drops to 0V
not sure if I'm doing something wrong
can you swap pico's to see if behavior moves to whichever one is being powered via VBUS?
which behavior, sorry?
the LED code not running
can confirm yes
my goal is to create a passthrough device, where one USB device goes into Pi#2, the data goes to Pi#1 over UART, and Pi#1 forwards it to computer
can you post photo of how the connection between the two is being done?
I soldered cables on VBUS<>VBUS, GND<>GND, GP0 <> GP1, GP1<>GP0
then I taped both pis back to back
will send pics in a sec
hmm actually, I think this may be a soldering issue (my first time)
if I press hard enough on my probes, I get consistent 5V reading on the main pi
but I get 0V on the other end of the same cables
when probing the light flashed on the main pi, and now both pis have their leds on?!
nvm, confirming this is a bad solder, moving the cable turns it on and off
had an adafruit raspi order voided; when I placed it, I didn't realize the cooldown on "1 per customer" is infinity. 1 per customer, forever, please find a different vendor. good to know.
I'm working on an RPi project - https://learn.adafruit.com/raspberry-pi-thermal-printer-one-time-pads?view=all - to make one time pads with the thermal printer. This project is an extension of the IoT thermal printer project - https://learn.adafruit.com/pi-thermal-printer - it seems that either one or both of these how-tos are out of date. Some of the packages in the "Pi Software Setup" step set do not exist. (ie. sudo apt-get update
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python-serial python-pil python-unidecode)
I'm using a Pi Zero W, fresh upgrade/update
It's the crontab that runs the boot like boot a python file?
anyone got experience with sending serial data from a pico? i can't find any writeups that i understand / do what i want.
it needs to be done over usb btw
I've got it again - I'm gonna play around to get a "bootup" Sound to play when the pi is turned on is there a trick for that?
look up rc.local
how are you programming the pico?
micropython
unfortunately don't know mp too well. not sure if it has equivalent capability as this?
https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial#usb-serial-console-repl-and-data-3096590
where the "data" serial output could be used
what kind of data ? you just need print() and anything able to read serial on the other side
I think it's possible but needs compiling (a compile time flag)
also sys.stdout for direct byte sending I believe (while print converts to string)
Any one out there's seen this before or knows how to resolve it?
[cmake] include could not find requested file: [cmake] [cmake] C:/Users/~/pico-sdk-master/lib/tinyusb/hw/bsp/family_support.cmake [cmake] [cmake] [cmake] -- Configuring incomplete, errors occurred!
-- Never mind, had to initialize the repo
i'm having a weird issue. i have a motor controller with usb. it works fine with my raspberry pi 4, but my raspberry pi 3 can't see the device when i connect the usb - nothing in dmesg or lsusb at all. is there something different with raspberry pi 3 usb ports compared to pi 4? running raspbian 11 on both
the pi 4 has two USB 3 ports in addition to USB 2. the pi 3 only has USB 2
can you get anything to show up on the pi 3's USB?
yeah other usb things work fine, keyboard mouse etc
maybe it's USB 3 only? could try the USB 2 ports on the pi 4 and see what happens. (the USB 3 ports are blue)
i don't think it's usb 3 only, or at least it doesn't appear to say that: https://www.basicmicro.com/RoboClaw-2x15A-Motor-Controller_p_10.html
yah, i doubt it is also
are you watching dmesg output when plugging in the board? like with:
dmesg -w
and then plug it in?
ok just got off work and able to mess with this more, i connected the roboclaw via usb the pi4 on a non-usb3 port and it works fine. dmesg reports literally nothing on pi3
that's super weird behavior
everything is same? same USB cable etc?
same USB port/cable works with some other USB device?
apparently my pi3 usb is not working. just tried a mouse in all the ports and no optical light on the mouse 😦 weird it worked not long ago
dmesg/lsusb reported nothing in each port on the pi 3.. dmesg had literally no log lines output when i was testing
just tried a brand new sd card + new OS, and none of the ports on the pi 3 work. dang
Where's the best place to buy a 3B+ starter kit?
They're pretty much sold out everywhere these days, all the Pis have a shortage
https://twitter.com/rpilocator tracks availability. You can get on Adafruit's "back in stock" list, but if you have already bought a Pi from Adafruit, you can't buy another right now. One per customer, and that means one, not one per month, etc/
I was just about to share their website rpilocator.com I’ve used it quite a few times over the last 6 months to pretty good success.
So if I took a Source Code for an Emulator how to get it to be bare metal on boot for the Pi?
That might not actually work, depending on how the emulator was written. Normally it would be using a lot of operating-system libraries and resources, so it would need to run as an application rather than in a bare-metal environment. If it was written to run that way, it'd probably have some instructions for how to get the Pi to jump straight to it from uboot or something like that.
no one made an atari 800 bare metal emulator for Pi - think of BMC64 as it forked Vice's emulator for that
Sounds like a real niche choice for a bare metal emulator. Is there a reason to want bare metal?
👋 if I do a compile/build of a C program on a Raspberry Pi 4, is there a single file (or group of files) I can move to another RPi 4 and install the program there? What if it was an RPi Zero instead?
Specifically, I'd like to build this program: https://github.com/raspberrypi/openocd once, and install it on many more RPis without having to build it each time
👋 if I do a compilebuild of a C program
Have an issue with a DHT11, maybe someone can help me understand what's going on. I give it signal high per spec, wait for a hit back, I get it, but it gets stuck in high?
For context, I don't have any resistors anywhere, just straight Pico to DHT11
int DHT11Read (){
uint8_t rBytes[5];
uint8_t cnt = 7;
uint8_t rBit = 0;
printf("Initializing signals.\n");
gpio_put(DHT_PIN, 0); // LOW
sleep_ms(18); // 18us
gpio_put(DHT_PIN, 1); // HIGH
sleep_us(20); // 20us
printf("Wait for signal back.\n");
for (int i=0; i<40; i++)
{
while(gpio_get(DHT_PIN) == 0)
{
printf(".");
}
uint64_t T = get_absolute_time();
while(gpio_get(DHT_PIN) == 1){
printf("/");
}
if (absolute_time_diff_us(get_absolute_time(),T) > 40){
rBytes[rBit] |= (1 << cnt);
}
return 0;
}```
For one, this looks suspicious between msec and usec: sleep_ms(18); // 18us
Also, printf() is a fairly heavyweight function that might also block on waiting for serial-port output, so if you're trying to do microsecond timing, you wouldn't want to include it in your timing loop.
Wow typo
Fair enough, so is the DHT11 always returning high after a read? Shouldn't it turn off and go back to low power mode?
I'm not familiar with its protocol off the top of my head, I'm afraid.
Ah got it, thank you regardless
It looks like the sensor will either pull the data pin low or let it float. Normally you'd want to have a pullup on the line. But if you don't have any resistors, the voltage you read once it powers down is kind of random.
It's not completely obvious that you're putting the GPIO back into input mode, so you may be reading your own high output.
I think you may be right
hello, im currently trying to make object detection using raspberry pi and tfmini lidar, currently im struggling to convert the data received by my code and converting it to send to the tfmini, if anyone can help pls lmk and i can go into more detail 🙂
https://www.adafruit.com/product/1995 - can this help solve my Greaseweazel power draw from the Floppy Drive I use?
pi 3B+'s max is 5.25 volts
Hello, I am using this python module to fetch the data from the MPU6050 sensor connected to my pi
https://pypi.org/project/mpu6050-raspberrypi/
is there anyway i can calibrate the sensor in the code by calling some sort of method/function?
And things got a lot more stable on my pi4 when I switched to one specced at 5.25V too
The TEAC Drive does take a lot resulting in Amiberry being choppy so I'll have to see if this will solve it - gonna get the Usb- styled one and get a Usb to barrel jack and the converter too that goes with it
I don't have Pi Mounts yet for my Amiga 1200 project
can someone help me everyrtime i put circuit python on my rasp pi it onlys give me the boot_out file
Bare metal Raspberry Pi? Or do you mean a Pico microcontroller?
You'll get better help in #help-with-circuitpython. This channel is more for using the Raspberry Pi hardware as a Linux machine. Pico is a RaspPi product, but it's also a CircuitPython-compatible microcontroller, which is better suited to the help-with channel.
We discourage cross-posting, but in this case, I'm suggesting it.
can anyone help me set up my raspberry pi pico to make it a bad usb for some reason i try every method and still not working
@mild helm please don't cross post in multiple channels
It takes a very long time.
even if i turn on off without delay 24 x7 ?
For what it's worth, this was a better question for a channel like #help-with-projects. This channel is for using a Raspberry Pi as a Linux computer.
ok sry
Yep! They're very simple. As long as the circuitry is correct, which it should be as it's built in, you're good to go for a long time.
No apology needed! Simply making sure you get the best help you can from folks here.
I have a raspberry pi 2b which is different, but to give a sense of scale it's been running and powered nearly 24/7/365 for 7 years and the power LED still works
so far i got more help than i expected , honestly
That's great to hear.
I am using influxdb python client, does anybody know how can i check if the database named X exists or not?
Howdy y'all. I'm having a really weird issue with my Pico W while trying to run a web server.
The Pico console indicates it has connected to the wifi. The wifi AP shows it as a connected device. Wireshark shows DHCP, then the Pico makes a DNS request followed by an NTP request (both of which get responses).
Then, while the Pico continues printing debug messages to the console, all that wireshark observes are ARP requests for the Pico that do not receive a response. The wifi AP logs say that a WLAN login attempt from the pico failed, and the Pico disappears from the AP's connected devices
I'm not sure exactly what is going on here. I assume this example works on the author's pico W, so it seems like this may be some kind of problem with my access point settings?
a github issue I made, although it now seems more and more likely that the problem is my AP, or LWIP: https://github.com/mongoose-examples/raspberry-pi-pico-w/issues/4
Hello,is there anyone who has tried to make a I2C sensor hotpluggable in Raspberry,my sensor is MCP9808
pi's are reliable little things
idk about the software but https://adafru.it/5159 will help with the hardware
thanks,I wanted some one who has implemented a similar think with what I am doing.
ok
are you the one who posted the same question on reddit aswell?
I loaded the pico w micropython firmware onto my pico w. Then I loaded a program onto it using rshell. I wanted to use the repl again, so I held bootsel and dragged the micropython UF2 into the pico directory. The pico is rebooting, but no serial device for the REPL is showing up
I was able to load another UF2 of my own, and the serial device shows up as expected then
anyone have any idea what's up?
this is on an m1 macbook air if it makes a difference
but I'm particularly confused about why my own UF2 works, when the micropython one doesn't. Especially because the micropython one worked earlier...
Discovering flash_nuke.uf2, will try that
That fixed it, ty stackoverflow...
so I guess my pico W just doesn't like my wifi? Python or C SDK. Other 2.4GHz devices work with my wifi, and the pico connects, it just drops shortly afterwards. Does anyone have any idea where I can raise an issue on this? It might be my access point's fault, but I'd at least like to debug it further. Is the pico sdk github a decent spot?
Well I guess it's probably worth me trying out a different access point from the closet before putting in a ticket...
So... Say I wanted to get my own version of the Raspberry Pi, and by that I mean an SBC that's very similar to a raspberry pi, but not exactly a raspberry pi. for example, it's replaced all the USB ports with USB3.1 ports and replaces the flash card with an M.2. How would I go about doing that? What kind of companies do I look for?
Before you go through a custom process like that, you should really look around for existing SBC alternatives that might match your specs. There are a ton out there with various different processors and features.
(Because the custom route will be very expensive.)
thanks, but part of it is knowing how to do it.
I mean, it's possible, but it's not too far away from saying, "I want to buy a Honda Civic, but it should have a Ferrari engine in it." You're looking at hiring an electronics design firm to do that sort of work.
Custom is always more expensive, that should be a given.
Yes, but do you really want to pay $10,000 for a Pi?
Maybe I do, maybe I don't. How about we don't gatekeep, and let me decide for myself? It's rather presumptuous of you to think you should be deciding for me that something is too expensive so you won't share with me what you know.
My apologies. The reason is because you're presenting as a very common pattern that I've seen before, of people who believe that if they can buy something for $50 at Best Buy, then they are willing to pay maaaaybe $100 for a customized version of that same product. Most people who know what custom electronics means would not be even entertaining this idea, or would already know how to go about pursuing it if they had the resources and good reason to do so.
But if you truly want to go down this path, you would engage the services of a custom electronics design firm, come up with a statement of work, downselect a chipset which meets your requirements, have them make a schematic which is probably close to a reference design, do a (pretty complicated) board layout, put together a Linux board-support package to support the new configuration, fabricate and assemble the board (probably two or three times to get it right), and then deliver you a custom Pi after several months.
I don't mind you saying something like "This is how you would do it, but you should know it's going to be xyz because of various realities of manufacturing." Just because I don't know anything about how to design custom electronics, doesn't mean I'm completely ignorant of custom products, such as custom made clothing, or custom built cars. Which, by the way, if you wanted a Ferrari engine in a Civic, it's actually pretty easily done. I might suggest a better engine, something more readily available that won't give you as many mechanical problems, like maybe an LS Swap, but easily done of course doesn't mean "inexpensive." Beyond the cost of the hardware itself, the Civic, and the crated engine to replace the Civics perfectly good engine which you may or may not be able to sell depending on the market, there's also the workmans time, which is not quite as expensive as a lawyer, but pretty close...
it really doesn't matter how closely one fits any given pattern, or how often you've seen it. people aren't patterns.
Thanks for this. I will be looking into it. 🙂
Out of curiosity, could you really get an engineering sample within 2-3 months, or would it be closer to a year?
Months seems feasible to me for something of the complexity of a Pi, depending on which chipset you end up with. It'll be pretty close to a reference design, and it's not insane levels of high-speed layout. Not easy, but also fairly well-traveled territory.
Highly suggest looking at Allwinner SoC. There are packages that are very maker friendly that don’t require PCB with blind/hidden via.
thanks! 🙂
This would be a good jumping off point if you’re curious https://github.com/petit-miner/Blueberry-PI
Does the Pico have HID that can be used as a usb device? and how many pins it has to do a full Keyboard like the Amiga 1200's if I done the matrix trick
If I have multiple sensors and one master will one LTC4311 I2C Extender work for having one sensor per 2 meters?
yes, and it's a total of 25 GPIO. There's a lot of projects out there that use it for keyboards, or smaller RP2040 boards
25 pins...may not be enough to do keyboard col and rows matrix from an Amiga 1200 Keyboard if I done one
@midnight sage How much control do you have over the matrix of keys in the keyboard? Best case, 25 pins could do 12 * 13 keys which is 156 total. But that means you have to be able chose exactly how they're all hooked up.
Amiga 1200 Keyboard have 106 keys to hook up to a matrix
Ahh, so the matrix is predefined. That means it'll depend on how it's laid out. Smart design might be 8 by x, which means with 25 pins, x has to be 17 or less. And 106 keys in an 8 by x matrix requires a minimum of 14 rows. So it could fit. Just no promises if it actually will.
that would be harder since it's a 31 pin ribbon cable so using a 31 ribbon connector that is SMD onto a board can work as a layout - someone used a pico for the Amiga 600 keyboard and I would do the same for the 1200's keyboard
did they use a GPIO extender or more likely a shift-register ? it's not uncommon with keyboards when you run out of pins
not sure I just wish to get this a1200 keyboard to become a usb keyboard for your computer
that's all I wish to do make the Pi Read the Amiga 1200's Matrix so I can use it as a USB Keyboard
though I think I would use QMK or KMK
That's easy to make into a workable usb keyboard the 1200 has the mpu on the motherboard and the pi has to read the matrix on how each key is pressed so getting that to work would be a pain
does anyone know discords with more activity related to the pico? I could swear I used to be on a pretty active one, but now I can't find it anywhere...
As for the LED goes how I can keep it on while it's on and it goes off when the pi shuts down like taker GPIO 25 and turn it into a power LED instead of using TXD
or use TXD GPIO and tell the pi to shut it off when I shut it down so I know it's safe to disconnect power
it's a microcontroller, it doesn't shut down and it's always safe to disconnect (unless you use it as USB drive, then you should eject the drive first)
how does TXD work as a power LED and shuts down when the pi is down with it's shutdown process
what shutdown process ? you are talking about a pico right ?
oh do you mean an led on the keyboard ?
LED to act as a Power Light since most projects are in cases
you can turn on the LED on startup or hardwire an LED (and resistor) from power to ground
it will turn off when you unplug it
I know it turns off when it done shutting down
that's not a pico
are we still talking about using a pico to make a keyboard ?
or am I lost ?
I'm giving up on that amiga 1200 keyboard idea I'll just focus on finishing the project I was doing
Pico can't really have col and rows on one GPIO pin to read out the matrix
without a Pi Pico for kicad version I have to use I'm screwed
Hmmm? You can make your own parts in Kicad if you want.
https://github.com/ncarandini/KiCad-RP-Pico this is kicad 6 now and I don't have the required opengl to use 3d viewer if I use it when I design my 1200 keyboard for the pico
You don't have to use the 3D features of Kicad if you don't want to, I think... It should work fine to make PCBs, which are 2D anyway.
I use it if I need to see how it looks like a youtuber found a workaround that works with this dell latitude by using an old open32 DLL it now works
here's what I had in mind to interface the Amiga 1200's keyboard with it's matrix
now connecting the Pins of the Keyboard's matrix is now the hard part
since the keyboard will be a USB keyboard do I use VBUS for usb power or use VSYS for direct power?
the layout of the board now just need to connect the 31 pin connector with GPIO pins since this is quite limited in pins
I might try something for the Amiga 1200 Keyboard using the MPC chip used - https://github.com/thinghacker/Amiga600KeyboardUSBAdapter
only issue is that I have the A1200 Keyboard's Keyboard Schematic and can't figure out the KB_Clock and KB_Data pins using this MCP23008 it can become a MPU for the keyboard
Anyone have good ideas for replicating interrupts (or similar RTOS features) in a traditional Pi linux installation? At the moment, my solution is to assign a GPIO pin to generate the interrupt and then enter a callback function. Originally, I was going to have component drivers set the pin high so the main program would detect the input, but I'm unsure if it's even possible to have a pin set as output by one program and input by another (or would have a well defined result). It should be easy to test once I get a chance, but if it doesn't work it's relatively easy to generate the input from an external microcontroller. The general program flow has processes communicating by setting OS environment variables that persist across processes shutting down and starting up, but I need a way to generate a priority stream in which the usual checks and action items loop ends and the program focuses on the priority action. My student's suggestion was to launch a new process but A) I'm concerned about the latency and overhead of spawning a new process, and B) it would seem that you still need a process running down a checklist to see if a priority needs to be spawned (even if it was short) and I don't know what that latency would be. Again, all easy things to test directly, but I thought I'd ask to see if anyone had a canned solution or known library.
I don't quite follow your scenario completely, but two things that come to mind would be (a) to send "signals" between processes, since this is often used for asynchronous priority events like abort requests, or (b) have a local socket connection between them to pass information back and forth.
What would "signals" look like in either C++ or Python? At the moment, we have larger information saving to files and operational parameters saving to environment variables, but right now it can take 100s of milliseconds to get to the part of the loop where you check if you should abort. (b) I can probably directly test the latency here, so thanks for the idea. I also would need to check memory usage of loading/linking the GPIO libraries vs. the TCP/IP libraries.
Please ask in #help-with-circuitpython as you'll get better assistance there. This channel is more for Raspberry Pi as a Linux computer. We discourage crossposting, but in this case I'm suggesting it.
I'm a bit confused about what you're trying to do here. You have a process that needs to notify other processes to do something? There are various IPC mechanisms to do that. ZeroMQ is pretty popular I believe.
Ed's suggestion of using signals and signal handlers sounds like a great idea too.
I'd be interested in hearing more about the specifics of what you're doing!
What're the implications of calling
system("echo 1 > /sys/class/gpio/value");
As opposed to something like
fd = open("/sys/class/gpio/gpio24/value", O_WRONLY);
if (fd == -1) {
perror("Unable to open /sys/class/gpio/gpio24/value");
exit(1);
} if (write(fd, "1", 1) != 1) {
perror("Error writing to /sys/class/gpio/gpio24/value");
exit(1);
}
I assume the system version is substantially slower since it's opening up some kind of shell? and I get less information back if it failed?
Yeah, the system spins up a new command shell, then runs /bin/echo as a new process. Whereas the second code is just calling library functions from within your app.
hello. does anyone have a concrete working guide to send sms using sim800l evb v2 with a raspberry pi 4? thanks!
hey can someone help with ds1307 rtc on pi 4
have connected it and edited the config but its showing 68 instead of UU
You want it to show UU? What did you add to the config file?
im following this guide
dtoverlay=i2c-rtc,ds1307
added this
And you saved this and rebooted the pi?
following this guide
yes i did
Let’s start with hardware: are you sure it’s a DS1307?
yep ordered it off pi hut uk
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. The DS1307 is the most popular RTC - but it requires 5V power to work (
this is it
And you have the coin cell battery installed in the module, yes?
yes
what does UU mean?
(Sorry, I doubt I'm gonna be any help solving the problem but this sounds like it may be relevant to some stuff I'm working on 🙂 )
Does this seem relevant: https://forums.raspberrypi.com/viewtopic.php?t=96838
maybe try sudo modprobe rtc_ds1307?
I'm just piecing things together here, but it sounds like UU means the address is being used by a driver?
lsmod | grep rtc_ds1307 might also be an interesting test
kindof it should be showing UU but for me its just showing 68
can you try that lsmod command?
that would tell you if the rtc_ds1307 driver was loaded
oh yeah after you modprobe it, it will definitely be there
what's i2cdetect say now?
showing 68 still
hm ok
what happens if you do echo rtc_ds1307 0x68 | sudo tee /sys/class/i2c-adapter/i2c-1/new_device
and then another i2cdetect?
hm so it looks like the tee didn't work
actually that's what mine says when I already have the device detected...
does dmesg | tail say anything interesting?
think so
hm ok that seems interesting
what about dmesg | grep i2c
not sure if that will print too much
ok and dmesg | grep rtc_ds1307?
[62965.030640] i2c i2c-1: Failed to register i2c client rtc_ds1307 at 0x68 (-16)
I feel like those i2c transfer timeouts are a bad sign
uh i hope its not a faulty rtc
can you use i2ctransfer to read something on the rtc?
like for the chip I'm working with, I can run i2cget -y 1 0x20 to read the 1 byte ID register at 0x20
if i use that says read failed
well I doubt you want 0x20
it would be quite a coincidence 🙂
that's just what my MCP9600 (a thermocouple amplifier) uses for its ID register
the DS1307 is almost certainly different
let me find a datasheet
maybe try i2cget -y 1 0x00
that seems like it should get the seconds register
if that says read failed, have you verified the SCL and SDA lines aren't crossed?
Error: Chip address out of range (0x08-0x77)!
Usage: i2cget [-f] [-y] [-a] I2CBUS CHIP-ADDRESS [DATA-ADDRESS [MODE]]
I2CBUS is an integer or an I2C bus name
ADDRESS is an integer (0x08 - 0x77, or 0x00 - 0x7f if -a is given)
MODE is one of:
b (read byte data, default)
w (read word data)
c (write byte/read byte)
Append p for SMBus PEC
let me check the wiring
wait I think I gave you a bad command
I was just searching my bash history but that i2cget command can't be right
you would have to give it the chip address (which is what it's complaining about when you try to give it 0x0)
ok this seems to work, intermittently, for me:
pi@raspberrypi:~ $ i2cget -y 1 0x60 0x20
Error: Read failed
pi@raspberrypi:~ $ i2cget -y 1 0x60 0x20
0x40
so you should be able to do something like
i2cget -y 1 0x68 0x00
and maybe try it a couple times just in case
if it matters this is where my scl and sda are wired
but it's interesting, that dmesg error code -16 is EBUSY
read failed error
tried it a couple times?
which is the CH bit set
and nothing else
according to the datasheet
so I think that is as expected
what happens if you do
$ sudo rmmod rtc_ds1307
$ sudo modprobe rtc_ds1307
$ dmesg | tail
add a sudo on the modprobe 🙂
ok well that looks pretty good
what's i2cdetect say now?
Ok I have a hypothesis! Those i2c transfer timeouts are the cause of your read failed messages with i2cget. You're getting a lot of them. That caused the rtc_ds1307 driver probe to fail (all the i2c tranfer timeouts at 55-60 seconds)
OH it is showing UU now
it attempted to probe the i2c device 6 times or whatever, then gave up
so you had to unload and reload the driver
to get it to probe again
and this time it succeeded
but that "unable to read the hardware clock" may mean that you just got lucky on the probe
and are still getting some kind of i2c bus error
out of curiosity how long are your i2c lines?
and how are they connected?
wonder if it has to do anything with bad soldering?
my initial thought would be long leads before bad soldering, but I'm not much of a hardware guy
hm that doesn't seem so bad to me
This was when i finished
oh ty for the pic that's exactly what I was about to ask for 🙂
The leftovers were snipped
what's going on with the blue wire
it doesn't look like there's any sticking out like all the others
maybe there's poor contact?
it is going through the holes for all
i just snipped blue wire first because it got stuck pointing up and it interfered
gotcha
yeah that's definitely a lot better than my first solder job, but it looks like a lot of solder and probably a bit cold? I'm still not very good at soldering, I could be misdiagnosing it
I don't see anything about it that's 100% certainly wrong
but I wouldn't rule it out as a source of issues
honestly this was my first which i would kinda call successful and i have been trying soldering for 2 years
will have to solder the rtc module onto a pi zero tomorrow im hoping I dont mess up soldering the pins
hm, interesting. How are you going to solder it onto a pi zero?
you're gonna like, solder the wires to the zero pins?
making a pwnagotchi so will have it soldered to the pins and will have a 3d printed casew for everything next week
already messed up the first time i tried soldering the pins bought flux to test on the rtc and it helped with getting the solder to stick this time
only thing to do now is to test the rtc before soldering it
thanks for your help 🫶
yeah any time! maybe someone else will have recommendations for improving i2c reliability
yeah seems like it stops every restart might try a fresh raspbia without desktop
after a restart, if you run lsmod | grep rtc_ds1307, you see it in the list right?
if so, I believe the problem is probably physical. I don't think the desktop would be interfering with I2C (but hey, maybe worth a shot)
after disabling the fake clock and setting hw clock seems to work now even after restarting thanks
how powerful are raspberry pi 4b's? I read they're pretty good, but to what extent?
how'd the soldering go?
assuming you've done it
Um not yet
also I forgot to mention, it looks like maybe the joints are a bit cold? One thing that helped me there is to make sure I'm heating the part, and not the solder directly. My understanding is you want to let the heat from the part melt the solder
I kinda messed up
how so?
I didnt solder yet though which is good
I bought a set of solderless hammer gpio pins and um it didnt go as planned
oof haha
yeah now just wanting to get them out wihtout breaking the pi in half
is there a preferred way to schedule a thread on linux? currently I'm messing around with clock_gettime and calculating how long I have to sleep
but it feels like there must be some std lib functions for this
Has anyone set up a headless raspberry pi with buildroot? I know how to do it using the OS that the RPi folks distribute, but I guess with buildroot I'm probably on my own?
Why I'd rather just solder the pins..
Soldering can be a scary idea for beginners who have to invest in tools and materials from nothing. I understand it as a fairly routine task, but I can't expect the majority to agree with me on that.
i have failed soldering 2 times but i gaveup on a non soldering idea and will try soldering again with better equipment.
Yes I was scared of messing up and breaking it again but clearly the hammer idea was worse
Did you use the jig, or hammer in the pins bare?
oh no it came as a kit like this https://www.adafruit.com/product/3413
i might have hit it too hard or had it tilt without noticing but it was on a flat surface
For anyone interested the soldering is going horrible now 
I don't suppose you live anywhere near seattle?
a couple of those dont look like there's great contact, at least to me
could post a video perhaps, if you want technique troubleshooting. But I think for me it just took me a while haha
So I built an image for my pi zero w using buildroot (not zero w 2), but I am having trouble making i2c work:
# lsmod
Module Size Used by Not tainted
ipv6 475136 12 [permanent]
brcmfmac 303104 0
brcmutil 20480 1 brcmfmac
sha256_generic 16384 0
libsha256 20480 1 sha256_generic
cfg80211 774144 1 brcmfmac
rfkill 32768 2 cfg80211
# ls /lib/modules/5.10.92/kernel/drivers/i2c/
algos busses i2c-dev.ko i2c-mux.ko muxes
# ls /lib/modules/5.10.92/kernel/drivers/i2c/busses/
i2c-bcm2708.ko i2c-gpio.ko i2c-tiny-usb.ko
i2c-bcm2835.ko i2c-robotfuzz-osif.ko
# modprobe i2c-bcm2708
# modprobe i2c-dev
# i2cdetect -y 1
i2cdetect: can't open '/dev/i2c/1': No such file or directory
# ls /dev/i2c
ls: /dev/i2c: No such file or directory
#
Maybe there's something I have to add to config.txt?
It's weird, I can load the modules and see them in lsmod, but nothing shows up in /dev/i2c
I've tried i2c-bcm2835 too and it doesn't give me any dmesg output, or make anything show up in /sys/class/i2c-*/
I think i managed to finally kill the pi
edit: its alive again
dtparam=i2c_arm=on did it, I was also mixing it up with dtoverlay
anyone have any luck connecting Pico device to ios using adafruit to emulate a mouse? I tried an the iphone recognizes the Pica as a usb device, but unsure how to test the mouse function properly.
Hey folks, I am really struggling and hoping for a lifeline here. I am trying to use ServoKit on a RPi with Ubuntu 22.04 installed (not RaspiOS) Anytime I try to use the ServoKit in my script I get an error in the trace coming from the AdaFruit.Blinka stating that there is "no module found RPi" Here is the full trace:
Traceback (most recent call last):
File "/home/dev/hexapod/software/raspberry pi/hexapod.py", line 30, in <module>
from adafruit_servokit import ServoKit
File "/usr/local/lib/python3.10/dist-packages/adafruit_servokit.py", line 35, in <module>
import board
File "/usr/local/lib/python3.10/dist-packages/board.py", line 44, in <module>
from adafruit_blinka.board.raspberrypi.raspi_4b import *
File "/usr/local/lib/python3.10/dist-packages/adafruit_blinka/board/raspberrypi/raspi_4b.py", line 6, in <module>
from adafruit_blinka.microcontroller.bcm2711 import pin
File "/usr/local/lib/python3.10/dist-packages/adafruit_blinka/microcontroller/bcm2711/pin.py", line 5, in <module>
from RPi import GPIO
ModuleNotFoundError: No module named 'RPi'
I'm assuming that this is because the Rpi.GPIO is no longer supported and the LGPIO is the "new" method of accessing the GPIO from Ubuntu. But I'm not sure how to go about fixing this in the long run... am I better off not using ServoKit???
If this needs to go to a different channel, please let me know... I was torn on where exactly to put it... 🫤
Figured this out... had to manually add the RPI.GPIO package. This still prevents me from using it without running Python as root though, but at least my scripts and servos are working now.
i would like to write a sensor class for the as5600 magnetic angle sensor for the raspberry pi. It uses i2c. What are some adafruit libraries I can use to interface with this sensor? Can i use micropython on raspberry pi 4? Should I use blinka? board? smbus? Any leads appreciated
Have you considered writing an IIO driver)
What is an iio driver?
Sorry got sidetracked
It’s a type of Linux kernel driver
Then you can read the sensor through /sys/bus/iio/devices
It might be more prudent to just write it in micropython or what have you, if you’re not sharing it between applications
And it looks like it has analog output. I assumed the output was digital via i2c, so idk if an iio driver would make sense
That’s usually for things already converted to digital
anyone know how to do a raspberry pi airplay system with the screen mirroring
like what u can do with an apple tv but with rpi
I made it using smbus. I will have to clean it up before I post it publicly. It’s very basic and has zero exception handling 😝
sounds like the code I write
I am having some trouble understanding this requirement. Do you mean you want to wirelessly stream to your raspberry pi and then have the raspberry pi render the stream on your TV?
Or do you just mean to connect a raspberry pi to the TV, in which case you would just plug an HDMI cable between the TV and the Pi
Or do you want the raspberryPi to somehow wirelessly connect to your TV? which I don't understand, again, because some streaming device would ultimately be needed to connect to your TV so why can't it be the Pi itself
raspberry pi with hdmi and then using airplay mirroring to the rpi
I was recently working on displaying text to a ePaper display and ran into a similar problem. You can programically import a python library that is not where the rest of your python libraries are.
Why this helps you: if you place the library in /home for the usr, you may not need to keep using root. Also, you can register the .py has an executable with "sudo chmod ...".
Anyone know how to fix this, I was trying to repair my corrupt sd card that has the raspberry pi os
Is the problem that the partition is mounted?
no
Well it has warnings that the partition is mounted, and is read only. What does ‘mount’ say? Is it mounted RO? If so you can remount it RW
(I can dig up the command if needed, mobile atm)
And looking at the man pages, it appears that if you pass it the -n flag it won’t attempt to fix anything?
i've seen a ton of raspberry pi camera projects and i've made my own, but i don't know how they've coded it to work off of buttons only with no keyboard. every one i've seen has neglected to mention how they did the UI or button coding
A pushbutton is GPIO in 'input' mode. There's probably a cpython module for that. Since this is Adafruit server, you may want to check out, I think it's called, 'blinka' to provide functionality similar to CircuitPython (it may even be branded as such).
A RPi3 or 4 is basically a host PC running a variant of Debian Linux.
Most host PC's do not have any GPIO you can use; the RPi3 and 4 do.
is it possible for a pi pico W to break even with a very light bump or something like that. i have a brand new pico w board worked fine the whole day and now all of a sudden there is nothing. power supply works fine but no comport and no bootsel
try a different port or a different computer
hi guys, just a quick question about neopixels on Raspberry Pi... I have a function that turns some pixels (on or off, different colours) in a matrix made of 3-4 ws2812b strips... The issue is that now suddenly the colours are really off (for random pixels) and I am wondering if that would mean the strip is damaged?
Today I etched new Raspberry OS onto an SD card and turned the Pi on and off quite a few times to reinsert the SD card as Pi didn't recongnize my display (which has been solved now). Is it likely that this turning on/ off could have damaged the strips?
I would never disconnect the strips before turning my Pi off and nothing bad ever happened...
ok just remembered that I had a spare 5m reel of neopixels and it looks like this extra strip is perfectly fine...
hello everyone, me again; this tutorial here https://learn.adafruit.com/neopixels-on-raspberry-pi/raspberry-pi-wiring says that there can be only one neopixel strip attached to pi, even though there are 4 pins capable to carry out the task... why?
This page (part of the same article) explains 'why':
https://learn.adafruit.com/neopixels-on-raspberry-pi/overview
It's a Raspberry Pi, which is quite different from a microcontroller.
Microcontroller is far better at this particular job.
thanks @faint sparrow. Would it be possible to somehow extend the Pi with a microcontroller just for the sake of the extra PWM pins?
The SeeSaw module does something similar and is a good model for initial consideration.
sounds promising, lemme have a look 😄
something like this? https://www.adafruit.com/product/3657
oh lol the same link 🤣
thanks!
Yeah I don't know how you'd mod it for controlling more than one strand.
btw, I just ordered a couple Pi Picos the other day, would they also be good enough for the job?
I would say 'get one SeeSaw per strand' as a quick feasibility study.
I think the Pi Pico might support more than one strand directly but I'm not an RGB person - a strip of eight taxes my interest quite a bit. ;)
hah cool
APA102 is so loose you could set one up with a morse code key, I bet.
yeah, I was looking at Pico's pin diagram the other day and it looked super capable!
But the ws series is precision timing oriented.
hmmmm a silly question, because I feel like I could be after the wrong thing
I know adafruit makes a multiple strand breakout board. I don't remember what it brings to the equasion besides the physical wiring.
just above I have described a neopixel reel failure (probably gave it too much of a workout). Is the ws2812 the right choice for a strip of LEDs that I want to be individually addressable, have different colours and very quick to turn on/ off
I don't really care all that much about fancy 'wave-like' transition effects
is this what that super time precision is all about?
Here just to set you back to zero:
https://learn.adafruit.com/1500-neopixel-led-curtain-with-raspberry-pi-fadecandy
lol, seen this one, legend!
;)
Um I think they said persistence of vision is better with APA102 but I don't remember.
NeoPixel is inherently timing-sensitive, from what I understand. I was suprised to find that APA102 was so easy to update. I did a very rough bitbang to set mine up and it was just fine.
(Pimoroni Blinkt)
huh, interesting!
I also have a serial interface (like a Hayes SmartModem, including the AT command structure) based display from Lumex. 96x8 pixels (768 if they're all lit at once) and it comes in at just about 1 ampere 5 vdc.
does apa102 require super special GPIO pins like neopixel, or would Pi handle let's say 12 strips of 50?
I don't know how many GPIO pins the Pi has. ;)
40, out of which 26 are usable
I would think that a string of shift registers might be used though.
take away ground, voltage, blah blah blah etc you arrive at 26 if I remember correctly
Put it this way: if you could come up with a project to blink 26 LEDs independently - simple LEDs no RGB anything ..using that Pi, then you could probably do a full APA102 on the same wires.