#help-with-linux-sbcs

1 messages · Page 2 of 1

civic rune
#

nope, I see

#

I was reading on my phone and ads got in the way

steady rose
#

you do step 5 regardless. it has specifics about command line parameters for dd depending on partitions

civic rune
#

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

steady rose
#

yep. dd is like that

meager girder
#

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 ?

meager girder
#

😦 it's too small for me to read

modern matrix
#

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.

faint sparrow
#

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. ;)

modern matrix
#

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?

faint sparrow
#

It's way out of spec to cut any wire in a USB cable and put a switch inline with it.

modern matrix
#

oh sure, I mean the Pi USB-C port isn't exactly spec anyway 😉

faint sparrow
#

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. ;)

modern matrix
#

would be nice if the board had a jumpered or cut-trace option to turn on back-powering protection.

faint sparrow
#

The boards aren't really designed for ornate projects. You're supposed to work with what they give you and use a conservative approach. ;)

modern matrix
#

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.

meager girder
#

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 ...

fickle rose
worn drift
#

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

Adafruit Learning System

Find yourself, and your Pi, using a GPS HAT

cunning fjord
#

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.

gritty gate
vocal lava
#

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

signal solstice
#

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

vocal lava
signal solstice
#

ok thanks

sacred oar
#

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

hard pike
modern matrix
sacred oar
#

oof that price tho

#

But yeah I guess I was more looking for something that could be inside my case

modern matrix
#

Yeah, not sure why it's so much more than other carriers.

sacred oar
#

Yeah

#

Thanks so much for finding that for me btw!

shrewd dune
#

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.

modern matrix
#

looks like "RFID" is a better search term for PAM modules

shrewd dune
#

Okay thank you, I’ll look into that now. I didn’t realise NFC and RFID aren’t that interchangeable lol

robust copper
#

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

meager girder
#

do you have it already or you are thinking about ordering it?

zinc jackal
#

Just looking at specs, I'm glad I picked the BME280 over the DHT11..

meager girder
#

its not recommended by adafruit

#

the longevity issue will probably be that you want something better way before it stops working

zinc jackal
#

Ohh, sorry.. you were answering CastingCat.

meager girder
#

yeah

zinc jackal
#

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.

meager girder
#

dht11 seems less accurate than my skin when i read the specs..

zinc jackal
#

Lol

meager girder
#

plus it uses bitbang i2c

#

what was dat lol

robust copper
robust copper
thin wagon
#

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 )

lucid nebula
#

Someone help me please

tired marsh
# lucid nebula

looks like you have conflicting histories in your main branch

lucid nebula
tired marsh
#

well first you want to "commit your changes or stash them" and pull, it should then tell you about conflicts that you can resolve

lucid nebula
#

I already did the commit, idk what it means by stash, and I can't pull because of the pending commit

tired marsh
#

what does git status --short say ?

lucid nebula
#

It's showing a false positive of a modification

tired marsh
#

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

lucid nebula
tired marsh
#

does git diff say nothing ?

lucid nebula
#

It's showing the previous commit I made on my laptop

#

@tired marsh

tired marsh
#

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 ?

lucid nebula
#

I did pull it, I used clone

#

@tired marsh

tired marsh
#

if you do git log, and look at the history on github, do they match ?

lucid nebula
#

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

lucid nebula
tired marsh
#

so you committed it ?

lucid nebula
#

I think so?

#

It got pushed but says "16 minutes ago"

lucid nebula
worn drift
tired marsh
lucid nebula
tired marsh
#

oh I don't know what's going on

#

refresh ? check it's the right branch ? I don't know, sounds weird

lucid nebula
#

I don't know either

#

Maybe someone else knows

worn drift
#

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)

lucid nebula
#

It's already been pushed, we just don't know why it's saying "16 minutes ago" instead of like "30 seconds ago"

worn drift
#

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..

lucid nebula
#

Ah, ok

worn drift
#

you can also do "git log" to show a log, it includes the timestamp for the commit

midnight sage
#

Which is better I2C or SPI for LCD programming?

