#help-with-linux-sbcs

1 messages · Page 11 of 1

tepid scarab
#

Awesome thanks @dull coral I got blinka installed In now complains:

#

is this not: python-adafruit-ssd1306 that I previously installed?

dull coral
#

Ok that is progess you can look for the module in the CircuitPython Library Bunble

#

Download the py version. If I there is two version of this library, let me look in github

tepid scarab
#

Okay. I'm today years old the first time I used arch, and I am not super familiar with setting up python environments, so I am not sure what to do with this? Do I just download it and run it with python3, or something else?

#

the parameters are a bunch of hex values from the look of it, that's fun. 😛

dull coral
#

well, yes it is fun, do not worry that is just the adress of the I2C part, it is easier that way.

#

c

tepid scarab
#

ill give that a shot, thx

dull coral
#

you are welcome, let me know if it works, are you using which pi?

#

4?

tepid scarab
#

ip4 2Gb, just arrived today from Adafruit.

dull coral
#

ok perfect, try it, let me know if it works, I could help you tomorow night, I will burn an image and try it myself. Ping me tomorrow night if you stil need help

tepid scarab
#

Got it working! Thanks, @dull coral

tepid scarab
dull coral
#

Nice.!!!!

true fable
#

I was using my raspi 4 with ssh, did the config and ssh thing in the files of it, now i wanna connect it to a Display through HDMI, i have Micro HDMI to HDMI, connected it to a monitor, didnt work

#

do i need to disable ssh or something for it:/

#

im pretty new to this

#

Also what keyboards can be connected to this?

#

i tried connecting my mechanical one

#

and my mouse as well

#

didnt work i think

#

i powered my raspi from laptop through USB, is that the reason>?

hard pike
#

Probably the case

#

It’s unlikely that your laptop will provide the 3A that the Pi 4 needs

lucid nebula
#

Most I have seen those provide is 2.4

true fable
#

i think i might even have corrupted my SD, unplugged it soon after plugging it in

#

😩

safe pebble
#

Hello, is it possible to create a proper menu on Pi with python? I mean a menu with a rotary encoder + LCD with snappy change of item on screen and immediate click sound feedback? I have done one for a project using a pi zero and it is not snappy (pi oled) and could not find a way to do asynchrone sound feedback.... is PI zero to slow? Would PI 4 do much better? Or simply PI+ python is not fast enough (vs arduino for eg). + any idea on sound feedback? Was thinking about using shell command but did not find a way to generate click sound from shell... thanks!

solemn briar
#

Is this the appropriate location to ask what code is used to put the Raspberry Pi Pico into dormant mode?

karmic onyx
#

which encoder model should I get if I want to use 16 buttons?

still linden
#

Running my RPi4 headless. . . I set it up w/ the case and the fan.
Initially I got my wires crossed - literally - when setting up the fan.
I realized my error and got the wires righted; I have yet to HEAR the fan run.
My Pi4 has been running for days - no fan sound.
I'm NOT a TECH person, but I view the Pi via rVNC.
I tried typing, "pinout", but have NO CLUE what I'm looking at???
Suggestions as to how I can determine if I fried my fan?
Should I just order a new one???
Someone here graciously responded to this same question previously, and suggested typing the, "pinout" code, but as previously stated, It's all GREEK to me!
Thanks!!!

dull coral
#

@still linden you want to try to connect your fan in the PI4 to see if it is working?

still linden
dull coral
still linden
dull coral
#

Red in post 1. Black in Post 3

still linden
dull coral
#

oh Do you have a blue one? we would need to look for that fan in the interwebs to see the pinouts, could you share a picture, reference, number something..

still linden
still linden
heavy folio
#

i know this is a real basic question, but is there a way to clone a specific version of a github repository for install?

still linden
# dull coral it should work

IF that's the case, then I guess when I MIS-wired it initially, I must have FRIED the fan???!!!
Guess it's time to order a NEW one.
Thanks!!!

mortal lagoon
flint elbow
#

Hello I have a problem with my raspberry pi zero W

#

The wifi doesnt seem to work even after localization

sonic beacon
#

Hello, i have a problem with raspistill with long expourse shots. I have a RPi 4B with the HQ Camera (2018, newest) and with 1sec long expourse i have to wait 7 seconds (!) to save the image. My SD-Card is the SanDisk extreme plus so no problem with my micro sd card speed. Also tried gpu_mem 512Mb to enhance the memory for the cam module. But it wont work... All is up to date and running expect of the cam... Anyone had issues before with long expourse shots ?

wide kiln
#

I found this while going through my boxes, do you guys know if I can use GPIO to control it?

#

I can provide more information if needed ofc

wraith grove
wide kiln
#

Oh neat! Thanks!

ruby night
wraith grove
#

?powering directly from the pi could have side effects

ruby night
#

There are many more examples available via a google search for "servo raspberry pi" I think the first one posted , using "wiringpi" may be a bit out of date. I have not tried using wiringpi in a long time.

wraith grove
#

time to drag Simon Monk out for a sequel :-)

wide kiln
#

Would it matter what GPIO I plug it into?

#

I've never understood the different GPIO pins

wraith grove
#

as long as it can be used with PWM, which I honestly have little clue about

#

"There are two PWM channels on the PI 3B. Typically the user only has real access to channel 0, so that leaves really only one (1) PWM pin (by default) which you have access to: pin12 GPIO18."

wide kiln
#

The PCM_CLK? I am using a pi 4btw

ruby night
#

all GPIO can be used for "software" PWM -- certain ones fpr Harware PWM

#

IIRC GPIO18 is the one most use fro PWM example.

#

Also these are simple examples, but as @wraith grove noted, you can run into problems powering servos (especially if there are several) directly from the Pi. I think testing one will be fine, but eventually, you may want a servo motor controller board. https://www.adafruit.com/product/3416

wide kiln
#

Yeah, I am going to use another power source, thanks all of you!

ruby night
#

Good luck!

wide kiln
#

I am trying to get these two cables out of a connector lma0

#

its hard

ruby night
#

There should be a plastic tab holding each cable in place -- just pry it up and they will slide out.

wide kiln
#

Not a good pic ik

#

But you mean those at the top right?

#

The silvery thingies

#

How on earth would u get them to stand up

ruby night
#

Ah -- I thought you were referring to the Servo cable -- those are different. I "think" you can press down on the metal to let it slide out but I'm not sure. I don'y have that type.

wide kiln
#

Ah, these connectors were a pain, so I ordered bulk 50 new ones

faint sparrow
#

Hey

#

Anyone tired out the voice bonnet for the raspberry pi ?

#

With the Google assistant example

novel mist
wide kiln
#

@ruby night (Sorry for the ping, but you seem experienced) What are those connectors called? The white top thingy

ruby night
wide kiln
#

No I just the component

#

Is it called connectors or transformers or adepters or

ruby night
#

or at least it looks like one from this angle.

#

I don't see any other components.

#

or do you mean attached to the servo motor -- they are called "horns"

wide kiln
#

No I mean the basics of the basic

#

This

#

Is a connector right?

#

More specifically a JST-PH?

ruby night
#

That is what it looks like from this side - here are closeups of mine

wide kiln
#

Ah, thank you!

ruby night
#

Note -- it is a JST-PH 2-Pin -- they can have more pins....

#

Also - note that if yours is on a battery, it has the opposite polarity of mine -- and all Adafruit batteries -- be careful!

safe pewter
#

Hey guys! Quick question, you can't really program on a Pico with NodeJs right?
Can't seem to find much about it so I assume you can't.

wide kiln
#

C and Micropython, so you could probably transpile your js to C

faint sparrow
#

can anybody help me in using nrf24l01 with raspberry pi(python), i've followed this tutorial by circuit digest,
https://circuitdigest.com/forums/arduino-and-raspberry-pi/wireless-rf-communication-using-nrf24l01-module
but got no luck, the run scripts run but no communication seems to be happening between the arduino and raspberry pi
now im trying this library
https://github.com/bjarne-hansen/py-nrf24
but getting the following error

  File "/home/pi/Downloads/lib_nrf24-master/testtest.py", line 6, in <module>
    pi = pigpio.pi(env['PIGPIO_HOST'])
  File "/usr/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'PIGPIO_HOST'```
#

if anyone can send me any tutorial that he's sure will work, that would be great too

flat dirge
#

I've got a Raspberry Pi 3 B+ project with a Adafruit 7" touch screen display, a Pimoroni on/off shim and a single RGB LED. Currently running it off my bench supply to monitor current. It is pulling peak 1.12A and nominal .91A with a web browser open and a mostly white screen. I have several of these set ups, they are all exhibiting the yellow lightning bolt. Same thing happens if I run it off the Raspberry Pi official 2.5A supply. Any thoughts on how to make it go away other than disabling the reporting?

solemn finch
ruby night
#

That library works well for me....

faint sparrow
#

@flat dirge I'm not sure how that lightning bolt is produced. I've seen it and I think I remember tracing its origin (in software/detection).

#

Sounds like you are not doing anything wrong.

#

'several' means it's systemic (endemic to the platform)

#

Connect all the grounds; make sure there's exactly one physical route to the electrical outlet supplying 120 VAC. Not two (or more).

#

I have an isolation transformer I use for troubleshooting stuff like this.

flat dirge
#

@faint sparrow I appreciate the input, I'll try putting it on a isolation transformer to see what happens, but I can't see any 2nd paths to ground. A bare bones Pi 3 B+ is said to pull 500mA, so I am pulling 400mA more than a bare bones Pi. I may have to, at least for now, turn off the reporting in /boot/config.txt, but I don't like knowing what the cause is, if you think of anything else, let me know.

faint sparrow
#

@flat dirge I can only say that I saw more lightning bolt than usual, recently.

#

I was very (very) likely running 9front (plan 9 from Bell Labs) at the time.

#

On the Raspberry PI 3 <foobar>

#

I would say 'if you've seen very reliable operation from a given setup and you see the lightning bolt, and cannot explain it, it's probably the Pi not your setup'.

#

In John Muir Publications wrt 'Volkswagen (repair) for the Complete Idiot' (who is ever complete?) they said something like this:

#

"if you find that the glowing of this lamp on your dashboard is annoying, just go over it with some fingernail polish, to darken it or blot it out entirely"

flat dirge
#

@faint sparrow yes, seems that way to me as well... I will continue to research, but for the time being I may disable the warning in software as I haven't had any issues

faint sparrow
#

(the problem lamp on the dash was known to false signal during normal operation .. alternator/generator I think)

#

My lightning bolt issue resolved on its own. I did nothing new. ;)

#

For all I know the upstairs neighbor had a space heater on and was glitching the house wiring noise levels or something like that. ;)

snow timber
faint sparrow
ruby night
#

