Go to advanced search

by TimG
Wed Jun 12, 2019 10:59 am
Forum: General discussion
Topic: Running an RPI outside?
Replies: 12
Views: 324

Re: Running an RPI outside?

Re. power: To avoid putting mains power in a box exposed to the weather, I've used an old 18V laptop power supply in combination with a small regulator like these: https://www.tracopower.com/products/browse-by-category/detail/dc-dc-converters/non-isolated-step-down-regulators/ The 18V supply (the ex...
by TimG
Tue Jun 04, 2019 11:39 am
Forum: Camera board
Topic: Soldering camera cable
Replies: 1
Views: 90

Soldering camera cable

Does anybody know if the camera ribbon cable can withstand soldering? I'd like to join a PiZero-to-camera adapter cable to a normal cable without using extra intermediate connectors. https://cdn.shopify.com/s/files/1/0174/1800/products/Camera_cable_1_of_3_19028afc-2f5f-40ba-863d-293ee88ef649_256x256...
by TimG
Tue Jun 04, 2019 11:16 am
Forum: General discussion
Topic: light detector with photo transistor
Replies: 33
Views: 885

Re: light detector with photo transistor

A digital light detector would save you a lot of work. For example, https://www.adafruit.com/product/4162 https://cdn-learn.adafruit.com/assets/assets/000/073/757/small240/adafruit_products_VEML7700TopHeader.jpg On the other hand if you want to learn about phototransistors, here are a couple of usef...
by TimG
Thu May 23, 2019 3:29 am
Forum: Advanced users
Topic: Fast boot on Pi-Zero with C library and GPIO access
Replies: 2
Views: 179

Re: Fast boot on Pi-Zero with C library and GPIO access

It's been a while since I worked on fast-booting, but on a Pi Zero it's possible to start running code within 2 - 2.5 seconds. I used a systemd service file to launch my script as early as possible, like this: # example.service # run as early as possible [Unit] Description=Example Service DefaultDep...
by TimG
Sat Apr 27, 2019 12:55 pm
Forum: Advanced users
Topic: LM386 Audio Amp Module Producing buzzing/cracking noise
Replies: 6
Views: 342

Re: LM386 Audio Amp Module Producing buzzing/cracking noise

- The LM386 has two audio inputs: inverting and non-inverting. Are they both connected to something? - The speaker output needs a DC-blocking capacitor. - Likely the USB headphone output needs a load. Connect a set of headphones in parallel. If you still get distortion, you may need DC-blocking capa...
by TimG
Thu Apr 11, 2019 5:58 pm
Forum: General discussion
Topic: raspistill crashes every 35 minutes
Replies: 4
Views: 203

Re: raspistill crashes every 35 minutes

Wow, thanks for the fix, and the build instructions. The updated binary has been running for an hour now with no glitches. Not having to monitor raspistill is going to simplify my code a lot.
by TimG
Thu Apr 11, 2019 4:01 pm
Forum: General discussion
Topic: raspistill crashes every 35 minutes
Replies: 4
Views: 203

Re: raspistill crashes every 35 minutes

Ah-ha. Yes, I just realised that my crashes are happening every 2^31 us.

$ raspistill -v
"raspistill" Camera App (commit 7cbfbd38d982 Tainted)
by TimG
Thu Apr 11, 2019 3:07 pm
Forum: General discussion
Topic: raspistill crashes every 35 minutes
Replies: 4
Views: 203

raspistill crashes every 35 minutes

Hi everybody, Running raspistill in timelapse mode I'm encountering freezes and unexpected exits. These happen very regularly, and one of the following always seem to happen (in fact they alternate): - The raspistill process freezes and has to be killed. - The raspistill process gives an error like ...
by TimG
Thu Jan 31, 2019 5:33 pm
Forum: General discussion
Topic: How to prevent monitor sleep, on Raspbian Stretch Lite?
Replies: 4
Views: 504

Re: How to prevent monitor sleep, on Raspbian Stretch Lite?

Hi andreioniga, Here's the recipe I use with a similar setup (qiv running under X and Raspbian-lite). At least with my monitor, "BlankTime" seems to be the only parameter which really does anything. mkdir /etc/X11/xorg.conf.d # disable X blanking chmod a+rx /etc/X11/xorg.conf.d echo >/etc/X11/xorg.c...
by TimG
Wed Jan 23, 2019 12:24 pm
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 190
Views: 80993

Re: Raspbian with Read-only Root

Hi bouwew, I think the " /boot/initrd.img-4.14.79-v7+ does not exist. Cannot update. " message is a hang-over from Debian which expects a different kernel file naming scheme. Use it as a reminder that initrd.img needs to be updated by hand. Probably if you had a copy of initrd.img named with the app...
by TimG
Sun Jan 20, 2019 12:43 pm
Forum: General discussion
Topic: How to turn on relay one time in every hour
Replies: 41
Views: 1624

Re: How to turn on relay one time in every hour

In addition to Gordon77's comment, the read-back to GPIO12 mustn't be more than 3.3V.
by TimG
Fri Jan 18, 2019 6:21 pm
Forum: General discussion
Topic: new to soldering - safety questions, etc.
Replies: 46
Views: 1977

Re: new to soldering - safety questions, etc.

The essential soldering accessory is a brass-wool tip cleaner. Forget sponges and that weird gunge that comes in a little tin.
https://shop.pimoroni.com/products/sold ... ip-cleaner
by TimG
Tue Jan 15, 2019 1:37 am
Forum: Advanced users
Topic: Raspberry PI cold boot attack protected / Zero out RAM after boot?
Replies: 71
Views: 3879

Re: Raspberry PI cold boot attack protected / Zero out RAM after boot?