meager girder
#

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

midnight sage
#

I'm just gonna put some stats on it like CPU to Temp to Activity

twin helm
#

if by LCD you mean small character displays, not graphical ones

midnight sage
#

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

meager girder
#

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

midnight sage
#

got mine from Adafruit

meager girder
#

also i2c need an adress to properly select a device, two devices with the same adress spells troubles

twin helm
#

almost all of them seem to use the HD44780 or a clone as the controller

meager girder
#

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

twin helm
#

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

midnight sage
#

well I'll have to short SPI enable for the Backpack then

twin helm
#

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

midnight sage
#

that's why I'm gonna use it it's just gonna be wired to the needed pins anyway

midnight sage
#

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

midnight stone
#

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

sharp patrol
#

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?

wraith grove
#

I would open htop and then guess what to kill. Probably cleaner and more pointed answers somewhere.

faint sparrow
#

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).

faint sparrow
#

is it possible to remove the usb connector on a pi pico and replace it with a male connector?

zinc jackal
#

You can find all the design docs and such there.

faint sparrow
#

thank you!

zinc jackal
#

I'm trying to recall... There might be a 3rd party board using the RP2040 with USB-C.

faint sparrow
#

for me its not so much usb c thats important, its having a male connector instead of female (c or standard micro)

zinc jackal
#

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.

faint sparrow
#

nice
i would love to make my own RP2040 pcb too, but im still a beginner with electronics in general

#

baby steps i guess

zinc jackal
#

Same here, but I love diving beyond my usual depths.. sometimes. Lol

#

I'd have to pay for assembly, just to be safe.

umbral sable
faint sparrow
#

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

faint sparrow
#

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).

cunning fjord
zinc jackal
cunning fjord
#

ok

#

that's what I thought u meant lol

zinc jackal
#

🙂

cunning fjord
zinc jackal
#

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.

cunning fjord
#

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

zinc jackal
#

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. 🙂👍

agile depot
#

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.

lucid nebula
#

Has anyone else been getting an "Cannot build wheels" error when trying to install/upgrade a module from pip?

midnight flume
#

@agile depot use an I2S amplifier to 3.5mm jack?

#

@lucid nebula yeah actually i got one this morning coincidentally.

lucid nebula
#

Idk how to fix it though

modern matrix
#

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.

midnight sage
#

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

agile depot
modern matrix
#

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).

agile depot
#

What would be the device name of the I2S input?

modern matrix
#

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

lucid nebula
#

@midnight flume Any updates on getting it fixed?

midnight flume
#

No and I’m the wrong person to ask.

lucid nebula
#

Well, I'm working on that

lucid nebula
#

@midnight flume Alright, I have a fix

#

First update the wheels package from pip

agile depot
#

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.

modest escarp
#

possibly dumb, one-off question. Can you drive a 64x64 RBG matrix with a feather rp2040?

agile depot
agile depot
#

I haven't tried yet, I can't afford a matrix at the moment 🙁

vocal lava
gilded scarab
#

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

modern matrix
modern matrix
#

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/

heady cradle
#

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.

steady rose
#

no driver for the CX unfortunately

cloud token
#

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

faint sparrow
#

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.

analog ore
#

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.

midnight sage
#

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?

opaque wagon
#

Using more system memory (like using 3/4 GB over 1/4GB RAM) should not increase the current usage

midnight sage
#

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

neon frigate
#

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?

neon frigate
#

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

zinc jackal
#

YMMV...

neon frigate
#

i've no clue what that means

#

talk to me like i'm 5 years old, I don't know hardware

zinc jackal
#

Your mileage may vary.

neon frigate
#

as in it's different for everyone?

zinc jackal
#

Like, it's just a thing you'll have to deal with... If you can find something compact, or not.

neon frigate
#

ah, alrighty

#

do you have anything you could reccomend?

zinc jackal
#

Sadly not.

neon frigate
#

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

signal solstice
#

Can anyone help me in understanding how to find frame rate for ov2640 camera module connected with raspberry pi pico

opaque wagon
#

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?