For the demos -- yes - I usually start the receiver first.

#

Which example are you running?

cunning owl
#

Not sure when this belongs
Want to program Adafruit Clue with Pi 400. Nedd nrfjprog to load librry. What is replacement for arm cpu. How is ardduino idu configured to use it?
Thanks

ruby night
#

ah -- I see you are using Arduino... nevermind. I don't think the nRF52840 is supported in the ARM version of the Arduino IDE....

dull coral
#

@ruby night the issue that you are having with you Ubuntu when using the REPL with CP, Did you remember if this occurs after you re-flash a new firmware to the drive? and then hitting reset on the board?.

ruby night
#

@dull coral I have not been able to "predict it" it occurs when I press RESET or physically disconnect the board (or if I execute storage.erase_filesystem() but it is not tied to after an upload that I have noted. It may work fine for several cycles then crashes at the least opportune time 😉

dull coral
#

🙂 yes, I was just hoping that you say yes, that way I do not have to TEST again this new theory in my computer, 😆

ruby night
#

Good luck -- I wish I could find a "trigger"

ebon flume
#

If this is not the correct forum please point me to the right on.

Does anyone know the through-hole size on the RGB Matrix Bonnet? If not has anyone found a header with push-fit to make a solderless header on it? The 25 pin row.

ebon flume
#

@urban ermine I saw that but I'm not seeing the measurement of the green SDA-LAT21 holes.

urban ermine
#

One sec, I'm exporting the libraries from the eagle files to confirm the size

#

looks like they are 1 mm

#

@ebon flume

ebon flume
#

Thanks so much. That's great. The one header with push fit pins are a tight fit with 1mm and a better with 1.1 but it's worth a try. Thanks again.

oblique cairn
quasi basin
#

Hi, I', looking for a quick way to check if I damaged a GPIO pin. What do you do to check for that? Thanks in advance.

steady rose
#

see if it still works as a digital in, only need some way to jumper the pin to 3V/GND to see if it still reads HIGH/LOW as expected

faint sparrow
#

Can somebody please give me 5 minutes of the their life and check my code for transmitting data between two nrf24l01, im using nrf24l01 circuit python Library, it's a code for gesture controlled robot, so the pcf8591 adc reads value from accelerometer and and then if the value is greater than some value it send the float numbers to receiver so receiver can compare the values and take actions accordingly

dull coral
mint pagoda
#

Happy pi day 🥧

flint garnet
#

In the "ensure you are running SDL 1.2" section, there is a script to run which references raspbian wheezy, which is no longer at archive.raspbian.org/raspbian and that script fails.

solemn briar
#

Has anyone found a way to do Frequency Shift Keying or Phase shift Keying or Amplitude shift keying on the Raspberry Pi Pico ?

Ideally I’d like to use ASK as I already have some Ardunio s using 433 MHz for communication between each other

faint sparrow
solemn briar
#

Ohh thanks I thought this channel as all things Raspberry Pi TY!

faint sparrow
#

Nothing wrong with chatting here but that room is more targeted.

true fable
#

I recently bought raspi 4B, installed Raspian OS, did the necessary things needed to connect with SSH, i.e. creating SSH file, wpa_supplicant.conf, and it worked perfectly.
Then I ordered a case and put it in there with a fan attached, I mistakenly corrupted the SD card so I reinstalled it and did the same things for SSH, but now when I boot it, it doesn't connect to the WiFi and I checked the SSH file wasn't disappearing as well, like it should? What could be the problem here, both of the times I gave power through USB cable from my laptop, and tried with 3A charger too.

#

nvm, it wasnt getting enough power to run the fan, so it works after i disconnect the fan

solar meteor
#

I appear to have lost the standoffs and screws for my sense-hat. Does anyone happen to have a STL or idea?

steady rose
old briar
#

@main narwhal Adapter for oled phone screen to connect to Raspberry pi zero or raspberry pi or pi compute module
Pi compute module feather for inverter , usbC, display, etc with same footprint

tropic flower
#

Has anybody worked with the Garmin’s LIDAR-Lite v4 LED sensor on a Raspberry pi? I am having trouble finding a library that works with the Pi and the V4 on i2c.

sacred finch
sonic cedar
#

Anyone know how to get the file manager to open as sudo? Tried sudo pcmanfm, didn't work, tried gksu, didn't work and a few other things (running Buster)

#

think I got it with this: export XAUTHORITY=~/.Xauthority

tropic flower
#

Ok so I found an altered library for the Garmin Lidar-Lite v4 and it collects but it is extreemly slow and seems to not switch when prompted to change in the adafruit_lidarlite.py line 81 "CONFIG_DEFAULTFAST". It still collects very slowly maybe 5 sps

lost wolf
tropic flower
#

@lost wolf This is the altered library that I was working with, I was looking to change line 81 of this code to speed up the collection rate but it seems to not be the case. I may be entirely misunderstanding though.

lost wolf
#

Ah apologies. I was hoping it was something new that might help. I'm unfamiliar with it, so I don't have any suggestions.

#

I simply remembered someone bringing it up internally recently.

tropic flower
#

Thank you though for putting a little time and thought into it

#

I'll keep scratching at it, may even post in that thread to see if dastels has a thought on it, as it is quite the resent post.

lost wolf
#

If you don't get a response, consider creating a new forum post. Sometimes existing threads don't get responses. Want to make sure you don't get ignored unintentionally.

tropic flower
#

hoping to collect 3 of these at quite the high sps

lost wolf
#

Ah fair enough

tropic flower
#

good call, will do

lost wolf
#

You can link to the existing one to show you read it though.

waxen valve
sacred finch
#

@unborn hedge ^ are you working on this one? (CM4 flavoured dark pocket chip)

unborn hedge
#

hi yes thats me

sacred finch
#

It's looking great so far!

solar meteor
brave nebula
#

Does anyone know if there is a circuitpython for RPIW? I don't want Raspberry OS. Just a UF2 circuitpython like the other microcontrollers.

hearty path
#

By RPIW - Do you mean the Pico?

steady rose
#

or pi zero W?

uncut lagoon
#

it's possibly the raspberri pi zero w 🤔

#

since the pico cant run raspberry os

#

but that sounds interesting

#

wouldnt have to wait almost a minute to have the os booted

lean laurel
#

Messing with dual shock 4 on pi 4 model b, but it will not pair to the internal Bluetooth for some reason. (This is not a driver issue I don’t think because it works fine via wired and a 3rd party Bluetooth usb dongle)

uncut lagoon
#

it may be a driver issue anyway

#

does anything else work over bluetooth?

fierce spire
calm garden
lone pendant
#

My addressable leds only work with gpio 18 pin. I need to attach another strip, but it gives me an error when I try to hook it up with another pin.
Is there another option pin wise that I could use that would work and be just like gpio 18?

umbral sable
#

If it's using hardware PWM, you might try 12, 13, or 19.

lone pendant
faint sparrow
#

well one more try to get an answer. i would like to build a RGB matrix panel of 8 tiles with 64x32 led's each. are there - besides the needed memory for this complete array (256 x 64 led's means 48 kbyte if i use 8 bit for each single led, so 24 bit = 3 byte for one RGB-dot = 48kbyte for the whole matrix) - any further problems in case i use the RGB-matrix-hat for raspberry pi? or may this be possible to do with the M0/M4 kit together with the feather M4 (especially also the M4 CAN feather)?

pseudo yew
uncut lagoon
#

did you ran the example code from there?

pseudo yew
#

yes

#

when i do sudo i2cdetect -y 1 it scans but finds nothing on the example it finds it on row D or something and collom 30

uncut lagoon
#

have you tried to do this on another device?

rocky flare
rocky flare
#

I've had a go at Fritzing. 🙂 This is my first project, does any one have any suggestions to make it more legible? As in real life it's very busy.

faint sparrow
#

I think I would iterate through more colors on parallel busses.

#

ROYGBIV is the rainbow.

#

Also try to avoid all cross-overs.

#

Be less stingy with space - use more.

#

I would also include a node list of all connections.

#

Probably as a separate document (text only).

#

That's a lot of visual tracing for no real gain, to examine visually.

#

Fritzing probably generates a schematic diagram in parallel with the 3-d breadboarding model; definitely include that as it'll be easier to follow (probably).

#

Ben Eater does complex breadboards; might want to see how he represents them (if at all) in 'mechanical drawings' like the above from Fritzing.

rocky flare
#

Thanks for the feedback. Will investigate. 🙂 it's a nice tool, need to now go and donate a few pennies their way.

faint sparrow
#

@rocky flare If you're putting that kind of effort into it, kicad may be the better fit.

#

Fritzing's strength is in presenting fundamentals to beginners in a 'this is exactly what it will look like when you've wired it correctly' format.

wise sonnet
rocky flare
#

I may do at somepoint. But in terms of PCB design I am a noob. 🙂 For now it's a nice little thing to mess about with.

#

Like playing a game.

faint sparrow
#

A friend of mine was drawing vast mazes around age 9. ;)

#

I learned the basics of it from his stuff.

faint sparrow
#

The RPI isn't a great choice for 'intense' GPIO.

blissful turtle
#

was trying to setup a rpi torrent server but i cant connect to my nas? ive tried NFS, SMB and FTP conenction but none of them work?

wise sonnet
#

Or DotStar? (I don’t recall the chip name for those)

#

It sounded from your description that they were single wire - so Made me think you are using WS2812s (NeoPixel)

faint sparrow
#

RGB displays using discrete color LED's is essentially video.

#

You buffer the entire 'image' inside the MCU. Including color hue and brightness (if any).

#

bits per pixel figures into the math.

#

Quite possibly, PWM would figure, to get many hues.

#

The beginner level single-pixel color LED circuits seem to feature three PWM's for just the one LED.

#

so as well the M4 boards should do this amount of Pixels fine if i do understand you the right way?

#

@faint sparrow If you're going to buy hardware before learning what else is needed, the Grand Central M4 has lots of pins and is fast and has a lot of SRAM (volatile memory).

#

They may have an airlift variant as well, or you might copy the simpler airlift schematic from a Metro board that does do airlift.

#

(They also carry just the RF section on a breakout, so it should be possible to do what was done all in one board, on separates).

#

i have a Metro M4 Airlift here and as well a Grand Central. But in the documentation it's announced that the amount of Panels should not be too big

#

The Discontinued pile had a dedicated controller card; I think it was for installation in a PC though.

#

video and microcontrollers aren't a great combination.

#

I use the RPi and HDMI for that. ;)

fierce spire
faint sparrow
#

i don't wanna display movies or anything like that. i would like to use this panel to make some announcements during a party, for example the date of the next party (in case we may be allowed to do parties any time in the future ...) or do display the titel name etc.

#