RDPUser wrote:
Mon Jan 14, 2019 8:27 pm
So to secure against this "cold boot SD-Card swap attack" a few lines of code are sufficient.
It sounds like a generous layer of epoxy would be just as effective.
Forcing the agents of the deep-state to resort to alternative decryption techniques: https://www.xkcd.com/538/
by TimG
Tue Jan 08, 2019 11:10 pm
Forum: General discussion
Topic: Raspberry Pi Zero W not working well with power supply
Replies: 7
Views: 585

Re: Raspberry Pi Zero W not working well with power supply

I think it's likely your Pi is fine, and your problems are caused by bad cables. But without a multimeter it's difficult to make any suggestion.
by TimG
Wed Jan 02, 2019 1:20 pm
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 190
Views: 80993

Re: Raspbian with Read-only Root

This should have been for /etc/fstab. Good catch. That seems to be a copy-paste error. I've corrected the code in the post above. (In any case that should not prevent the root partition being made read-only.) Also the procedure is missing the part about adding "overlay" to "hook-functions". This is...
by TimG
Wed Dec 19, 2018 11:25 pm
Forum: General discussion
Topic: Raspberry Pi Zero W not working well with power supply
Replies: 7
Views: 585

Re: Raspberry Pi Zero W not working well with power supply

Hmm. I still think you may have a poor ground connection between the TV and the Pi... and when you power from the TV the USB cable restores the ground connection. It could be a bad HDMI cable, or a bad HDMI adapter. Try this: Connect the Pi to the TV's HDMI, and to the 5V power supply. Turn on the T...
by TimG
Wed Dec 19, 2018 3:19 pm
Forum: General discussion
Topic: Raspberry Pi Zero W not working well with power supply
Replies: 7
Views: 585

Re: Raspberry Pi Zero W not working well with power supply

It certainly sounds like a power problem, though it's difficult to say what the cause is. The first things to try are an alternative power supply and another TV. Some TVs have a very poor ground, and this could cause problems when connected to other equipment. If you can get hold of a multimeter you...
by TimG
Fri Nov 23, 2018 3:54 pm
Forum: General discussion
Topic: [Solved] Checking version of kernel files in the /boot directory
Replies: 13
Views: 1136

Re: [Solved] Checking version of kernel files in the /boot directory

To be robust against unusual kernel installations, I came up with this to extract the kernel version directly from the .img file. #!/bin/bash # extract kernel version from zimage file # kernel name if [ "$(uname -m)" == "armv6l" ]; then file=/boot/kernel.img; else file=/boot/kernel7.img; fi echo "ke...
by TimG
Wed Nov 21, 2018 5:30 am
Forum: General discussion
Topic: [Solved] Checking version of kernel files in the /boot directory
Replies: 13
Views: 1136

Re: Checking version of kernel files in the /boot directory

It must be possible, but I haven’t found a practical way of doing it yet. This is an admittedly-inelegant work-around:

Code: Select all

kver=$(dpkg -L raspberrypi-kernel |perl -ne 'if (/(\d+\.\d+\.\d+)(-v7)?\+$/) { print "$1"; exit; }')
kver=$kver$(uname -r |perl -pe 's/\d+\.\d+\.\d+//')
by TimG
Wed Nov 21, 2018 5:15 am
Forum: General discussion
Topic: Raspbian with Read-only Root
Replies: 190
Views: 80993

Re: Raspbian with Read-only Root

This may be relevant -- it's the script I use to create a read-only root, based on the recipe by ejolson. It detects the correct kernel version even after an apt-get upgrade. There are a few other alterations: It automatically deals with ARM-v6/v7; it puts the overlay scripts in /etc rather than /us...
by TimG
Sun Nov 18, 2018 12:59 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO state-change notification (pigpio?)
Replies: 2
Views: 1263

Re: GPIO state-change notification (pigpio?)

Yeah, that's what I was trying to avoid. Partly because I'm not awfully fluent with Python, and partly because my script does lots of shell stuff. I think I've found another way of doing this: #!/bin/bash gpio -g mode 22 up gpio -g wfi 22 falling& # background process ends after button press PIDBUTT...
by TimG
Sun Nov 18, 2018 12:55 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO state-change notification (pigpio?)
Replies: 2
Views: 1263

GPIO state-change notification (pigpio?)

Can anybody tell me how to read out GPIO state-changes asynchronously (preferably in a shell script)? I'm trying to detect short button-pushes from inside a relatively slow loop, and I'd rather avoid creating a separate process for GPIO readout if I can. It seems like pigpio can do this via notifica...
by TimG
Wed Oct 31, 2018 6:42 am
Forum: General discussion
Topic: Resize Root partition in .img file
Replies: 12
Views: 1241

Re: Resize Root partition in .img file

To prevent the automatic re-partitioning from taking place on first boot, edit cmdline.txt to remove the "quiet init=/usr/lib/raspi-config/init_resize.sh". Once this is done you can re-partition by hand and save the resulting disk image. Or you can alter /usr/lib/raspi-config/init_resize.sh to do wh...
by TimG
Sat Oct 13, 2018 7:25 pm
Forum: Advanced users
Topic: How do I read exact analog voltage?
Replies: 5
Views: 645

Re: How do I read exact analog voltage?

Take a look at the Pimoroni Automation pHAT

Image
by TimG
Tue Sep 25, 2018 1:36 am
Forum: General discussion
Topic: Pi 3 Model B+ locks up daily
Replies: 11
Views: 1146

Re: Pi 3 Model B+ locks up daily

Could well be a power problem — either supply or cable. Check with

Code: Select all

vcgencmd get_throttled
More info here:
https://www.raspberrypi.org/forums/view ... 50#p972790

Go to advanced search