cunning fjord
analog ore
lament swan
#

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?

fierce pollen
# lament swan Hello all, Thank you so much for your help with my previous questions on this se...

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...

analog ore
tame notch
#

Hı i am using servokit on jetson but servokit step just 1 degree, i want to more little step. How can i do.

thin pelican
#

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.

sudden verge
#

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?

neon frigate
#

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

upper forum
#

do i need anything else than a RPI to run two servos? like resistors or anytihng?

civic rune
#

Depends on the servos

#

I'd recommend a separate power supply for them

thin pelican
#

Anyone have any insight to my above question? still banging my head on the wall

tired marsh
#

you wrote you put "CTRL-ALT t" but it doesn't take "-"

#

so it would skip the line

neon frigate
#

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?

tired marsh
#

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

thin pelican
tired marsh
#

the dash

#

it doesn't take the dash

#

that's what I'm asking

thin pelican
#

I think I have an outdated doc if thatsthe case

tired marsh
#

each key has to be on its own separated by spaces

thin pelican
#

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.

tired marsh
#

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 ?

thin pelican
#

Yea. But CTRL-ALT t manually just opens terminal

#

No, only from the duckscript

tired marsh
#

try to see what triggers that

thin pelican
#

I don't know what it is is the problem

tired marsh
#

ah

thin pelican
#

I guess I could watch what process starts

#

It pops up and disappears

tired marsh
#

what ducky script/library are you using ?

thin pelican
#

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

tired marsh
#

you write the code ? I don't mean the payload, the code that runs the payload

thin pelican
#

Ohhhhh sorry

#

It's the dbisu circuit python one for pi pico

tired marsh
#

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)
thin pelican
#

I've never seen that text bar before.

tired marsh
thin pelican
#

Yup, working on that

#

Nothing

tired marsh
#

ok what if you change time.sleep(0) with 0.5 ?

thin pelican
#

Nothing

tired marsh
#

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...

thin pelican
#

No error

#

Everything looks good idk

tired marsh
#

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

thin pelican
#

I'll throw a big delay in there and try

#

Didn't help

#

I'm gonna try to see what that process is called

neon frigate
#

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

neon frigate
#

I’m silly, was trying to run 64x software on 32x architecture

cedar bough
#

How do I connect matlab to a raspberry pi? Which boards are compatible

modern matrix
#

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.

fickle shard
modern matrix
#

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

midnight sage
#

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?

fickle shard
midnight sage
#

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

midnight sage
#

using 12c now instead as I'll need 24 for amiberry

midnight sage
#

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

midnight sage
#

I've tried everything to get it to display what i need as status

neon frigate
#

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

neon frigate
#

after running it overnight, it still hasn't done anything.

#

does anyone have some advice that could help?

neon frigate
#

Still having an issue with grpcio, does anybody know anything that could help me?

modern matrix
#

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.

#

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.

worn drift
#

@modern matrix what usb mic would you recommend? i'd like to record nature sounds from my farm

modern matrix
#

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.

modern matrix
#

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.

worn drift
#

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

grim moat
#

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.

modern matrix
#

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.

wise cairn
#

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

proud tapir
#

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

fickle shard
#

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.

fickle shard
proud tapir
#

Gpio

fickle shard
#

Hmm, then maybe the display’s software isn’t set up right

#

Try going through the setup process again?

proud tapir
#

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

trim tiger
#

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

faint sparrow
#

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?

vocal lava
midnight sage
#

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?

midnight sage
#

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

midnight sage
#

I might see if I can use it as my base and code it when I learn how to

modern matrix
#

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

faint sparrow
# vocal lava Either channel should be fine, might as well ask here

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?

midnight sage
#

What GIPO PINS are connected the 3b+'s power led?

midnight sage
#

I could use the txd to have it on and show status

potent hedge
# grim moat Hello, its possible to make usb host cable like this for pico?

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

Hackster.io

Designed for projects where a single USB port isn't enough, this PIO implementation works in Host or Device mode as-required.

void mantle
#

is there a soldier trick i can use to get a hub75e panel working on the Matrix HAT + RTC?