For scrolling signs, the character cell is probably the main unit to be concerned with.

#

In general, you turn on an LED 300 times each second for a short period of time.

#

Video blanking is employed when you multiplex them.

#

So I use a shift register with 4x 7-segment LED's and paint one digit in one position at a time.

#

ones-place then tens-place then 100's place then 1000's place.

faint sparrow
#

thanks for these hints ... the original ones from adafruit i had seen already (for the panels overall, for the Pi-Hat and for the Arduino (Metro M0/M4) shields and the kits for the M0/M4 feathers, but this helps to get understanding and ship arround problems 🙂

spare crow
#

Anyone able to help with circuit python/PN532/Raspberry pi setup? I have the PN532 setup, libnfc and circuit python can both see the PN532 and libnfc can read NFC tags UIDs, but the circuit python setup simple test only returns the firmware version of the PN532 and doesn't detect any of my tags

verbal tartan
#

Hi there - has anyone used the LTC4311 I2C extender/active terminator with a raspberry pi? I’m trying to use it for what seems like a simple use case, but if I wire it to the Pi, even if I connect nothing else, it i2cdetect suddenly runs very slowly and any device I connect, whether a regular I2C device or something on the Stemma QT connector, won’t be detected. If I swap the wiring - plug a QT connected sensor to the Pi, and then plug in the extender after that, I can add another I2C device and it will be detected. I noticed that the Ethernet example shown on the site doesn’t have the extender connected to the host microcontroller, so maybe that’s how it’s supposed to work. Can anyone shed some light on this? I’m a relative newbie to this stuff, so feel like I’m missing something basic. I’ve tried a ton of different things here.

fierce spire
# calm garden Can you post your code?

import adafruit_ina219

i2c = busio.I2C(board.SCL, board.SDA)

#INA219:

ina219 = adafruit_ina219.INA219(i2c)

def getallina219():
global busvoltage,shuntvoltage,current,power

busvoltage = ina219.bus_voltage     #in V
shuntvoltage = ina219.shunt_voltage #in mV
current = ina219.current            #in mA
power = ina219.power                #in W

def ina219getallprintall():
getallina219()
print("Busvoltage: ",busvoltage)
print("Shuntvoltage: ",shuntvoltage)
print("Current: ",current)
print("Power: ",power)

#INA219Staging:

ina219staging = adafruit_ina219.INA219(i2c)

def getallina219staging():
global busvoltagestaging,shuntvoltagestaging,currentstaging,powerstaging

busvoltagestaging = ina219staging.bus_voltage     #in V
shuntvoltagestaging = ina219staging.shunt_voltage #in mV
currentstaging = ina219staging.current            #in mA
powerstaging = ina219staging.power                #in W

def ina219staginggetallprintall():
getallinastaging219()
print("Busvoltage Staging-System: ",busvoltagestaging)
print("Shuntvoltage Staging-System: ",shuntvoltagestaging)
print("Current Staging-System: ",currentstaging)
print("Power Staging-System: ",powerstaging)

#

The INA219Staging should have the address 0x41 and the INA219 should have the standard address 0x40 (so he already has)

#

Thank you so much for your help 😄

calm garden
jagged dawn
#

I just bought a new WD Labs Pi Drive Kit (Raspberry Pi 3, w/375G HD. The system works great. I have updated the packages. Python 2 and 3 are installed, as well as scratch. I am trying to install Thonny as I have a Raspberry Pi Pico on the way. I am getting errors during the install.

edgy dust
#

I'd like to use a DPDT or SPST switch with GPIO input for my retropie - but I figure that the pi will see the closed switch in the same way as a stuck keyboard key - constantly re-reading the input as low. The nice thing about the DPDT switch is that I can see what state it's in - something I can't do with the momentary sw. Thoughts?

iron trail
#

I am currently running Neopixels from an RPi4B. I would like to move the NeoPixel code to a Feather and have the RPi simply send the Feather the message to display. Are there any code samples for communicating with a Feather over I2C from an RPi?

molten glen
#

i encountered a kernel panic and cannot enter anything using my keyboard
https://raspberrypi.stackexchange.com/questions/40854/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block179-6
this is the exact issue im having

faint sparrow
#

kernel panic probably isn't solved on the same system - pull the SD card and address the issue on a working system that can read and write to the card - that'd be my approach.

#

(that means a desktop PC not another Pi)

#

kernel panics are so rare I almost always know that I caused it, and reverse it quickly.

fierce spire
#

How much better is the rasperry pi pico compared to the rasperry pi zero?

uncut lagoon
#

those are completely different devices and can't be compared

#

pi zero (w) runs a full linux operating system on it's single core 1ghz cpu, 512mb ram and has the standard raspberry pi gpio header

#

oh, and can come with wifi too, and has hdmi output and "can" run a desktop

#

the pico pi doesn't even have a gpu, has 256kb ram, 2mb storage, and has it's own gpio pin layout with included support for uf2 files

#

oh, and i doubt you will be able to get any linux running on that

#

but, it also costs about $4-$5

#

both are made for entirely different uses as well

#

the pi zero is made as a super cheap general purpose computer, while the pico pi is made as a microcontroller for electronics projects, with tons of features for it

fierce spire
#

Another question about the bno055 sensor: Under arduino code - device calibration (https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/device-calibration) it tells me there is a bno055.getCalibration method but when I try this in my python script for example "calibration = bno055.getCalibration" it tells me there is no method like this. I found a pdf about the python use and in this they talk about a function called get_Calibration() and set_Calibration() but both of them don´t work either. My question: how can I get the calibration data in a python script and (if possible) how can I save the data and reload it after rebooting the sensor (So I dont have to calibrate it every time on startup)? Thank you for your help

hybrid vortex
#

@fierce spire They are very different products. The pi zero is a cut down version of standard raspberry pis whereas the pico is a microcontroller similar to an arduino. If you want to run an OS you should stick with the zero but the pico can run at a very low power draw and is good for realtime tasks so which is better really depends on your project.

uncut lagoon
#

that's a much better explanation

uncut lagoon
fierce spire
uncut lagoon
#

do you have the adafruit_bno055.mpy file in the lib folder?

fierce spire
#

I dont think so

uncut lagoon
#

then you need to add it

fierce spire
#

how can I do this?

uncut lagoon
#

download the bundle

#

you can also download the examples

fierce spire
#

to download this bundle

uncut lagoon
#

you want to download the mpy version

#

takes a lot less space

#

you also need the adafruit_register folder

fierce spire
#

but how to i get this on my rasperry pi im connected via vnc server

#

drag and drop?

uncut lagoon
#

you dont

#

i though you were talking about circuitpython, which only runs on the pico pi

#

for the raspberry pi, i have no idea

fierce spire
#

I just want to read pitch yaw and roll with this sensor it this really impossible without a hardware upgrade

uncut lagoon
#

have you tried the link?

normal vapor
#

hi, i want to put a raylib application onto the raspberry pi and show that through hdmi without showing Raspbian. then i wanna be able to switch back to raspbian(and if possible, it'd be cool if i could switch back to raylib). i have no idea if this is even possible to do, but if it is, please tell me.

#

so basically i wanna show raylib through HDMI then switch to Raspbian.

uncut lagoon
#

oh, you're the person from last time

normal vapor
#

yep

uncut lagoon
#

have you tried the android route?

normal vapor
#

i have not, but i figured out how to do the game thing by just using godot, because i like godot and hate unity, and i realized that godot actually supports the pi

uncut lagoon
#

nice!

normal vapor
#

but i wanna show a quick UI that's in raylib

#

and when you choose a certain thing in said raylib application

#

it has to switch to the godot game, which i believe can just be on raspbian in fullscreen mode

#

@uncut lagoon so the problem is that i need to

  1. figure out how to do raylib things and framebuffer things so it shows raylib and not raspbian
  2. then i need to figure out a way to switch from raylib to raspbian
uncut lagoon
#

well, that's something i've never done

normal vapor
#

hmmmmm

uncut lagoon
#

the most i did was on a pi zero, for it to start without a desktop

normal vapor
#

oooh how'd you do that

uncut lagoon
#

well, i use a pitft :/

#

the 240x240 one

#

it doesn't support desktop

normal vapor
#

crap

uncut lagoon
#

im sure there's a way to start raspbian without a desktop

#

and when you want, you can select the option to go to the desktop with a command

normal vapor
#

well hold up

#

maybe raylib can just be in fullscreen so you don't see the desktop

uncut lagoon
#

if it writes to the framebuffer, maybe

normal vapor
#

no like maybe it can just be on the desktop but in fullscreen so you don't see it

#

see, what i really just wanna do is have my own raylib OS thing so you can choose which godot game you wanna play

#

and then when you select one

#

that godot game opens

uncut lagoon
#

that may work, yes

normal vapor
#

no but like i want that, but i don't know how to do it

steady rose
uncut lagoon
normal vapor
#

both things, i don't know how i'd automatically open a godot game and i don't know how i'd have the raylib OS write to the framebuffer and i don't know how it'd switch back to the desktop to have the godot game up and running aaaaaaaaaaaaaaaaa

#

that's actually 3 things

uncut lagoon
#

well, if you dont mind opening the desktop first, you probably can find ways to start the application right when it boots the desktop

normal vapor
#

oh wait nvm that's not an issue

#

okay yeah back to the main problem

#

i want the desktop to be completely out of sight from when you turn it on to when you turn it off

uncut lagoon
#

that's something i cant really help with

normal vapor
#

that sucks

#

i wonder if saying ed's name 3 times in a row summons him without pinging him, he's been helping me with this

#

ed ed ed

#

🤞 please work

#

oh nvm he's doing something else, false alarm

uncut lagoon
#

lol

balmy bronze
#

Anyone care to link me to a good enclosure (product or 3d printed) for a pi4 with PoE hat?

#

should not be all-metal, the project is a wifi AP

#

I guess I also need to pick out a proper PoE injector, I figured adafruit would have one but what they have is not IEEE 802.3af

balmy bronze
#

looks nice!

#

thank you @normal vapor

normal vapor
#

no prob!

faint sparrow
#

@normal vapor $ echo xterm > ./.xsession-new-23-mar

#

Then look for .xsession and make sure you have a copy of it.

#

overwrite it with the new version just created.

#

I think that'll be enough to coerce Raspbian into giving you no window manager at all -- just an xterm.

#
 $ cat ~/.xsession
# xterm -fa 'mono' -fs 10 -geom 100x24+10+10
exec wbar -bpress --above-desk --pos bottom --isize 48 --idist 5 --nanim 4 --falfa 65 &
fluxbox
normal vapor
faint sparrow
#

I've run Raspbian without a window manager - just FBReader, as an e-book reader for my mom.

#

She couldn't get it - I had to trick her by using a second remote while she tried to use the space bar to page through - would consistently overshoot and skip 3 pages while reading My Antonia by Willa Cather ;)

heavy folio
#

can anyone recommend a good reference for creating a script that will power off / on the monitor with a keyboard combo?

normal vapor
#

or your own custom UI that can open up an application

faint sparrow
#

What exactly defines your own 'OS' to you?

#

What must it NOT have, or borrow, from something else?

#

To me, coding a Forth from scratch, for a bare metal implementation - is still cheating if you used a C compiler to construct any of it. ;) But assembler: that's good. ;) lol

#

"Because it's just a C program, then."

#

Now if all it is is a C program, and it runs on bare metal, then I'd say it qualifies also as an OS if it does anything useful with storage peripherals.

#

Busybox and a Kernel is probably close to claiming props on 'your own OS'.

normal vapor
#

well okay i really just want my own little UI to show up on boot

faint sparrow
normal vapor
#

and from there i just want said UI to be able to open different programs

faint sparrow
#

The kernel's text output is colorized these days during boot. 'plymouth' sort of hides this.

#

writing a proper graphics server is not trivial especially for the Pi.

#

Try 9front.org on a Pi for comparison.

#

It's totally not Linux.

#

(It's a port of Plan9 from Bell Labs and is one of the maintained versions).

#

The display manager provides that login dialog. The window manager is enabled only after logging in via the Display Manager.

#

startx was the traditional way to start X11 without a Display Manager (at all).

#

Then there's the Kodi people who will tell you all about using a computer more like an entertainment thing.

#

(Plex, too)

#

You really need to figure out why you want to change it from how it is now, and how much time that will cost in research.

#

Probably better to make one change that seems very impactful, and live with that change for a few months.

#

Get used to that baseline.

#

sudo systemctl stop <something.service> will disable most things. At least temporarily.

#

Possibly quite inconveniently.

normal vapor
#

hm

faint sparrow
#

Maybe
sudo systemctl status gdm3.service
has a response.

#

I don't remember which display manager is used.

normal vapor
#

well i really just want to open up a raylib application on the pi, and then when i click something on the raylib app, another program starts up.

#

is that simpler

faint sparrow
#

( I run xdm.service on a Debian AMD64 box and it's not well supported; surprised it isn't deprecated entirely )

#

Sounds like you want .xsession

#

Like I think I said before.

#

The first blocking program found in .xsession prevents the rest of it from executing, so normally, the only blocking program listed in .xsession is also the last program in the entirety of .xsession.

normal vapor
#

okay so if I just have an xterm, what do i do then

faint sparrow
#

Use it. If you type exit that ends the entire X11 session.

#

It's your primary shell and is used instead of a Window Manager.

#

There'll be a mouse pointer but no window handles as there's no window manager (at all).

normal vapor
#

so then how do i go about having the raylib application start on boot? is that a thing i can do

faint sparrow
#

I don't know what it is, but if it starts on boot as you call it, I'm not sure who gets ownership or control of it.

normal vapor
#

wdym

faint sparrow
#

Every process has an owner.

#

It's not customary to skip logging in. The autologin stuff is usually password-less login of an entirely specific userid.

#

(and is done in the context of a Display Manager).

normal vapor
#

ah crap so you mean if i need to skip the logging in, i need to bring back the display manager?

faint sparrow
#

Well on a traditional system, /bin/login is spawned and is one of the possible routes to a shell.

#

So you could replace /bin/login with something that acts a lot like it, but asks for no credentials, and starts automatically.

normal vapor
#

oh okay

faint sparrow
#

Remember that many of these kinds of things can be replaced by shell scripts that stand in for them.

normal vapor
#

ah

faint sparrow
#

Everything begins with init and even init can be a shell script!

#

Your security model falls apart pretty fast by doing all of this.

#

If it's not networked then it doesn't matter unless you have a snoop in the house with physical access.

normal vapor
#

yeah i don't plan on connecting it to the internet

faint sparrow
#

So that opens up a lot of freedom to bend the rules wrt security.

#

You could literally replace init with

#!/bin/sh
echo Hello World
#

I don't know what happens when it prints World -- probably kernel panic's as init isn't supposed to exit (ever).

normal vapor
#

ah

#

wait so now that we don't have to worry about the login

faint sparrow
#

There used to be an official mechanism for .. being logged in without making an effort to do so.

normal vapor
#

oh

faint sparrow
#

TinyCore Linux defaults to that mechanism btw.

#

You have to coerce TinyCore to demand a login - it doesn't want to, out of the box.

normal vapor
#

ooh

#

how would we go about opening the raylib app though? and what does the ownership have to do with it

#

(by the way thanks for helping me)

faint sparrow
#

It can be tricky to start something upon login.

#

I like to use a semaphore that enables or disables a thing.

#
 $  > .special_event_a_is_enabled
#

like that.

#

Then some script tests for existence of that semaphore.

normal vapor
#

what's a semaphore?

faint sparrow
#

(also called a DROPFILE in MS-DOS BBS door-speak ;)

normal vapor
#

i only know it as the flag thing

faint sparrow
#

It's a blank file that doesn't have to be blank.

normal vapor
#

a blank file that

#

wait

#

what?

faint sparrow
#

If the file merely exists, that's a 'flag'.

normal vapor
#

okay

faint sparrow
#

It's a file created for the one purpose of controlling something, simply by existing.

normal vapor
#

ohhhhhhh

faint sparrow
#

It's a way to use the filesystem itself as a means to pass state information between processes.

#

It's also a great way to get around permission issues when owner A wants to control owner B's program.

normal vapor
#

by the way how do i actually go about running all of these commands?

#

like, when i run the commands

faint sparrow
#

I'm guessing you login and type commands at the shell prompt. ;)

normal vapor
#

do they work every other time

#

agh i know that was a stupid question but I'm trying to word it properly

#

like, if i type those commands

faint sparrow
#

You're asking if the semaphore toggles the state it's controlling.

normal vapor
#

not quite

#

if i type all of the commands you gave

#

when i reboot it, will it work again? or do i have to type the commands every time

faint sparrow
#

That's way too broad to answer.

#

systemctl generally retains what you told it to do across power-down boots.

#

(with caveats)

#

So if you turn off the Display Manager and power it off, chances are good it'll still be off when you power up again.

#

have to test it carefully.

#

If you replace init you won't regain control again, by any easy path.

#

Probably would need to mount the media in another PC and edit it there, cold (mounted but not supplying anything meaningful to the actively running system).

#

So with an RPi you'd yank the SD card from the Pi, jack it into a laptop, and mount the volume there, and do your edits (restore init to what it once was).

#

This is why you have to want it a lot, because once it's installed, a new init can only do what you programmed it to do. ;)

#

If you can't even get to it to change it back, that's a lot of labor to do it the harder way I just described.

normal vapor
#

gotcha

faint sparrow
#

Here's a good piece of news:

#

The Linux Virtual Console is entirely separate from the graphical user interface.

#

That gives you an ongoing text environment to type stuff in. It provides several shells.

normal vapor
#

oh that's nice

faint sparrow
#

Control + Alt + F1 may access the first one; use a different F key if you want to access more of them.

#

I used nothing but the Linux Virtual Console for at least two years - no graphics at all. 4 megabytes of RAM. ;)

normal vapor
#

whoa

faint sparrow
#

Could still build a kernel!

normal vapor
#

that's nuts

faint sparrow
#

4 megs wasn't quite enough to run graphics. 8 mb was about enough.

#

Circa 1992 or so? ;)

normal vapor
#

that's crazy dude

faint sparrow
#

Not at all.

#

Graphics was expensive then.

#

Doing it on a text display was a lot cheaper.

#

The usual text display was .. 800x600 and 16-colors iirc. Maybe 256 colors.

#

At that time you could still find programs to display JPG's right at the console.

finite bay
#

I was rocking 4096 colors on my 512kb Amiga just fine.

normal vapor
#

no but the fact that you could actually do all that

faint sparrow
#

;) @finite bay

