#help-with-linux-sbcs
1 messages · Page 11 of 1
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
https://github.com/adafruit/Adafruit_Python_SSD1306/blob/master/Adafruit_SSD1306/SSD1306.py I think I used in the past this one
I found that they are using in this project this file to setup the oled display in case this does not work, so maybe you will need to play with this parameters https://github.com/rm-hull/luma.core/blob/master/luma/core/cmdline.py.
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. 😛
well, yes it is fun, do not worry that is just the adress of the I2C part, it is easier that way.
So maybe start trying this example https://github.com/rm-hull/luma.core/blob/master/tests/test_i2c.py, changing the adress for the Adafruit oled that if I remember correctly is 0x32
c
ill give that a shot, thx
ip4 2Gb, just arrived today from Adafruit.
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
Got it working! Thanks, @dull coral
What will be more satisfying is when I do it all over again to verify what worked and what didn't.
Nice.!!!!
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>?
Probably the case
It’s unlikely that your laptop will provide the 3A that the Pi 4 needs
Most I have seen those provide is 2.4
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!
Is this the appropriate location to ask what code is used to put the Raspberry Pi Pico into dormant mode?
which encoder model should I get if I want to use 16 buttons?
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!!!
@still linden you want to try to connect your fan in the PI4 to see if it is working?
Hi, No. . . I connected my fan improperly (wrong color on right post) initially.
I corrected the issue, though still NO fan function.
QUESTION: "how can I CHECK to verify my fan is NOT damaged"?
Thanks!!!
Hello, could you try to connect the fan like that, this is one of the correct ways
Hey cool! Okay. . . For clarity's sake. . .
Red wire on Post #1
BLUE wire on Post #2
BLACK wire on Post #3
??? CORRECT ???
Red in post 1. Black in Post 3
Roger that. Omit the BLUE wire??? . . .leave it dangling without connecting it???
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..
Sure. . . ASAP. . . Prolly later today. THANKS!!!
I stand corrected from my prior description of the wiring schema I followed. . . It goes RED, BLACK, then BLUE
it should work
i know this is a real basic question, but is there a way to clone a specific version of a github repository for install?
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!!!
after you clone the repo you can do a checkout to switch to the other version
thanks
Hello I have a problem with my raspberry pi zero W
The wifi doesnt seem to work even after localization
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 ?
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
Oh neat! Thanks!
?powering directly from the pi could have side effects
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.
time to drag Simon Monk out for a sequel :-)
Would it matter what GPIO I plug it into?
I've never understood the different GPIO pins
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."
The PCM_CLK? I am using a pi 4btw
see the section "More" here https://www.raspberrypi.org/documentation/usage/gpio/
all GPIO can be used for "software" PWM -- certain ones fpr Harware PWM
IIRC GPIO18 is the one most use fro PWM example.
Here is another example -- note that is uses a different numbering scheme for the pins ... https://www.instructables.com/Servo-Motor-Control-With-Raspberry-Pi/
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
Yeah, I am going to use another power source, thanks all of you!
Good luck!
There should be a plastic tab holding each cable in place -- just pry it up and they will slide out.
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
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.
Ah, these connectors were a pain, so I ordered bulk 50 new ones
Hey
Anyone tired out the voice bonnet for the raspberry pi ?
With the Google assistant example
Hey there,
Anyone has some experience with this rgb led matrix library?
https://github.com/hzeller/rpi-rgb-led-matrix/
@ruby night (Sorry for the ping, but you seem experienced) What are those connectors called? The white top thingy
@wide kiln It looks like a JST-PH (2 pin)-- like this https://www.adafruit.com/product/261 used on Adafruits batteries. If looked at end on, does it have the same key on it?
Sorry - I am not sure what you are referring to? The white thing in this picture <#help-with-linux-sbcs message> is a JST-PH connector
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"
like these -- only white https://www.adafruit.com/product/4251
No I mean the basics of the basic
This
Is a connector right?
More specifically a JST-PH?
Ah, thank you!
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!
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.
C and Micropython, so you could probably transpile your js to C
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
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?
Anybody???????
I know of this library: https://github.com/2bndy5/CircuitPython_nRF24L01
That library works well for me....
@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.
Thank You so much
@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.
@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"
@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
(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. ;)
@faint sparrow Based on that error have you done an export PIGPIO_HOST= command to set the environment variable? What the value/format of it should be I'm not familiar with that module.But it may be that the environment variable isn't set and it doesn't have a default value it sets/uses
I have a question, is this library requires you to have a receiver ready before sending the data?,
I'm getting the following error,
send() failed or timed out
For the demos -- yes - I usually start the receiver first.
Which example are you running?
for the simple_test -- the nrf.send() is expecting a response https://github.com/2bndy5/CircuitPython_nRF24L01/blob/master/circuitpython_nrf24l01/rf24.py#L307
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
@cunning owl I don;t think there is an nrfjprog for the Raspberry Pi -- see https://devzone.nordicsemi.com/f/nordic-q-a/14671/nrfjprog-for-arm-cpu-raspberry-pi-3 But you should be able to just drag/drop the library files from the Pi to the CLUE (if it is runnin g CircuitPython). You should have a drive named CIRCUITPY
ah -- I see you are using Arduino... nevermind. I don't think the nRF52840 is supported in the ARM version of the Arduino IDE....
@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?.
@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 😉
🙂 yes, I was just hoping that you say yes, that way I do not have to TEST again this new theory in my computer, 😆
Good luck -- I wish I could find a "trigger"
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.
Looks like 3mm (https://learn.adafruit.com/adafruit-rgb-matrix-bonnet-for-raspberry-pi?view=all) scroll all the way down
@urban ermine I saw that but I'm not seeing the measurement of the green SDA-LAT21 holes.
One sec, I'm exporting the libraries from the eagle files to confirm the size
looks like they are 1 mm
@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.
Just noticed that the link to the Product Brief from the adafruit web page
https://www.adafruit.com/product/4782
is broken - https://cdn-shop.adafruit.com/product-files/4782/4782_Product+Brief+RPi+CM4.pdf
Also - looking at the CM4 product brief ( https://cdn-shop.adafruit.com/product-files/4787/4787_ProductBrief_CM4_IOBoard.pdf ) there is minor broken link
The text in the pdf says: www.raspberrypi.org/documentation/hardware/
raspberrypi/conformity.md
the the actual link is: http://%20www.raspberrypi.org/documentation/hardware/raspberrypi/conformity.md
Note the %20 in the url - looks like a typo
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.
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
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
Maybe people in the help-with-radio channel could help you
Happy pi day 🥧
Hi all, Does anyone have any updates to the 2.8" Cap touch TFT information at https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/pitft-pygame-tips for getting pygame working?
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.
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
@solemn briar Usual chatter on RP2040 is in #help-with-rp2040-pio aka 'Pico'.
Ohh thanks I thought this channel as all things Raspberry Pi TY!
Nothing wrong with chatting here but that room is more targeted.
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
I appear to have lost the standoffs and screws for my sense-hat. Does anyone happen to have a STL or idea?
does the sense hat use something special? for most hats, it's just something like these:
https://www.adafruit.com/product/2336
@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
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.
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
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
@tropic flower I feel like this came up recently. Maybe this? https://forums.adafruit.com/viewtopic.php?f=60&t=169496&p=860560#p860555 I'm not going to be of any further help but I wanted to try to at least give you something.
@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.
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.
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.
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.
hoping to collect 3 of these at quite the high sps
Ah fair enough
good call, will do
You can link to the existing one to show you read it though.
got any more details, like how the display is connected?
@unborn hedge ^ are you working on this one? (CM4 flavoured dark pocket chip)
hi yes thats me
It's looking great so far!
I think those might work, thanks!
Does anyone know if there is a circuitpython for RPIW? I don't want Raspberry OS. Just a UF2 circuitpython like the other microcontrollers.
By RPIW - Do you mean the Pico?
or pi zero W?
if pico, then yes, it can't even run pi OS, but can get CP UF2 here:
https://circuitpython.org/board/raspberry_pi_pico/
if pi zero w, then no, you have to run blinka/python with an OS. BUT the idea of running CP "bare metal" is being looked into:
https://www.tomshardware.com/news/circuitpython-bootable-os-raspberry-pi
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
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)
is there any way one how to change the default address from the ina219 sensor in python? I´ve just found an example on how to do it with the arduino: https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout/library-reference
You can pass the address to the class:
class INA219:
"""Driver for the INA219 current sensor"""
# Basic API:
# INA219( i2c_bus, addr) Create instance of INA219 sensor
# :param i2c_bus The I2C bus the INA219is connected to
# :param addr (0x40) Address of the INA219 on the bus (default 0x40)
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?
If it's using hardware PWM, you might try 12, 13, or 19.
I will try that. I am not sure if it is or not.
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)?
i bought this item: https://learn.adafruit.com/adafruit-pioled-128x32-mini-oled-for-raspberry-pi/ but it appears to be DoA... I have tried and tried to get it to show any text or light up at all, sudo i2cdetect -y 1 does not detect it
did you ran the example code from there?
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
have you tried to do this on another device?
If you're playing around with custom DPI modes on your RPi I found this handy online tool. http://retrogamerestore.com/DPI/dpi_out_format_setting_enc.php
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.
Here is the project file
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.
Thanks for the feedback. Will investigate. 🙂 it's a nice tool, need to now go and donate a few pennies their way.
@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.
What else is your project doing that you need a Pi for? If you’re mainly controlling a RGB led matrix yeah I’d go with something M0/M4 based
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.
A friend of mine was drawing vast mazes around age 9. ;)
I learned the basics of it from his stuff.
it's because of the amount of LED's, wanted to use 8 Panels with 64 x 32 each, so over all 256 x 64 LED's. Might this be possible with a bit-depth of up to 4 or even 5 or 6.
As well the Raspi has built in Wifi and BLE, so i may create a programm which with i can send the information for the text or even animations even easier.
The RPI isn't a great choice for 'intense' GPIO.
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?
What kind of LEDs? WS2812?
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)
it's SMD2121 LED's, P4 Panel, 256 x 128 mm, 64 x 32 LED's
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. ;)
Is there any way to do this without this class thing, I don´t know how th correctly implement this into my program
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.
Base program from Simon Monk is here:
https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/arduino-code
The parts are cheap for that one, and it gives a background on what's involved in painting LED arrays.
His LINE 5 is my LINE 21 here:
https://github.com/wa1tnr/tkm0_7seg-a/blob/master/ArduinoIDE/tkm0/Shift_Register/shift_register_cc/shift_register_cc.ino#L21
This one's more directly related (similar matrices and the RPi):
https://learn.adafruit.com/16x32-rgb-display-with-raspberry-pi-part-2
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 🙂
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
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.
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 😄
ina219 = adafruit_ina219.INA219(i2c, addr=0x41) #for example. Change "addr=0x41" to your address!
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.
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?
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?
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
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.
How much better is the rasperry pi pico compared to the rasperry pi zero?
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
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
@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.
that's a much better explanation
type help(bno055) into the repl
it says name not defined adafruit_bno055 doesnt work either although I import the module with import adafruit_bno055
do you have the adafruit_bno055.mpy file in the lib folder?
I dont think so
then you need to add it
how can I do this?
download the bundle
https://github.com/adafruit/Adafruit_CircuitPython_Bundle <-- click on releases
you can also download the examples
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/tree/master/libraries/drivers <-- here, you can find the source code for what you want, with some examples
should I type copy https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git in the rpi consol
to download this bundle
^ click on releases
you want to download the mpy version
takes a lot less space
you also need the adafruit_register folder
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 https://gps-pie.com/pi_i2c_config.htm <-- try this
I just want to read pitch yaw and roll with this sensor it this really impossible without a hardware upgrade
have you tried the link?
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.
oh, you're the person from last time
yep
have you tried the android route?
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
nice!
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
- figure out how to do raylib things and framebuffer things so it shows raylib and not raspbian
- then i need to figure out a way to switch from raylib to raspbian
well, that's something i've never done
hmmmmm
the most i did was on a pi zero, for it to start without a desktop
oooh how'd you do that
crap
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
if it writes to the framebuffer, maybe
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
that may work, yes
no but like i want that, but i don't know how to do it
@fierce spire see here for how to setup RPI for usage with CircuitPython libraries:
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
After that, you will pip install the BNO055 library and then you can use it with "regular" Python on the RPI. But it may not have all/same functions as the Arduino lib. Docs for CircuitPython version are here:
https://circuitpython.readthedocs.io/projects/bno055/en/latest/
which part you cant do?
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
well, if you dont mind opening the desktop first, you probably can find ways to start the application right when it boots the desktop
oh crap i just realized
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
that's something i cant really help with
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
lol
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
Custom designed Raspberry Pi Case for the new Pi 4 & official PoE Hat, 3D printed out of black PLA+ Case is specifically designed for use with the Pi 4 and the official PoE (Power over Ethernet) hat. Ventilation hole directly above the fan & perforated top & bottom allowing for good airflow. Also
no prob!
@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
whoa! okay, thanks a lot! i'll try that
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 ;)
can anyone recommend a good reference for creating a script that will power off / on the monitor with a keyboard combo?
oh that's cool!
wait so how would you go about making your own OS?
or your own custom UI that can open up an application
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'.
well okay i really just want my own little UI to show up on boot
Investigate https://landley.net/ for some background. ;)
and from there i just want said UI to be able to open different programs
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.
hm
Maybe
sudo systemctl status gdm3.service
has a response.
I don't remember which display manager is used.
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
( 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.
okay so if I just have an xterm, what do i do then
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).
so then how do i go about having the raylib application start on boot? is that a thing i can do
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.
wdym
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).
ah crap so you mean if i need to skip the logging in, i need to bring back the display manager?
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.
oh okay
Remember that many of these kinds of things can be replaced by shell scripts that stand in for them.
ah
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.
yeah i don't plan on connecting it to the internet
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).
thanks!
There used to be an official mechanism for .. being logged in without making an effort to do so.
oh
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.
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)
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.
what's a semaphore?
(also called a DROPFILE in MS-DOS BBS door-speak ;)
i only know it as the flag thing
It's a blank file that doesn't have to be blank.
If the file merely exists, that's a 'flag'.
okay
It's a file created for the one purpose of controlling something, simply by existing.
ohhhhhhh
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.
by the way how do i actually go about running all of these commands?
like, when i run the commands
I'm guessing you login and type commands at the shell prompt. ;)
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
You're asking if the semaphore toggles the state it's controlling.
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
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.
gotcha
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.
oh that's nice
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. ;)
whoa
Could still build a kernel!
that's nuts
4 megs wasn't quite enough to run graphics. 8 mb was about enough.
Circa 1992 or so? ;)
that's crazy dude
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.
I was rocking 4096 colors on my 512kb Amiga just fine.
no but the fact that you could actually do all that
;) @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.
that does seem very cool
wait so why would starting something at login need a semaphore again?
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.
i see
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'.
i just had a moment while you were talking where the concept of semaphores finally clicked in my head
It is the right term but I don't remember its origin. ;)
flag. semaphore. flag. ;)
ah
Dijkstra used the term semaphore first in a computer context as a way to communicate between processes.
;) 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
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
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.
i see
So much so that I only learned how to do it in a Perl script. ;)
(and have since forgotten)
i see, well that's all for now. thanks a ton for your help!
You're welcome. I don't necessarily remember anyone's handle so don't be offended if I huareu you the next time. ;)
Hello, i just soldered up my pico. How do i know the solder worked on each pin? (No good at soldering :(. )
@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.
Cool, l’ll try that, thanks.
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?
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.
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
Yea for some reason Pip tries to build numpy when you install it on a Pi
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 ?
You could try coding it in Pico SDK, but other than that, not really sure. Pico SDK is in C, so it might be harder than the CircuitPython/MicroPython I assume you are doing.
I had this problem with a PyRuler, and just decided not to worry about it.
Just by googling around a little, I found this: https://github.com/adafruit/circuitpython/issues/1015
Not sure how useful it is though...
https://forums.adafruit.com/viewtopic.php?f=60&t=137940#p682494 looks like it's not possible, sorry!
...yet! always have hope for the future! 🙂
hey if i disable the login on my pi, what could potentially happen if i connect to the internet?
thanks for the help, appreciate it
@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.
ah
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.
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.
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
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
@humble cipher this one? https://www.adafruit.com/product/3446
@steady rose yes, that one
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
which part is the "bottom edge", the side with the usb and hdmi ports?
yep. also bottom in image above.
yes, it worked! thank you so much, cater
cool. np!
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.
I suggest using the prebuilt version: sudo apt-get install -y python3-numpy doesn't take long on a zero
You can post here first! We'll help you triage if needed
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.
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.
One antenna per Pi. It's a WiFi legalaity. You need multiple network access points. https://www.raspberrypi.org/forums/viewtopic.php?t=297757
@tired pendant is this what you're looking for? They use a second wifi device in monitor more to scan their network. https://medium.com/@aallan/adding-a-second-wireless-adaptor-to-a-raspberry-pi-for-network-monitoring-c37d7db7a9bd
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/
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,...
@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.
Ah didn’t know about that. Thanks!
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.
@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.
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.
@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.
@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.
@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.
\
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!
Can I put a 3v water pump to a 5V relay?
Probably. usually the 5 volts indicates the voltage required to flip the relay switch usually a relay can tolerate interrupting power between your pump and a much higher voltage powersupply
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
a relay is just a switch
So I just put a battery in between to power the pump and the relay is just my on/off switch
that should be perfect. the relay should have 4 terminals 2 are the switch connection and the other 2 are the enable input and ground
if you are using a magnetic relay instead of a solid state relay it would be prudent to put a mosfet and a flyback diode in the circuit to protect your pi
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
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
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
@quasi bison You could probably build a simple Morse Code sidetone generator quite inexpensively.
Those are sine wave oriented.
that sounds like an idea
This author shows a nice sine wave on a scope:
https://github.com/daijo/CWSoftie
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.
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
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
@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.
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 😦
sure it will - both commands will work, but only one command (prepending sudo) will install system wide
..... 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.
🙌 glad it worked!
I hope someone can help you with your measuring current to the pi (it is totally out of my league)
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"
@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).
thanks. I notice that this .service is in /lib/systemd. Surfing the tutorials it seems that some put it in /etc/systemd and some into /lib/systemd. Any idea why one or the other??
@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)
Anyone got any clues?
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."
50mA
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
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?
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
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.
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)
. . .What does it mean see "apt-secure(8) manpage"???
Do I type that in my TERMINAL?
. . .OBVIOUSLY a NEWBIE over here!!! 😆
Yeah, thanks! that clears things up for me
@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?
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.
🙏🏼 👌🏼 🤔
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???
$ man 8 apt-secure
yeah but the whole idea of apt-secure is bad for noob. the guide bit-rotted
I assume the Wizard of Oz "I'd turn back if I were you" sign is posted. ;)
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???
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
I totally get it.
I gotta jump in somewhere,
just wondering where that might be?
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?
I could go type those calls in my terminal and see what happens.
That's my level.
TOTAL NOOB!!!
Sounds like you should look for "shell commands tutorial" maybe? Or "Bash Tutorial". Honestly when I learned this stuff it was from a book.
Where do I find those tutorials?
What book would you recommend?
Not sure what you asked me.
needs a bash tutorial or something
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.
As in, "keep it simple"?!?!
I'm down.
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.
Yay!
A place to start!
SWEET! 🙏🏼
Right on!
I can FEEL why they will never learn it!
In a word. . . RESISTANCE!
. . .then I could add in. . .
FEAR, DOUBT, CONFUSTION, SELF-SABBOTAGE. . .
"Better to light a candle than CURSE the darkness"
~Perennial Chinese Wisdom
. . .off to play. . .
Thanks again for the 'hep!!!
$ 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
Started into that tutorial. . .
Scratching the itch VERY nicely!
Thanks again!
If you create a secondary user you can explore with fewer consequences to your 'favorite' account.
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. ;)
could exist - I'm not sure. Most don't, and one uses jumper cables to connect rows together
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?
$ 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.
@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
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.
@faint sparrow I believe I can... what is the syntax to filter out all /dev/loop entries?
@faint sparrow ala grep
something like:
$ sudo blkid | egrep TYPE | egrep sd
You can remove all the hexadecimal as it's not needed here.
/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"
sda1 is vfat
So just mount sda1 on /tmp/something-or-other
I don't fsck vfat volumes but I'm careful.
@faint sparrow yes it is but it isn't the compute module, it's the boot drive of my desktop computer
;)
Well what is the compute module's response to blkid? Or is there media you can remove?
@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
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
@faint sparrow you'd think... one has to flash the eMMC memory with an image of the os
Also I had the impression the compute module needs its motherboard to host it.
@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
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.
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
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 ?
@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... 😬
@warped citrus thank you😆
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!
I'm new for coding, so I'll try my best 👍 @warped citrus
Can I just pop the sd card from my Pi3 into my Pi4?
@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.
Yeah it got buster :)
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 .
It worked 😄
is sudo enough to run a script with root privilege?
@heavy folio Most of the time, yeah.
You can sudo su to get a root shell.
Then su - root ;)
if i want to run a python script with root, is
sudo python demoscript.py
enough?
sudo doesn't propagate the way people might think it does.
ok
$ 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)
interesting
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.
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
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.
hmm
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)
This is undoubtedly wrong but does work:
https://github.com/wa1tnr/splash_plymouth_rpi-a/blob/master/RPi.d/lib/systemd/system/plymouth-start.service#L11
That's the only ugly way I know to execute an arbitrary shell script automatically during the startup.
thanks for all the info
You're welcome.
all of this was a huge help, thanks again
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...)?
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?
If the program can batch edit a bunch of files it should just edit the file contents without touching the file name AFAIK
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?
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
@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.
didn't know where to put this, but I'm super excited for this: https://www.crowdsupply.com/diodes-delight/piunora/updates/it-begins
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.
There's a #show-and-tell too BTW
Thanks! I was having a hard time trying to make the correct question, but you seem to have guessed what I was trying to convey.
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?
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.
using one of these would probably be much easier than trying to use separate I2C buses:
https://learn.adafruit.com/adafruit-tca9548a-1-to-8-i2c-multiplexer-breakout/overview
just curious - what's the use case for multiple SCD30s?
Hey. I'm a hobbiest mushroom grower (oysters, lion's mane, etc). I have three separate fruiting boxes. I'm using an open source project Mycodo https://github.com/kizniche/Mycodo
Basically, I'm running EMC2101, SCD30, LTR390 (per fruiting box) and then an ADC (ADS1015) to monitor AC current in the control box and INA169
Basically, I'm making a fancy, web-controlled, Inkbird with time lapse photography thrown in the mix.
It would be good to get to the bottom of this documentation though. The firmware documentation seems to reference default GPIO pins for these additional busses and they're the regular exposed GPIO pins. That seems to indicate support for more. I've seen references that additional busses were added on the RPi4B in addition to what was exposed on the RPi3.
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.
Thanks. I'll go that route (the multiplexer). I'm not going any longer than 6 feet. These are enclosed boxes and the CO2 offgassing rates will be different in the enclosed boxes.
I'm a little bummed that I'm stalled until the (yet another) Adafruit order is complete, but it'll be good to do it a way that's a bit simpler. 🙂
your issue is just the address conflict, right?
Yep!
yah, at least try the muxer first
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.
Fixed it! 🙂 Have to install 'sudo apt install avahi-daemon' 🙂 Then just starts to work.
Thanks letting us know! Ubuntu sever is a pain in the b..t about config .which is sad
I think you're ready to ditch Ubuntu and use Debian itself.
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
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
yup i have using raspi-config
still nada
have you tried booting with a monitro connected? and then vnc?
i dont have a minihdmi cable unfortunately
i might need to end up buying one...
ah only 8 bucks
gonna order one
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:
ah
put it in backticks like so:
```
<contents of config.txt>
```
# 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
hmmmmmmmmmm nothing fishy so far
according to this rpi stack exchange answer (https://raspberrypi.stackexchange.com/a/116199/93272) try setting the resolution to 1280 x 720 or 1920 x 1080 with raspi-config
what resolution did you set it?
1920x1080
we all wish doing something 5 times would fix it 🙂
yup lol
in raspi-config vnc is enabled right? just checking the obv
yup
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!
Would I be able to interface a Raspberry Pi board to the SMBus on a motherboard with these connections?
thanks
, didnt work but the cable is arriving tomorrow
@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.
I had this issue yesterday. I had the pi set to boot to cli. I changed it to boot to graphical interface and require login, and it works fine now. Hope this helps.
SMBus appears to use 0.8v as logical 0 and 2.1v as 1. I may contact Supermicro for more information on it as they were helpful before.
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.
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
That does not seem correct. Could you send your wiring and code?
Which's GPIO pins? The relay? Or the Pi0W? Also can you link to the relay you bought?
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
@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?
Also this is an excellent resource. https://pinout.xyz/
The comprehensive add-on boards & GPIO Pinout guide for the Raspberry Pi
ye that's what i've been using
Cool
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
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 🙂
found it
and its on a relay module thing
so it has got some extra components attached to it
seems like the one
wait so
wouldnt setting the pin to 1 have the gpio pin output return 0v?
VCC to 5V, GND to ground IN to GPIO. Low active, high off.
yeah that's how i have it connected
🤔
but still have to change the gpio pin modes to actually switch it
Hang on, I may have one in stock
also it may be a problem of me not having a resistor attached to it
to the control pin
I did wonder that
because i think the gpio of raspberry outputs 3.3v at high
Have you tryed just using a jumper wire, cut the RPi out of the loop?
wdym
Put a jumper wire from the in to 5v and see what happens, then to ground and see.
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
Time to visit ebay and buy a load of jumper jerky. Most useful tool. Only a few bucks too.
i could just paperclip
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
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.
fun fact
i bought the relays
and they mixed in some different relay
the board is the same but the relay itself is difernt
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. 😉
optocouplers
It maybe that the 3.3 GPIO is not enough, needs 5v GPIO.
the image in the forum says its 1.2V
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/
They had to use a transistor to help drive it.
ill just put a 10K resistor
cus those are the oens that i have rn lol
once mroe helping hands come
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.
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?
how about using an i2c.scan() as a way to test if the i2c peripherals are currently accessible?
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)
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...
https://stackoverflow.com/questions/276052/how-to-get-current-cpu-and-ram-usage-in-python
import psutil
psutil.cpu_percent()
9.2
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
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
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```
can you access it from the pi ? like with curl to localhost if headless ?
i can