obtuse merlin
#

Does “Reached target network” mean that the pi has an internet connection?

modern matrix
#

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.

modern matrix
#

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.

tall dock
#

Is this the place to ask about purchasing?

ruby night
obtuse merlin
#

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

ruby night
#

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?

steady rose
weak crane
#

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!

lucid nebula
#

How do I install zoneinfo?

cobalt estuary
#

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

placid whale
#

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

wraith grove
#

root having a different version than user would be vaguely odd to me

tired marsh
#

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

placid whale
#

Ok, thanks!

vapid phoenix
#

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?

lucid nebula
#

Trying out getting a remote desktop connection into my Pi

twin briar
#

hello. does anyone know a circuit design to power up my rpi using 4 18650 batteries with charging?

faint sparrow
#

They used four 18650 cells and provide three taps (one tap between each pair of cells).

twin briar
#

do you have an easier setup? like using tpu4056?

turbid rivet
turbid rivet
#

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…

modern matrix
twin briar
#

oh its 5v 2a. i guess thats enough for a raspi 4?

modern matrix
#

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.

twin briar
cold hatch
#

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.

cold hatch
#

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.

steady rose
cold hatch
#

click and drag

steady rose
#

where is that message showing up?

cold hatch
#

It pops up immediately after dropping the uf2. The device reboots into run mode.

tired marsh
#

do you have some drive software that runs like acronis or something ?

cold hatch
#

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.

steady rose
#

you're dragging the UF2 to a folder named RPI-RP2 in each case?

tired marsh
#

you have a custom board right ?

steady rose
#

the pop up with the message is like an OS dialog window?

cold hatch
#

Yup

steady rose
#

do you have a non-custom RP2040 based board to check basic expected behavior?

cold hatch
#

I don't. I was able to upload a flash_nuke.uf2 without error...

steady rose
#

not sure how much of a success indicator that is though

#

what are the other UF2s that aren't copying over?

cold hatch
#

CircuitPython for pico

steady rose
#

does your custom board use the same QSPI flash as the pico?

cold hatch
#

I don't believe it is exactly but close enough? W25Q16JVSNIQ

steady rose
#

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?

cold hatch
#

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.

steady rose
#

there's a guide for that, if it might help...

tired marsh
#

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

cold hatch
#

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.

cold hatch
#

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.

civic rune
#

I was a little punk

midnight sage
#

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?

wraith grove
#

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

faint sparrow
#

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.

young dove
#

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

turbid rivet
young dove
#

@turbid rivet you mean for this TXS0108E level shifter?

turbid rivet
#

Yes

half nexus
#

[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.
young dove
#

@turbid rivet how did find out that it is fast enough, by the chip which is used on here?

turbid rivet
#

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

young dove
#

@turbid rivet sorry, my mistake. it is ws2812b not ws2813

turbid rivet
young dove
#

okk

turbid rivet
# half nexus [Software] [Linux] [Pi OS] [Non-pi hardware] Hello PI users, I am delighted with...

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?

half nexus
#

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.

dreamy gust
half nexus
#

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

dreamy gust
half nexus
#

Yeah, that's why I think choosing other one is an option

dreamy gust
#

I have never used network boot at all.... sorry

half nexus
#

Me too.

#

I've asked some network guy in our passion project server in hopes that he knows

half nexus
dreamy gust
#

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.

half nexus
#

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.

dreamy gust
#

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.

half nexus
#

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

dreamy gust
#

Then search for knoppix. It is made for this Tasks.

faint sparrow
#

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. ;)

young dove
brittle island
# young dove I will ask again to make sure. will I run into any compatibility issues? because...

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.

charred prawn
#

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

brittle island
#

Looks like a kernel image not found error. Try flashing raspbian on another sd card and try booting from it.

charred prawn
#

Update: I tried a couple other SD cards, one of them never before used

#

Kernel.img was also on the old and new cards

brittle island
#

Try booting from a bootable USB stick.

charred prawn
#

USB flashed as normal

brittle island
#