#

Building the kernel in one VC while running a small program in another was kind of exciting.

#

a kernel build was a good test of the overall system.

normal vapor
#

that does seem very cool

#

wait so why would starting something at login need a semaphore again?

faint sparrow
#

Took 25 minutes. ;)

#

The semaphore is there to act as a flag.

#

A script you write looks for it.

#

I used to use cron jobs with them.

normal vapor
#

i see

faint sparrow
#

I had a system going for a while that looked for the semaphores every 60 seconds.

#

If it found one it dialed someone's telephone number.

#

That's how my brother got a free wake-up call, on a schedule, for over a year.

#

He decided not to continue but we did it for at least a year.

#

So the semaphores were used to establish the permission window (in time of day) for those outbound calls from the modem.

#

Another cron job dropped the semaphores only at the right times, I think.

#

It was a bit complicated, because I was basically controlling cron by dropping semaphores.

#

Pretty sure I was circumventing ownership/permission stuff because the way I wanted to do it was ..

#

.. just didn't line up with the usual separation of users and permissions.

#

I don't remember why it was so important to do it the way I ended up doing it.

#

But it worked good.

#

If he phoned and said 'dont give me a wakeup call for the next 3 days' I had an efficient means to block them, without reexamining how I implemented anything. ;)

#

I just basically dropped an 'override' semaphore that says 'never dial the phone if you see me'.

normal vapor
#

i just had a moment while you were talking where the concept of semaphores finally clicked in my head

faint sparrow
#

It is the right term but I don't remember its origin. ;)

#

flag. semaphore. flag. ;)

normal vapor
#

ah

finite bay
#

Dijkstra used the term semaphore first in a computer context as a way to communicate between processes.

faint sparrow
#

;) that'd give it lots of traction. ;)

#

When you study alone a lot you pick up on terms and use them and even overuse them until they become the word for the idea.

#

I called it lie*knucks for years. ;)

#

Then I met someone face to face who automatically said lynne nix.

#

In the computer club, the only projects we ever worked on together were going paddling on the river in kayaks, and repairing cars together. But never on computer projects was there any shared interests. ;)

#

🛩️
Here's an init that won't crash for a while:

#
#include <stdio.h>

int main(int argc, char *argv[])
{
  printf("Hello world\n");
  sleep(999999999);
}
#
gcc -static hello.c -o hello
normal vapor
#

oh ok

#

also, one more thing

#

let's say the UI opens up

#

now i wanna start another program when i click something in the UI

faint sparrow
#

exec in general replaces itself with the new thing, or something very similar to doing so.

#

You can also spawn a child process.

#

The old Perl book (The Camel Book) was explicit on the latter and how it was done.

normal vapor
#

i see

faint sparrow
#

So much so that I only learned how to do it in a Perl script. ;)

#

(and have since forgotten)

normal vapor
#