Yup. Idea's to rule out a hardware problem with the port.

charred prawn
#

Gotcha

#

While it's flashing, if it's not an SD port problem what might it be?

brittle island
#

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.

charred prawn
#

If it turns out it's the port, then I'm likely going to have to do it from USB forever?

brittle island
#

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.

charred prawn
#

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

brittle island
#

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

half nexus
#

While trying out RP-D OS, I've got kernel panic (it's too modern)

steep inlet
#

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.

brittle island
#

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.

steep inlet
#

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!

brittle island
#

np, glad I could be of help. :)

modern matrix
#

I think displays show up on the higher i2c buses? like for fetching EDID info from HDMI.

midnight sage
#

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

umbral sable
midnight sage
#

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

worn drift
#

is there a go-to microphone for raspberry pi? for example it seems like the pi camera 2 is the go-to camera

fathom fern
#

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.

whole sinew
fathom fern
whole sinew
tranquil stratus
#

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?

umbral sable
hard pike
#

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

umbral sable
#

Oh, I thought it was a literal factory ROM, not reprogrammable.

hard pike
#

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

modern pollen
tranquil stratus
fickle rose
modern pollen
fickle rose
#

(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

fickle rose
tranquil stratus
fickle rose
#

I was just saying that if your bootloader is boot-looping or some other problem nothing will stop the bootsel bootrom

restive briar
#

how can I keep a raspberry pi from corrupting sd cards if it has sudden power loss

zinc jackal
#

PSU, or read-only.

whole sinew
#

12V UPS + DC/DC converter to 5V

restive briar
#

is there a guide on how to make it read only

steady rose
glass yew
#

@civic rune

civic rune
#

How can I help?

fallow radish
#

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!

steady rose
#

how is first pico receiving power?

umbral sable
steady rose
#

looks like there is for VSYS, but VBUS should just be a direct connection to USB pin, at least afaict

fallow radish
steady rose
#

what is you indication that the second pico is not being powered?

fallow radish
#

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

steady rose
#

what is the script written in?

fallow radish
#

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

steady rose
#

can you swap pico's to see if behavior moves to whichever one is being powered via VBUS?

fallow radish
#

which behavior, sorry?

steady rose
#

the LED code not running

fallow radish
#

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

steady rose
#

can you post photo of how the connection between the two is being done?

fallow radish
#

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

modern matrix
#

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.

regal orbit
#

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)

Adafruit Learning System

Set up your RPi Internet of Things Thermal Printer to generate one time pads!

Adafruit Learning System

Build an "Internet of Things" connected mini printer that will do your bidding!

#

I'm using a Pi Zero W, fresh upgrade/update

midnight sage
#

It's the crontab that runs the boot like boot a python file?

viral oxide
#

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

midnight sage
#

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?

vale sand
#

look up rc.local

steady rose
viral oxide
steady rose
tired marsh
#

what kind of data ? you just need print() and anything able to read serial on the other side

tired marsh
#

also sys.stdout for direct byte sending I believe (while print converts to string)

raven saffron
#

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

worn drift
#

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

steady rose
#

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?

worn drift
#

yeah other usb things work fine, keyboard mouse etc

steady rose
#

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)

worn drift
steady rose
#

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?

worn drift
#

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

steady rose
#

that's super weird behavior

#

everything is same? same USB cable etc?

#

same USB port/cable works with some other USB device?

worn drift
#

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

worn drift
#

just tried a brand new sd card + new OS, and none of the ports on the pi 3 work. dang

lucid nebula
#

Where's the best place to buy a 3B+ starter kit?

vocal lava
#

They're pretty much sold out everywhere these days, all the Pis have a shortage

humble marsh
wispy hazel
midnight sage
#

So if I took a Source Code for an Emulator how to get it to be bare metal on boot for the Pi?

umbral sable
midnight sage
#

no one made an atari 800 bare metal emulator for Pi - think of BMC64 as it forked Vice's emulator for that

turbid rivet
#

Sounds like a real niche choice for a bare metal emulator. Is there a reason to want bare metal?

ripe pike
#