i see, well that's all for now. thanks a ton for your help!

faint sparrow
#

You're welcome. I don't necessarily remember anyone's handle so don't be offended if I huareu you the next time. ;)

vernal stream
#

Hello, i just soldered up my pico. How do i know the solder worked on each pin? (No good at soldering :(. )

hybrid vortex
#

@vernal stream you could write some code that will output power to every digital pin and use that with an LED to test if they are actually outputting power

#

You can also use that to test all the ground and power pins.

vernal stream
#

Cool, l’ll try that, thanks.

grim herald
#

Hello, I am trying to get a Garmin Lidar-Lite v3 up and running on a raspi and I am getting "System failure" in a loop. IS this the right chat to look for help on this?

umbral sable
#

Yep, this is a reasonable place. Probably the next step would be to paste the full error message to see if people can help narrow down the cause. And if you had something booting previously but then it broke, explaining what changes you made would be good.

wise sonnet
#

Numpy has been installing on my Pi Zero for like an hour.

#

Is that typical?

#

Oh man finally. Literally took like 80 minutes or so

opaque wagon
#

Yea for some reason Pip tries to build numpy when you install it on a Pi

eager snow
#

Hi guys, I am making and USB Rubber Ducky from my RPI Pico, sending stuff through HID, but one problem I ran into is that my rpi opens as a flash drive. Is there any other way of disabling it, from the rpi side, other than in autoplay in windows ?

rough heart
#

I had this problem with a PyRuler, and just decided not to worry about it.

#

Not sure how useful it is though...

#

...yet! always have hope for the future! 🙂

normal vapor
#

hey if i disable the login on my pi, what could potentially happen if i connect to the internet?

eager snow
faint sparrow
#

@normal vapor Sometimes I type the same password I used for login, into ssh, to authenticate to that machine.

#

So if sshd is running, there's the possibility they get in with no password. Would have to audit for things like that.

normal vapor
#

ah

faint sparrow
#

To test, either press the spacebar once, then ENTER, instead of a password (if asked) .. or just press ENTER once.

#

I think the spacebar is used when you've managed to coerce the security model into letting you have a single space as your password. ;)

#

(probably by manipulating /etc/shadow directly)

#

There's a way to generate passwords (including the salt) in the format used in /etc/shadow.

normal vapor
#

ah

#

thanks!

faint sparrow
#

man passwd or man shadow -- I don't know where the info is. ;)

#

afaik when you login, the computer encrypts your password using the same salt stored in /etc/shadow and tests for a match to the stored, encrypted password.

#

That's why your password itself isn't even stored on the computer you login to.

#

Only its encrypted version is.

#

Instead of trying (in any way) to decrypt your stored password, instead, a new password you type in, is encrypted (using the old salt) and if there's a match, the machine assumes you must have typed in the same password as the one that was stored (encrypted).

#

It never does learn your password (well, ideally ;)

#

All the salt does is guarantee that when you encrypt your password the first time (and then a second time) the stored version (encrypted) is unique.

#
 $ echo hellojanuary | md5sum
3dcaa3a0a388d7caab44dc8add01f07b  -
 $ echo hellofebruary | md5sum
031de583526676f741225d382cc07a83  -
 $ echo hellojanuary | md5sum
3dcaa3a0a388d7caab44dc8add01f07b  -
#

Just store january or february with the encrypted password, so the salt can be recovered.

#
 $ cat /etc/my_kludge_passwords
:george:january::3dcaa3a0a388d7caab44dc8add01f07b  -
:georgia:february::031de583526676f741225d382cc07a83  -
#

george and georgia have (in fact) the very same password, hello.

#

But we cannot tell that, from the contents of my_kludge_passwords even though the salt of each (january, february) is exposed in that file, in plaintext.

humble cipher
#

so, this is a bit of an embarrasing question, but does anyone have experience with the pi zero case, the one from the pi foundation? Cause I keep trying to make it fit inside, but it just doesn't want to align, or go down. The inside of the case also has this edge that doesn't let me align it properly, and I don't wanna be more forceful with it because im afraid of breaking something

uncut lagoon
#

i had the same problem with a 3rd party case

#

in the end, i had to put more force than i was comfortable putting and now it's there forever

steady rose
humble cipher
#

@steady rose yes, that one

steady rose
#

should just snap in

#

put the bottom edge of pi zero in first, and then press down where arrow is to get past that clip thing

humble cipher
#

which part is the "bottom edge", the side with the usb and hdmi ports?

steady rose
#

yep. also bottom in image above.

humble cipher
#

yes, it worked! thank you so much, cater

steady rose
#

cool. np!

tired pendant
#

Hi Everyone. . . I’m new to the group. I’m looking for help in finding a product for a Raspberry Pi 4 (hopefully sold by Adafruit). I’m wondering if I should post the project in here or in the help-with-projects. While I’m looking for a specific product, this is mostly help with a project. Thanks for any direction.

ripe pike
ripe pike
tired pendant
#

Hi Everyone!!! I’m new to the group and I’m looking for help/support. I am trying to either connect multiple WiFi antennas to a single Pi 4 OR multiple Pi’s with a single antenna. Without knowing ALL of the ports on a Pi 4 is there a way to tap into it to support multiple antennas together either via USB (which seems most likely) or via some connector on the board? I’m wondering if Adafruit sells something like that and/or if they sell something that could get the project off on the correct direction. The worse case scenario (or proposed idea) for the project I am working on is to use four different Pi 4’s simultaneously with individual antennas for each one. I’d rather use a single Pi 4 with as many antennas as possible. To add another layer, these would likely be built into an enclosure; so, I would like a small rubber or flexible antenna with a reasonable amount of gain on it (maybe 6db). To make it a little more tricky, I would like to power one or all with a lightweight/efficient battery pack (or battery packs). Any thoughts, direction on Adafruit products, or advice would be greatly appreciated.

rocky flare
#

Morning @tired pendant This kind of project has been common with the RPi. What most people do is use USB wifi modules. So would would have four + the RPis wifi to use. But it is a non standard configuration and so will need some linux skills to make best use of. I'll just pop onto google as I know what I am looking for. Should find something that may get you started.

mint pagoda
rocky flare
#

This is a good article too. I hope it will get you started. 🙂 https://null-byte.wonderhowto.com/how-to/wardrive-with-kali-raspberry-pi-map-wi-fi-devices-0176558/

WonderHowTo

Surveying a target's Wi-Fi infrastructure is the first step to understanding the wireless attack surface you have to work with. Wardriving has been around since the '90s and combines GPS data and Wi-Fi signal data to create accurate, in-depth maps of any nearby Wi-Fi networks you come within range of. Today, you'll learn to launch this stealthy,...

tired pendant
#

@rocky flare Yes, that’s pretty close to what we’re trying to accomplish and thank you for that. I’m working with a team that is very proficient in Linux so I don’t think that’ll be a problem. Do you have any preferred USB modules?

#

@mint pagoda Thanks for the info. That makes sense as to why there are not a ton of solutions out there for this project.

wise sonnet
tired pendant
#

What about the potential for using an adapter or somehow connecting an SMA connector to the board to use a smaller (stubby) antenna? Even if it’s just a single Pi with a single antenna? I have been Google searching, but with so many antennas out there, it’s hard to know which ones are the top notch antennas that work without too many hiccups.

hybrid vortex
#

@tired pendant I believe standard raspberry pis don’t have the ability to connect an external antenna to the internal wifi module but the compute module 4 has an antenna connection you can use.

mint pagoda
#

I just got a CM4 up and sorta running. Can't get Bluetooth. I saw when I attached the antenna that my WiFi indicates 5G. Never noticed it before.

tired pendant
#

@hybrid vortex and @mint pagoda that CM4 might be just the thing I’m looking for over the Pi 4. Just to be clear, the CM4 is it’s own separate board and doesn’t need to integrate with a traditional Pi 4? Also, it looks like the CM4 mounts on top of the CM4 IO board. Is that correct? Sorry about all of the questions. I think your efforts might have landed me on the perfect solution.

mint pagoda
#

@tired pendant just keep in mind, the CM4 and IO Board aren't your everyday Pi. Different power requirements, housing, full size HDMI verses micro. Not as plug and play as a Pi4 B+. Your Linus bros shouldn't have any problems though. Just don't get the Lite version unless you don't need on board storage.

hybrid vortex
#

@tired pendant the cm4 is a small module that you connect to an io board. There is an offical board with everything the pi supports available but there are some 3rd party boards that have been released that might suit your needs better, depending on your requirements.

jagged dawn
#

\

quasi bison
#

So am I crazy or the best way to use a piezo buzzer on the rpi with python is to build an opamp integrator with a diode smoothing circuit on the end to give it a nice smooth sine wave to get the nice crisp beep we all know and love? There must be a better way!

vagrant sonnet
#

Can I put a 3v water pump to a 5V relay?

quasi bison
vagrant sonnet
#

ok thx, can the pump draw power through the relay? Or do I need an extra external power? Got a raspberry pi 3 --> 5V relay --> 3v pump

vagrant sonnet
#

So I just put a battery in between to power the pump and the relay is just my on/off switch

quasi bison
quasi bison
vagrant sonnet
#

Ok, need to learn more about this. I orderd this as a relay

#

5V 4-Channel Relay interface board, and each one needs 15-20mA Driver Current
Equipped with high-current relay, AC250V 10A ; DC30V 10A
Standard interface that can be controlled directly by microcontroller (Arduino , 8051, AVR, PIC, DSP, ARM, ARM, MSP431, TTL logic)
Indication LED's for Relay output status

quasi bison
#

I cant tell just from the picture but you may need an external mosfet to actuate those relays the pi only puts out 3.3 volts on the i/o pins

sturdy knot
#

Seems like my RPi3 entirely lost its wifi interface somehow

#

Just can't seem to enable it or find it with lshw i'm stumped

faint sparrow
#

@quasi bison You could probably build a simple Morse Code sidetone generator quite inexpensively.

#

Those are sine wave oriented.

faint sparrow
#

Sounds PWM oriented and just uses an R/C circuit for shaping, I think.

#

Resistor in series with Pin D11 and then a junction to the speaker/transducer with a capacitor to ground, at that node.

#

Should sound good enough to your ear I'd think. Might suffer from low amplitude.

#

A BJT transistor circuit would allow amplification to a louder sound pressure I'd think.

ripe pike
#

Is there anyway to know how much current is used by the Rpi computer (not including the GPIOs or rails)? I'm asking because when I run a heavy operation on the Pi (a database backup), I see a drop in current available to the 5v rail. Given a way to measure the Rpi's current, I can start to profile and optimize my code

unreal stirrup
#

Hi there. I have a Linux question. I am trying to get my python script to run at startup. I use to have it working but then I installed a pip3 package (Redis) and now it won't work. My script fails on import of Redis (which is there and runs perfectly from the terminal if I manually start my python script). So I am thinking that maybe whatever points my python to the pip3 directory (I am not using a virtual environment) doesn't load before my program loads?

#

sudo nano /etc/systemd/system/bootmars.service is the file I wrote for the startup

#

and i have [Service] Type=idle which i understood makes my script go last after everything else starts

ripe pike
#

@unreal stirrup it could be a permissions issue when you used pip3. When you do sudo pip3 ... , it will install the package system wide (so any program has access to the package), whereas pip3 ... will only install for the current user (probably pi in your case). So that may explain why it won't work on startup, but will work when you run the script manually.

unreal stirrup
#

i will check! thanks for the idea CAM.

#

I am not very good with permissions but I just typed pip3 install redis (without the sudo) and it seemed to install it fine as the pi user 😦

ripe pike
#

sure it will - both commands will work, but only one command (prepending sudo) will install system wide

unreal stirrup
#

..... ok I will try sudo pip3 install redis

#

Yes!Yes! thank you. I knew that there was things that the super user could do that the pi user couldn't. I had no idea that the pi user could do things that the super user couldn't. I really appreciate your help Cam.

ripe pike
#

🙌 glad it worked!

unreal stirrup
#

I hope someone can help you with your measuring current to the pi (it is totally out of my league)

sonic cedar
#

anyone have experience with I2S audio for the Raspberry Pi, can't seem to get a seeed microphone array to capture audio, though it plays audio out just fine. I see the device when I right click the audio icon as (Audio Outputs -> Seeed), (Audio Inputs -> Seeed) and (Device Profiles... -> Seeed -> Multichannel Duplex). I've tried using their Terminal, Python and Audacity example but without much success. It's like something hasn't changed correctly or isn't the default or right hardware ID, though. I have tried this "arecord -D hw:2,0 -f S32_LE -r 16000 -c 8 to_be_record.wav &" and get the following error "arecord: pcm_read:2145: read error: Input/output error". When I try it with any other hardware ID, it says no such file or directory, which indicates that hardware 2 is correct but just not working. They python script they have returns this as well "Input Device id 2 - seeed-8mic-voicecard: bcm2835-i2s-ac10x-codec0 ac10x-codec.1-0035-0 (hw:2,0)"

#

when I try to run this command "arecord --device=hw:2,0 --format S32_LE --duration=10 --rate 44100 -c1 test.wav" it returns "arecord: set_params:1345: Channels count non available"

faint sparrow
#

@unreal stirrup I used to graft my own stuff and reinstall it after program updates broke itt.

#

That script runs when it's supposed to and isn't using a sanctioned method per se.

#

Since it works, and is the first thing I came up with that does, it's what I use.

#

The /etc/init.d directory used to hold all my funny-business scripts that worked during boot.

#

Haven't used that directory in the last n years (since the new systemd whatevers became a thing).

unreal stirrup
faint sparrow
#

@unreal stirrup The /etc/* tree is more for your modification whereas the /lib/* tree is more for the Linux Distribution packages (*.deb) to maintain 'automatically'.

#

Fairly rare to modify the contents of /lib/* locally (per-installation).

#

/etc/* tends towards tool-agency (use the tools provided; you can modify them manually but the toolchain was designed to modify them .. correctly).

#

That's why what I did wasn't as legit - I modified the /etc/* tree contents to suit, knowing auto installations would be likely to overwrite what I did.

#

(On regular Debian systems I usually add new custom configs to the /etc/grub* stuff, mostly.)

#

/etc/grub.d/<nn>_custom

#

(Generally additive changes by adding new files there)

sturdy knot
gritty thicket
#

Why does the I2S DAC HAT for the pi not use the 3.3 v pins for power but rather has its own buck converter to step 5v down to 3.3v? Is it because the 3.3v output on the Pi has a current limiter?

#

pinout.xyz says that the 3v3 pins on the Pi can provide 500 mA, and the 3.3v buck on the I2S board provides minimum 600 mA, could that be it?

#

found an answer: "The 5v supply coupled with a 3v3 regulator is recommended for powering 3.3v projects."

hoary mesa
#

50mA

wide kiln
#

Am I doin something wrong here? The diode has a built in resistor 5v/12v, I’ll post a better picture of the breadboard

#

Actually I think u can see it quite good there

ripe pike
# wide kiln Am I doin something wrong here? The diode has a built in resistor 5v/12v, I’ll p...

You're close: you need to connect the LED to power and ground now. Take a look at this image: https://images.ctfassets.net/tvfg2m04ppj4/4RTiBRQJPNOQPDaKUh2brQ/b9a4c44c5549ac58cbdf907535727fc3/Breadboard_Anno.jpeg?w=800
It's how breadboards are laid out under the plastic. You've connected the blue and red rails to the Rpi, but now you need to connect a leg of the LED to positive, and the other leg to ground. So you'll need two more cables. Does that help?

wide kiln
#

Wait, then what is the reason for breadboards? Lmao

#

I thought the Power would run through the whole row

#

Oh wait

#

So it is reverse, the 5v is all throughout the red column

faint sparrow
#

The blue colored locations are all interconnected on one side but they are not connected to the 'other' blue row.

#

Same with red.

#

All black dots that are shown as connected, are connected.

still linden
#

Lil' Help please. . .
Running a Headless RPi4. Installed a fan in it.
Following directions from here:
https://www.raspberrypi.org/products/raspberry-pi-4-case-fan/
Under section, "Using your fan" (towards bottom of the page),
I opened my rVNC VIEWER and typed in: sudo apt update
GOT THIS. . . (1st pic below)

Raspberry Pi

Works with Raspberry Pi 4 and the Raspberry Pi 4 Case. Designed for overclockers and other power users, it keeps your Raspberry Pi 4 at a comfortable operating temperature even under heavy load

#

. . .What does it mean see "apt-secure(8) manpage"???
Do I type that in my TERMINAL?
. . .OBVIOUSLY a NEWBIE over here!!! 😆

wide kiln
wide kiln
#

@ripe pike Sorry for the ping but since ur the one who uh helped me, there must be some breadboards that have built in male to male wires from the + & - to the sockets in the middle that you can pop on right?

turbid zealot
# still linden Lil' Help please. . . Running a Headless RPi4. Installed a fan in it. Following...

You could try ignoring the issue. The rpimonitor provides a web server. If you don't use it, you don't care. If you do care, see if you can build from the github source https://github.com/XavierBerger/RPi-Monitor (probably not for newbie even if it might be easy). The instructions about apt-secure are for the repository creator, not the user (you) (see https://www.commandlinux.com/man-page/man8/apt-secure.8.html). It looks like the binaries have not been updated in a long time.

turbid zealot
#

Lol

still linden
# turbid zealot Lol

Is there such a thing as, "starting at the VERY beginning"???
Cuz that's where I need to be!
I appreciate your attempt to help, AND. . .
I'm left feeling CLUELESS.
Is there ULTRA-BASIC-NEWBIE-SOURCE MATERIAL???

faint sparrow
#
 $ man 8 apt-secure
turbid zealot
#

yeah but the whole idea of apt-secure is bad for noob. the guide bit-rotted

faint sparrow
#

I assume the Wizard of Oz "I'd turn back if I were you" sign is posted. ;)

still linden
#

Thanks Y'All! AND. . .
. . .In other words. . .
It's one thing to DO-STUFF, and get it to work. . .
Quite another to know-WHY I'm going what I'm doing.
Where's the BACK-OF-THE-LINE STARTING POINT???

turbid zealot
#

maybe nis can get u something. for me it's like "i drive a car now I want to know how it works".... the answer isn't take apart your car, it's find a lawnmower to tear apart first

still linden
turbid zealot
#

Do you know how to navigate in a shell? Like cd and stuff?

#

If I say "go look in /etc/apt and check out the files (and directories) there", will you find it?

still linden
turbid zealot
#

Sounds like you should look for "shell commands tutorial" maybe? Or "Bash Tutorial". Honestly when I learned this stuff it was from a book.

still linden
faint sparrow
#

Not sure what you asked me.

turbid zealot
#

needs a bash tutorial or something

faint sparrow
#

My mom: "I ask you what time it is and you tell me how to build a clock."

#

She actually said that to my face. ;)

#

It was good feedback, as you can see.

still linden
turbid zealot
faint sparrow
#

It's not simple. Einstein's quote wasn't well-known when I first heard it.

#

"Make everything as simple as possible - but not simpler."

#

Think of all the people who will never learn what you're trying to learn this very day. Think of why they will never learn it.

still linden
still linden
#

. . .off to play. . .
Thanks again for the 'hep!!!

faint sparrow
#
 $ echo hello > dogtags.txt
 $ cat dogtags.txt
 $ date >> dogtags.txt
 $ cat dogtags.txt
 $ less dogtags.txt (press Q to Quit the 'less' $PAGER)
#
 $ zless /usr/share/doc/binutils/NEWS.gz 
#

(in another terminal):

 $ ps auxwwww | egrep less
still linden
faint sparrow
#

If you create a secondary user you can explore with fewer consequences to your 'favorite' account.

wide kiln
#

What would this do? Owo

#

I would probably need a resistor tho ig. 220R?

faint sparrow
#

If you put an LED across a coin cell you made a 'throwie' and they're reputed to be okay.

#

But normally you instantly burn out an LED if you don't use a current limiting resistor in series with the LED.

#

I think it makes a sound, but a small one, and no smoke. Just kind of TINKS out. I don't remember. Haven't smoked an LED in a while.

#

220 is low but may be acceptable.

#

I try to start people with 2k and see how that goes, first.

#

2k probably covers a 12v supply situation so I don't have to do 20 questions with them.

#

Pretty sure 4.7k gives a decent brightness even at 3.3 V.

#

But I don't remember and don't need to - I have 20x of every single resistor value, and 100x of the common ones. ;)

ripe pike
flat dirge
#

Is anyone familiar with the RPi Compute Module 4 & I/O Board? I was finally able to flash the eMMC with a new image of raspbian! It appears that the USB ports are not enabled by default and the ssh port is not open. I've found that the /boot/config.txt file needs to be edited to add an overlay, but I don't know how to get into actually edit the file! Anyone have the magic key?

faint sparrow
#
 $ sudo mkdir /mnt/temp-xx.d
 $ sudo blkid
 $ sudo mount /dev/sdxx /mnt/temp-xx.d
 $ cd /mnt/temp-xx.d
 $ ls
#

something like that.

#

blkid should expose which one's VFAT which is probably the correct volume.

flat dirge
#

@faint sparrow interesting, ok, let me try

#

@faint sparrow I'm not seeing a new /dev/sdxx entry between a sudo blkid before powering up Compute Module and after

faint sparrow
#

Do you have connectivity to copy and paste from blkid directly to discord?@flat dirge

#

Just the /dev/sxxx column and the TYPE=foo columns are of interest.

#

TYPE will show what it is in terms of a filesystem type. VFAT would be the one. I think.

flat dirge
#

@faint sparrow I believe I can... what is the syntax to filter out all /dev/loop entries?

#

@faint sparrow ala grep

faint sparrow
#

something like:

 $ sudo blkid | egrep TYPE | egrep sd
#

You can remove all the hexadecimal as it's not needed here.

flat dirge
#
/dev/sda1: UUID="FDAE-7A1A" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="90e90cc2-1c50-4c22-bf51-43edc33a6f29"
/dev/sdb1: UUID="0dd892a3-9c0b-4bbb-9431-75485b384c32" TYPE="ext4" PARTLABEL="dragon-lair" PARTUUID="0f4d6a85-2dbb-4482-8983-e3ba38899fd3"
/dev/sdb2: UUID="785a2a75-9751-4770-91f1-b5f3c8997c3a" TYPE="ext4" PARTLABEL="back-up" PARTUUID="d7c0fd7a-be69-4100-8889-9b5d12d16e4d"
faint sparrow
#

sda1 is vfat

#

So just mount sda1 on /tmp/something-or-other

#

I don't fsck vfat volumes but I'm careful.

flat dirge
#

@faint sparrow yes it is but it isn't the compute module, it's the boot drive of my desktop computer

faint sparrow
#

;)

#

Well what is the compute module's response to blkid? Or is there media you can remove?

flat dirge
#

@faint sparrow thats the thing I don't know how to get into it. I have no keyboard, mouse or ablity to ssh in to edit anything

faint sparrow
#

I have no idea what you did or why you expect something good is already in place. ;)

#

I assumed a removable SD card was standard. If it's a chipped card** I'd think the official instrux would help.

** soldered on

flat dirge
#

@faint sparrow you'd think... one has to flash the eMMC memory with an image of the os

faint sparrow
#

Also I had the impression the compute module needs its motherboard to host it.

flat dirge
#

@faint sparrow it is on the I/O board, but they don't enable the USB ports by default.... it's all a bit weird. I'll bang on it and see what I see

faint sparrow
#

oh haha

#

Well what about the USART

#

maybe there's a getty running on that USART

#

hook up a CP2104 to it.

#

That's to enable USB.

#

Sounds like a lot of hoops to jump through to get to Hello World.

midnight stone
#

how powerful is the raspberry pi zero w wifi antenna

#

i'm doing some outdoor application and would hope that the wifi signal can reach the board

#

my phone manages to get wifi signal in the spot im planning to have the board in

hollow brook
#

hello , I just want to know that adafruit fingerprint right now would be able to enroll with id but I want to make it be able to store name and email as well. So i want to know that is it possible or not ?

warped citrus
#

@hollow brook

not played with it, but assume its just storing images/scans and allowing you to compare them? so anything outside of that really falls into 'your responsibility' in terms of code?

what you want is a flow that prompts for a username/name, email and then allows you to 'enroll' once successfully enrolled you can then associate that 'scan' with whatever other meta information you want and store it (in your case name/email).

then when a user comes back, if a match is found you can 'lookup' the associated meta and do whatever you want.

new user

  • some 'create account' flow
  • prompt for meta data/name/email
  • scan until successfully enrolled
  • take scan id and store alongside meta into 'users' data store (sd/flash or whatever)

existing user

  • prompt for scan

no match?

  • boot 'em out/ask if they want to 'signup/enroll'

match?

  • take the scan/enrollment id, look up the meta data/name/email and process whatever you want using that.

something like that anyway... 😬

hollow brook
#

@warped citrus thank you😆

warped citrus
#

not sure if you were expecting a code solution @hollow brook but surely thats the fun part 😉 you can always post your progress and ask for pointers/guidance if/when you get that far!

hollow brook
#

I'm new for coding, so I'll try my best 👍 @warped citrus

sturdy knot
#

Can I just pop the sd card from my Pi3 into my Pi4?

ruby night
#

@sturdy knot It may be OK if the SDCard has the very latest version of PiOS on it. Older version of Raspian won't work.

sturdy knot
#

Yeah it got buster :)

ruby night
#

but still has to be recent

#

I have not tried it -- but in the past there were issues going from 3 to 4.

#

Pi 4 required a newer version .

sturdy knot
#

It worked 😄

heavy folio
#

is sudo enough to run a script with root privilege?

faint sparrow
#

@heavy folio Most of the time, yeah.

#

You can sudo su to get a root shell.

#

Then su - root ;)

heavy folio
#

if i want to run a python script with root, is
sudo python demoscript.py
enough?

faint sparrow
#

sudo doesn't propagate the way people might think it does.

heavy folio
#

ok

faint sparrow
#
 $  sudo su
[sudo] password for the_login_id: 
root@the_hostname:/home/the_login_id# exit
exit
 $    mkdir temp-xx.d
 $    cd    temp-xx.d
 $    pwd
/home/the_login_id/temp-xx.d
 $    ls -la
total 16
drwxr-xr-x   2 the_login_id the_login_id  4096 Mar 29 19:43 .
drwxr-xr-x 178 the_login_id the_login_id 12288 Mar 29 19:43 ..
 $   date >> sample.txt
 $   cat sample.txt 
Mon Mar 29 19:43:42 UTC 2021
 $   sudo cat ./sample.txt > /etc/grub.d/hello-there-pilgrim
-bash: /etc/grub.d/hello-there-pilgrim: Permission denied
 $ 
#

'sudo cat' didn't propagate to the '>' redirect to file.

#

'cat' I assume had root privileges.

#

I do put in 'sudo' in shell scripts and they do seem to do predictable things that way.

#

I have never figured out how to give the '>' redirect root privs tho. ;)

#

(or pipelines in general - I don't use them with sudo as I don't understand the effects)

#

'su - root' gives a true root shell afaik

#

Easiest way to get to that is to 'sudo su'.

#

('sudo su' gives a sudo-empowered root shell of some sort; 'su - root' is empowered to act due to the immediate 'sudo' privs just gained).

#

afaik 'su - root' is the equivalent of logging in as root, using the 'getty' and '/bin/login'.

#

(The 'getty' is the 'listener' on the Linux Virtual Console - Ctrl + Alt + F1 to access the first instance of it)

heavy folio
#

interesting

faint sparrow
#

Change F1 to another function key for additional instances (six of them by default, on many distributions).

#

The GUI is usually on F7 in this scheme.

#

It's like having seven separate keyboard and display pairs. ;)

#

virtual KVM switch, pretty much.

heavy folio
#

is it possible to set up a bash file to launch a python script with root privilege? i'm looking to create a global hotkey

faint sparrow
#

I don't do that (anymore) but sure I don't see why not.

#

I used to use cron as a convenience to launch scripts (on a timer of some kind).

#

I'm not sure what a modern version of that would be for Debian.

heavy folio
#

hmm

faint sparrow
#

I don't mind using sudo manually.

#

So that's how I do it - in the rare circumstance where I'm bypassing existing system tools (usually because I can't find the one I want, not to circumvent their design)

#

If I reaaaaly think I need root, I do the double thing with 'sudo su' followed by 'su - root' or if I'm just lazy and don't want to figure it out.

#

(there IS no root password on any of my machines ;)

#

(so logging in as root isn't an option)

#

I do all that chicken and egg privilege escalation setup when I install the system for the first time.

#

(so for the first hour a new machine does have a root password)

#

That's the only ugly way I know to execute an arbitrary shell script automatically during the startup.

heavy folio
#

thanks for all the info

faint sparrow
#

You're welcome.

heavy folio
#

all of this was a huge help, thanks again

solar meteor
#

so if I want a program to input all files (list001.pdf, list002.pdf...) of a type i can use a wildcard (foo /home/pi/*.pdf). Lets say that foo edits said files. How do i keep the files in the same way so that they keep their respective numberings (001, 002...)?

umbral sable
#

I don't understand the question. You start from a list of the filenames, so you can keep track of what you do to them, right?

opaque wagon
#

If the program can batch edit a bunch of files it should just edit the file contents without touching the file name AFAIK

cyan rivet
#

Anyone had any luck with using multiple I2C busses on RPi 4B? When I run i2cdetect, it sees devices fine, but any circuitpython code seems to complain about the I2C busses not being hardware I2C. I've seen a few pieces of documentation that seem to indicate there are multiple hardware I2C busses on an RPi 4B. Is this not the case?

steady rose
#

there are only 2 hardware i2c buses on the pi:
https://pinout.xyz/#
the typical one at GPIO2/3 and the EEPROM dedicated one at GPIO0/1

#

there's a software I2C overlay you can use on any GPIO pin

#

why are you trying to use more than one I2C bus? a single bus can have multiple items attached

faint sparrow
#

@solar meteor

for index in "file001" "file002" \
    "file003" "file004" \
    "file005" \
    "file006"
    do
        echo ${index}
        sleep 2
    done
exit 0
#

No space after the trailing backslashes ('\').

#

They extend one long logical line over (possibly) several physical lines (lines with line-break characters at the ends of them).

#

Simple one-liner:
for index in p q r s t ; do echo ${index} ; done

#

So I usually leverage 'ls -1 <pattern> > ./captured.txt' to generate the list I want to operate on.

#

Early in the process I replace all line endings with those backslashes, probably after adding the quotes for the filenames (if they need them; they may not).

#

and gradually build a shell script out of the original './captured.txt' (which gets renamed to './foo.sh' at some point).

#

I don't want to do much juggling on the command line so I use scripts, and leverage 'echo' a lot, to test assumptions inside the script. A 'sleep 2' can save trouble as it slows it down some.

#

When I'm happy the script will do what I think it will do, I test on a recursive copy of the original, in case I'm just wrong about what the outcome is going to be. ;)

#

When that succeeds, I go ahead and operate on the original, perhaps after making (yet another) recursive backup copy of it.

muted ether
#

didn't know where to put this, but I'm super excited for this: https://www.crowdsupply.com/diodes-delight/piunora/updates/it-begins

Crowd Supply

I'm excited to announce that the crowdfunding campaign for Piunora has
begun! This has been a thrilling journey for me. It all started with a little
weekend project back in December 2020 that ended up with me starting a side
business—Diodes Delight—and developing Piunora into a real product.

opaque wagon
solar meteor
cyan rivet
# steady rose there are only 2 hardware i2c buses on the pi: <https://pinout.xyz/#> the typica...

Hey Cater. I'm actually trying to connect multiple SCD30 sensors and they don't have an option to change the address. Also, I'm a bit confused by the documentation:

This mentions there is up to 6 I2C busses on the RPi4B:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/README.md

This document talks about busses 3-6 that can be enabled:
https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README

Is this software I2C? When enabling these, devices can be detected. Does i2cdetect use software I2C behind the scenes when other busses are enabled?

steady rose
#

the BCM2711 is the chip vs. what's actually broken out on the Pi's GPIO header

#

would have to look in the mux table for the BCM2711, maybe you could enable others on the GPIO header pins? not sure.

#

just curious - what's the use case for multiple SCD30s?

cyan rivet
cyan rivet
cyan rivet
steady rose
#

cool. was curious because I2C is pretty short distance and was wondering what your setup was where you actually would have varying air CO2 within that wire length.

#

the TCA muxer is going to be much easier than going down rabbit holes trying to enable additional I2C buses on the broadcom chip.

cyan rivet
steady rose
#

your issue is just the address conflict, right?

steady rose
#

yah, at least try the muxer first

rocky flare
#

I am having problems with a clean install of Ubuntu server 20.04 responding to being pinged by name. All my other systems (Linux) respond to 'ping name.local' where name is the device name. These are either desktop systems or raspberry os light. I've been poking at this for two days now. Even brought a book, which found on issue that is now fixed. My time zone was wrong. But still no joy. Tried installing and using network-manager but no luck. So I've uninstalled it and walked back the changes I had made. So I am a bit stumped. The server has an ip assigned by my dhcp server and is showing up in it's list by name. Gut feeling, I am missing a config tweak. 🙂 Anyone help??? Thanks.

#

The dhcp is on my router, an Archer VR600 which I am very pleased with.

rocky flare
#

Fixed it! 🙂 Have to install 'sudo apt install avahi-daemon' 🙂 Then just starts to work.

spiral mason
#

Thanks letting us know! Ubuntu sever is a pain in the b..t about config .which is sad

faint sparrow
#

I think you're ready to ditch Ubuntu and use Debian itself.

rocky flare
#

@faint sparrow That is l337 Linux territory. 😉

#

Also Debian has a sad story. 😢

modest compass
#

hi there! im having difficulty using vnc with a headless raspberry pi zero w, for some reason its showing "cannot currently show the desktop" in vnc. ive tried everything - i would be grateful for any suggestions

opaque wagon
#

have you tried setting the resolution on your pi0? sometimes my pi4 needs an hdmi connection on boot otherwise it doesn't know the resolution and doesn't start the gui

modest compass
#

still nada

opaque wagon
#

have you tried booting with a monitro connected? and then vnc?

modest compass
#

i dont have a minihdmi cable unfortunately

#

i might need to end up buying one...

#

ah only 8 bucks

#

gonna order one

opaque wagon
#

yea it's worth it for not ripping your hair out on why it's not working 🙂

#

also can you post your config.txt?

#

(/boot/config.txt)

#

make sure to put it in backticks like so:

modest compass
#

sure thing, i was messing around with it earlier

#

how do i copy it from putty?

opaque wagon
#

just highlight it

#

and wait a sec

#

it should auto copy

modest compass
#

ah

opaque wagon
#

put it in backticks like so:
```
<contents of config.txt>
```

modest compass
#
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16


#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=1
hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2


#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.

#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
start_x=0
opaque wagon
#

hmmmmmmmmmm nothing fishy so far

modest compass
#

i did that

#

like 5 times 😄

opaque wagon
#

what resolution did you set it?

modest compass
#

1920x1080

opaque wagon
#

we all wish doing something 5 times would fix it 🙂

modest compass
#

yup lol

opaque wagon
#

in raspi-config vnc is enabled right? just checking the obv

modest compass
#

yup

opaque wagon
#

you have pi over ssh?

#

ready to execute commands?

#

on the official rpi doc on vnc, it says:

  • On your Raspberry Pi (using Terminal or via SSH), run vncserver. Make note of the IP address/display number that VNC Server will print to your Terminal (e.g. 192.167.5.149:1).
  • On the device you'll use to take control, enter this information into VNC Viewer.

To destroy a virtual desktop, run the following command:

vncserver -kill :<display-number>
This will also stop any existing connections to this virtual desktop.

#

what if you try that???

#

sorry i must go, hopefully you can get the problem to fix 🙏 good luck!

faint sparrow
#

Would I be able to interface a Raspberry Pi board to the SMBus on a motherboard with these connections?

modest compass
rocky flare
#

@faint sparrow Looks like it, do you know the command set? May want to check the voltages, I don't know if I2C can have different voltages but it is something I would check.

lost kayak
faint sparrow
umbral sable
#

Those sound like threshold voltages. The actual signals are likely standard 0 and 3.3V unless they're doing something extremely weird... SMBus is basically I2C.

midnight stone
#

my raspberry pi zero w for some reason cant really control a relay i've bought properly

#

the way i have to control it is by switching the gpio pins from input to output mode

#

and i dont think that's intended behavior

hybrid vortex
opaque wagon
midnight stone
#

I'm simply using the gpio commands

#

Also tried using python for this

#

Same effect

#

Pins 4,6,8 are connected to VCC, GND and Input on the relay

#

And the relay module I think is with an optocoupler,

#

Because i saw some stuff on the board of the relay

rocky flare
#

@midnight stone It's possible that the relay will either need the control pin pulled high or low to activate it. Could explain what you're seeing. Can you post a link to what you have?

midnight stone
#

ye that's what i've been using

rocky flare
#

Cool

midnight stone
#

the relay is stated as

#

low activated i think

#

"Low Level Trigger"

#

and i have tried setting the gpio output to 1 or 0 on the control pin but it didnt change anything

#

the onyl way i was able to change thigns was by changing the gpio pin from input to output

rocky flare
#

That may explain what you're seeing. Goes low when you set to input, high when set to output. But as you say, not right way to do it. Really need to know what you have, do you have a part number I can google?

#

Or a picture 🙂

midnight stone
#

the onyl writing i can see is

#

TONGLING JQC-3FF-S-Z

rocky flare
#

found it

midnight stone
#

and its on a relay module thing

#

so it has got some extra components attached to it

rocky flare
midnight stone
#

seems like the one

#

wait so

#

wouldnt setting the pin to 1 have the gpio pin output return 0v?

rocky flare
#

VCC to 5V, GND to ground IN to GPIO. Low active, high off.

midnight stone
#

yeah that's how i have it connected

rocky flare
#

🤔

midnight stone
#

but still have to change the gpio pin modes to actually switch it

rocky flare
#

Hang on, I may have one in stock

midnight stone
#

also it may be a problem of me not having a resistor attached to it

#

to the control pin

rocky flare
#

I did wonder that

midnight stone
#

because i think the gpio of raspberry outputs 3.3v at high

rocky flare
#

Have you tryed just using a jumper wire, cut the RPi out of the loop?

midnight stone
#

wdym

rocky flare
#

Put a jumper wire from the in to 5v and see what happens, then to ground and see.

midnight stone
#

hmm i haven't tried that

#

but i dont have single cables to test it with

#

i got the jumper wires from an old pc i had laying around

rocky flare
#

Time to visit ebay and buy a load of jumper jerky. Most useful tool. Only a few bucks too.

midnight stone
#

i could just paperclip

rocky flare
#

Or that 🙂

#

👍

midnight stone
#

and i have some random copper wire laying aroudn

#

but my hands aren't too steady so ill probably test this method when people get home

#

so i dont accidentally short 5v and 3.3v on the RPi

rocky flare
#

Yer, got to be careful. 🙂

#

I have a similar relay but looks different so unfortunately me trying it my end will not be much help.

midnight stone
#

fun fact

#

i bought the relays

#

and they mixed in some different relay

#

the board is the same but the relay itself is difernt

rocky flare
#

I was reading the thread I found and it seems they go it working with a 10k resister. I'm still not sure the full reason for resisters. 😉

midnight stone
#

optocouplers

rocky flare
#

It maybe that the 3.3 GPIO is not enough, needs 5v GPIO.

midnight stone
#

the image in the forum says its 1.2V

rocky flare
#

Ah ok, then should be fine.

#

The one I have is called SONGLE SDR-05VDC-SL_C

#

@midnight stone Not sure if you've seen this but I also found this article. May help. For arduino but should translate ok. https://www.instructables.com/Driving-a-Relay-With-an-Arduino/

Instructables

Driving a Relay With an Arduino: Hello everyone, welcome back to my channel. This is my 4th tutorial on how to drive a RELAY (not a relay module) with an Arduino.There are hundreds of tutorial available on how to use a "relay module" but I could not find a good one that s…

#

They had to use a transistor to help drive it.

midnight stone
#

ye transistor but they have just a pure relay

#

no extra module attached

midnight stone
#

ill just put a 10K resistor

#

cus those are the oens that i have rn lol

#

once mroe helping hands come

unreal stirrup
#

Python Exception Code: I moved my raspberry pi to a separate power source than my other components. The components power supply can be switched on & off. My script crashes if I don't have power to the components because it can't find the i2c display (and maybe some other things). I am thinking I could detect if the component power is on with a pin on the pi. I am hoping someone can guide me to the right place to look for some Python code for catching the exception / restarting the i2c device.

unreal stirrup
#

can I add something to the try: main() block? maybe something like except OSError: watchforpower() ? if so can the exception wait for the problem to be fixed and then call the main() function again or is this a bad idea?

steady rose
#

how about using an i2c.scan() as a way to test if the i2c peripherals are currently accessible?

unreal stirrup
#

this sounds like a great item to add before I initialize the i2c! It is possible, however, for the i2c to be turned off after my script is running. How do I catch this gracefully? (i just want my program to pause until it can re-connect to the i2c)

fierce spire
#

Is it possible to "read" the usage of a rasperry pi with a python script so that I can make something like "if usage of cpu > presetted value: Do this...

wraith grove
midnight stone
#

does raspbian have some sort of a firewall i have to configure to be able to access my python webserver that im hosting on it?

#

because for some reason i cant connect to my webserver

#

from my home network

#

so no portforwarding issues

#

and im not sure if its my router issue because if i host a webserver on my laptop it runs fine

#

and i can ssh into the pi also easily

opaque wagon
#

if you run ifconfig (or is it ipconfig 🤔 too long since i've tried) can you post the output here? also rpi os doesn't have a built-in firewall afaik unless you install one

midnight stone
#
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 18  bytes 1298 (1.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 18  bytes 1298 (1.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.133  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::df24:69c7:c8e2:f012  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:00:a3:ea  txqueuelen 1000  (Ethernet)
        RX packets 31506  bytes 40638190 (38.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 10578  bytes 1225169 (1.1 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0```
tired marsh
#

can you access it from the pi ? like with curl to localhost if headless ?

midnight stone
#

i can