👋 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?

ripe pike
#

👋 if I do a compilebuild of a C program

raven saffron
#

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;
}```
umbral sable
#

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.

raven saffron
umbral sable
#

I'm not familiar with its protocol off the top of my head, I'm afraid.

raven saffron
#

Ah got it, thank you regardless

umbral sable
#

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.

raven saffron
#

I think you may be right

turbid rivet
dark rune
#

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 🙂

midnight sage
#

pi 3B+'s max is 5.25 volts

woeful wigeon
#

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?

potent hedge
midnight sage
#

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

mild helm
#

can someone help me everyrtime i put circuit python on my rasp pi it onlys give me the boot_out file

lost wolf
mild helm
#

pico

#

we could hop in call if u think it easier

lost wolf
#

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.

mild helm
#

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

steady rose
#

@mild helm please don't cross post in multiple channels

blissful heron
#

how likely is for inbuilt led to wear out ?

#

pi pico w

lost wolf
blissful heron
#

even if i turn on off without delay 24 x7 ?

lost wolf
#

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.

blissful heron
#

ok sry

lost wolf
lost wolf
turbid ivy
blissful heron
#

so far i got more help than i expected , honestly

lost wolf
#

That's great to hear.

woeful wigeon
#

I am using influxdb python client, does anybody know how can i check if the database named X exists or not?

torn trench
#

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?

keen summit
#

Hello,is there anyone who has tried to make a I2C sensor hotpluggable in Raspberry,my sensor is MCP9808

fickle rose
fickle rose
keen summit
fickle rose
#

ok

woeful wigeon
torn trench
#

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...

torn trench
#

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...

dapper steppe
#

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?

umbral sable
#

(Because the custom route will be very expensive.)

dapper steppe
umbral sable
#

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.

dapper steppe
#

Custom is always more expensive, that should be a given.

umbral sable
#

Yes, but do you really want to pay $10,000 for a Pi?

dapper steppe
#

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.

umbral sable
#

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.

dapper steppe
#

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.

dapper steppe
dapper steppe
#

Out of curiosity, could you really get an engineering sample within 2-3 months, or would it be closer to a year?

umbral sable
#

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.

hard pike
#

Highly suggest looking at Allwinner SoC. There are packages that are very maker friendly that don’t require PCB with blind/hidden via.

hard pike
midnight sage
#

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

keen summit
#

If I have multiple sensors and one master will one LTC4311 I2C Extender work for having one sensor per 2 meters?

tired marsh
midnight sage
#

25 pins...may not be enough to do keyboard col and rows matrix from an Amiga 1200 Keyboard if I done one

dense comet
#

@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.

midnight sage
#

Amiga 1200 Keyboard have 106 keys to hook up to a matrix

dense comet
#

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.

midnight sage
#

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

tired marsh
#

did they use a GPIO extender or more likely a shift-register ? it's not uncommon with keyboards when you run out of pins

midnight sage
#

not sure I just wish to get this a1200 keyboard to become a usb keyboard for your computer

midnight sage
#

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

tired marsh
#

though I think I would use QMK or KMK

midnight sage
#

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

torn trench
#

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...

midnight sage
#

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

tired marsh
#

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)

midnight sage
#

how does TXD work as a power LED and shuts down when the pi is down with it's shutdown process

tired marsh
#

what shutdown process ? you are talking about a pico right ?

#

oh do you mean an led on the keyboard ?

midnight sage
#

LED to act as a Power Light since most projects are in cases

tired marsh
#

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

midnight sage
#

I know it turns off when it done shutting down

tired marsh
#

that's not a pico

#

are we still talking about using a pico to make a keyboard ?

#

or am I lost ?

midnight sage
#

I'm giving up on that amiga 1200 keyboard idea I'll just focus on finishing the project I was doing

tired marsh
#

oh ok

#

sorry I was missing some context

midnight sage
#

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

umbral sable
#

Hmmm? You can make your own parts in Kicad if you want.

midnight sage
umbral sable
#

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.

midnight sage
#

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

midnight sage
#

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?

midnight sage
#

the layout of the board now just need to connect the 31 pin connector with GPIO pins since this is quite limited in pins

midnight sage
#

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

latent quail
#

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.

umbral sable
latent quail
#

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.

lost wolf
#

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.

torn trench
torn trench
#

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?

umbral sable
#

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.

twin briar
#

hello. does anyone have a concrete working guide to send sms using sim800l evb v2 with a raspberry pi 4? thanks!

young meadow
#

hey can someone help with ds1307 rtc on pi 4

#

have connected it and edited the config but its showing 68 instead of UU

turbid rivet
young meadow
#

dtoverlay=i2c-rtc,ds1307

#

added this

turbid rivet
#

And you saved this and rebooted the pi?

young meadow
#

following this guide

#

yes i did

turbid rivet
#

Let’s start with hardware: are you sure it’s a DS1307?

young meadow
#

yep ordered it off pi hut uk

#
#

this is it

turbid rivet
#

And you have the coin cell battery installed in the module, yes?

young meadow
#

yes

torn trench
#

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 🙂 )

torn trench
#

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

young meadow
torn trench
#

can you try that lsmod command?

#

that would tell you if the rtc_ds1307 driver was loaded

young meadow
torn trench
#

oh yeah after you modprobe it, it will definitely be there

#

what's i2cdetect say now?

young meadow
#

showing 68 still

torn trench
#

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?

young meadow
torn trench
#

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?

young meadow
#

think so

torn trench
#

hm ok that seems interesting

#

what about dmesg | grep i2c

#

not sure if that will print too much

young meadow
torn trench
#

ok and dmesg | grep rtc_ds1307?

young meadow
#

[62965.030640] i2c i2c-1: Failed to register i2c client rtc_ds1307 at 0x68 (-16)

torn trench
#

I feel like those i2c transfer timeouts are a bad sign

young meadow
#

uh i hope its not a faulty rtc

torn trench
#

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

young meadow
torn trench
#

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?

young meadow
#

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

torn trench
#

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

young meadow
#

if it matters this is where my scl and sda are wired

torn trench
#

but it's interesting, that dmesg error code -16 is EBUSY

young meadow
#

read failed error

torn trench
#

tried it a couple times?

young meadow
#

oh now it returned

#

0x80

torn trench
#

those look like the right pair of pins

#

ok so that's 0b1000_0000

young meadow
torn trench
#

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
young meadow
torn trench
#

add a sudo on the modprobe 🙂

young meadow
#

oop sorry

torn trench
#

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)

young meadow
#

OH it is showing UU now

torn trench
#

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?

young meadow
#

wonder if it has to do anything with bad soldering?

torn trench
#

my initial thought would be long leads before bad soldering, but I'm not much of a hardware guy

young meadow
#

not much long i would say 5-6cm

#

it was my first time soldering i guess so

torn trench
#

hm that doesn't seem so bad to me

young meadow
#

This was when i finished

torn trench
#

oh ty for the pic that's exactly what I was about to ask for 🙂

young meadow
#

The leftovers were snipped

torn trench
#

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?

young meadow
#

it is going through the holes for all

#

i just snipped blue wire first because it got stuck pointing up and it interfered

torn trench
#

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

young meadow
#

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

torn trench
#

hm, interesting. How are you going to solder it onto a pi zero?

#

you're gonna like, solder the wires to the zero pins?

young meadow
#

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 🫶

torn trench
#

yeah any time! maybe someone else will have recommendations for improving i2c reliability

young meadow
#

yeah seems like it stops every restart might try a fresh raspbia without desktop

torn trench
#

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)

young meadow
#

yeah it is showing

young meadow
#

after disabling the fake clock and setting hw clock seems to work now even after restarting thanks

neon frigate
#

how powerful are raspberry pi 4b's? I read they're pretty good, but to what extent?

torn trench
#

assuming you've done it

young meadow
#

Um not yet

torn trench
#

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

young meadow
#

I kinda messed up

torn trench
#

that will help make it less of a blob

#

but it's easier said then done 🙂

torn trench
young meadow
#

I didnt solder yet though which is good

#

I bought a set of solderless hammer gpio pins and um it didnt go as planned

torn trench
#

oof haha

young meadow
#

yeah now just wanting to get them out wihtout breaking the pi in half

torn trench
#

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

torn trench
#

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?

zinc jackal
turbid rivet
young meadow
#

i have failed soldering 2 times but i gaveup on a non soldering idea and will try soldering again with better equipment.

young meadow
turbid rivet
young meadow
#

i might have hit it too hard or had it tilt without noticing but it was on a flat surface

young meadow
#

For anyone interested the soldering is going horrible now happy

torn trench
#

I don't suppose you live anywhere near seattle?

young meadow
#

Not really im in the UK

#

I also dont think this would work?

torn trench
#

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?

torn trench
#

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-*/

young meadow
#

I think i managed to finally kill the pi pepecryhand edit: its alive again

torn trench
vapid nexus
#

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.

slender schooner
#

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???

slender schooner
slender schooner
lament swan
#

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

torn trench
#

Have you considered writing an IIO driver)

lament swan
#

What is an iio driver?

torn trench
#

Sorry got sidetracked

#

It’s a type of Linux kernel driver

#

Then you can read the sensor through /sys/bus/iio/devices

torn trench
#

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

proud tapir
#

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

lament swan
lament swan
lament swan
#

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

proud tapir
sleek atlas
arctic bobcat
#

Anyone know how to fix this, I was trying to repair my corrupt sd card that has the raspberry pi os

torn trench
#

Is the problem that the partition is mounted?

arctic bobcat
torn trench
#

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)

torn trench
#

And looking at the man pages, it appears that if you pass it the -n flag it won’t attempt to fix anything?

alpine fox
#

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

faint sparrow
#

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.

cold zephyr
#

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

humble marsh
#

try a different port or a different computer

crisp lion
#

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...

crisp lion
#

ok just remembered that I had a spare 5m reel of neopixels and it looks like this extra strip is perfectly fine...

crisp lion
faint sparrow
#

It's a Raspberry Pi, which is quite different from a microcontroller.
Microcontroller is far better at this particular job.

crisp lion
#

thanks @faint sparrow. Would it be possible to somehow extend the Pi with a microcontroller just for the sake of the extra PWM pins?

faint sparrow
#

The SeeSaw module does something similar and is a good model for initial consideration.

crisp lion
#

sounds promising, lemme have a look 😄

faint sparrow
crisp lion
#

oh lol the same link 🤣

#

thanks!

faint sparrow
#

Yeah I don't know how you'd mod it for controlling more than one strand.

crisp lion
#

btw, I just ordered a couple Pi Picos the other day, would they also be good enough for the job?

faint sparrow
#

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. ;)

crisp lion
#

hah cool

faint sparrow
#

APA102 is so loose you could set one up with a morse code key, I bet.

crisp lion
#

yeah, I was looking at Pico's pin diagram the other day and it looked super capable!

faint sparrow
#

But the ws series is precision timing oriented.

crisp lion
#

hmmmm a silly question, because I feel like I could be after the wrong thing

faint sparrow
#

I know adafruit makes a multiple strand breakout board. I don't remember what it brings to the equasion besides the physical wiring.

crisp lion
#

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?

faint sparrow
crisp lion
#

lol, seen this one, legend!

faint sparrow
#

;)

#

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)

crisp lion
#

huh, interesting!

faint sparrow
#

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.

crisp lion
#

does apa102 require super special GPIO pins like neopixel, or would Pi handle let's say 12 strips of 50?

faint sparrow
#

I don't know how many GPIO pins the Pi has. ;)

crisp lion
#

40, out of which 26 are usable

faint sparrow
#

I would think that a string of shift registers might be used though.

crisp lion
#

take away ground, voltage, blah blah blah etc you arrive at 26 if I remember correctly

faint sparrow
#

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.

crisp lion
#

excellent, then I could because that's what I started with 😄

#

26 2-pin LEDs

#

all worked absolutely fine