Go to advanced search

by ephestione
Sun Sep 29, 2019 3:20 pm
Forum: Beginners
Topic: Backup and recovery solution I use (recovery image)
Replies: 1
Views: 648

Re: Backup and recovery solution I use (recovery image)

Thank you for sharing! I was excited when I started reading, and kept being excited while reading, because your solution was so complex that to me it looked very sexy :mrgreen: Until finally my brain wrapped it up towards the end, and I was like "uhm, okay, it's very sexy, but how is it actually dif...
by ephestione
Sun Sep 15, 2019 2:12 pm
Forum: Troubleshooting
Topic: Decoding "vcgencmd get_throttled"
Replies: 2
Views: 124

Re: Decoding "vcgencmd get_throttled"

Holeeee sheeeet I just did another one and only now I found yours :mrgreen:

Well, I used PHP anyway, so to each his own:
http://www.ephestione.it/decode-vcgencm ... hp-script/
by ephestione
Sat Sep 14, 2019 7:49 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 249

Re: Format the output of vcgencmd measure_clock arm to human readable value

I created the file $HOME/.byobu/bin/5_clk file with the following contents: #!/bin/bash vcgencmd measure_clock arm | awk ' BEGIN { FS="=" } ; { printf("#[fg=#ffffff,bg=cyan]%.1fGHz#[default]\n", $2 / 1000000000) } ' enabled the "custom" value inside the notification toggles of byobu settings (reacha...
by ephestione
Sat Sep 14, 2019 7:22 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 249

Re: Format the output of vcgencmd measure_clock arm to human readable value

Thank you all! I wasn't expecting such fast comebacks! I think I will go with @trejan solution, since it gives exactly what I need, even if it's a little slower (something less than double the time to execute) than @jbudd 's first suggestion, which alas truncates the result :( His second suggestion ...
by ephestione
Sat Sep 14, 2019 7:10 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 380

Re: Uninstall older versions of packages that still exist after newer versions have been installed?

Thank you for the feedback :) This is an update: dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n does output the existence of a mariadb-server-10.1 package together with mariadb-server-10.3 package, the older being even larger, at about 70MB, than the newer. But when I issue sudo apt sear...
by ephestione
Sat Sep 14, 2019 6:12 pm
Forum: Beginners
Topic: Format the output of vcgencmd measure_clock arm to human readable value
Replies: 5
Views: 249

Format the output of vcgencmd measure_clock arm to human readable value

I want to display a custom value on byobu status bar, which is the real CPU clock (currently it seems to be displaying the contents of /sys/devices/​system/cpu/cpu0/cpufreq/scaling_cur_freq, which is not necessarily the correct value), so I want to follow this guide: http://blog.dustinkirkland.com/2...
by ephestione
Sat Sep 14, 2019 1:47 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 380

Re: Uninstall older versions of packages that still exist after newer versions have been installed?

Thank you scruss, using autoclean and autoremove with apt was the first thing I did, what remains is what apt deems "still necessary". I will definitely remove the 10.1 versions of mariadb, I've decided against apt judgement :D I wondered if there's something that does it automagically. After all, i...
by ephestione
Sat Sep 14, 2019 1:25 pm
Forum: Beginners
Topic: Uninstall older versions of packages that still exist after newer versions have been installed?
Replies: 6
Views: 380

Uninstall older versions of packages that still exist after newer versions have been installed?

Just upgraded from stretch to buster before swapping the 3b+ to a 4, and the upgrade process, other than excruciatingly slow, left a lot less space on the root partition. I use a 32GB pendrive, where I limited root to 4GB since that's always been way more than enough, and I was surprised that a simp...
by ephestione
Fri Aug 16, 2019 5:04 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?
Replies: 2
Views: 874

Re: How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?

Sooo, I just furthered my search with other keywords, and the problem in itself is not accessing the MCP23017 specifically, but rather accessing I2C devices with anything that is not bash's i2ctools or python with its bus read/write functions. As per this thread: https://www.raspberrypi.org/forums/v...
by ephestione
Fri Aug 16, 2019 4:50 pm
Forum: General programming discussion
Topic: PHP & I2C
Replies: 21
Views: 18239

Re: PHP & I2C

Hey guys, I'm so sorry for not answering your posts. It has been some years and I'm not sure if anyone is still interested. I have to look for the extension in my old HDD. If I find it, I will post it here for sure. Greetings meda ahah nice You've put everyone and their granma on hopes and you just...
by ephestione
Fri Aug 16, 2019 3:58 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?
Replies: 2
Views: 874

Re: How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?

Addendum to my own post: regarding the address, A0-A1-A2 are the "address bits", so being a 3-bit address there can be from 0 to 7, that is maximum 8 expansion boards, each one should have its own address set with those bits by putting them either LOW (0) or HIGH (1), each board having a different c...
by ephestione
Fri Aug 16, 2019 3:46 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?
Replies: 2
Views: 874

How to connect and use GPIO expansions on CJMCU-2317 with MCP23017?

I know there ARE guides out there because I've been spending the last few hours browsing pages and articles from google results. I didn't find anything linear enough for me to understand though, so I post here in hopes that someone is able to hit me with the "got it!" revelation. Prologue: I've prog...
by ephestione
Mon Aug 12, 2019 6:33 pm
Forum: Beginners
Topic: Is it possible to power off a monitor when the RPi is powered off?
Replies: 13
Views: 416

Re: Is it possible to power off a monitor when the RPi is powered off?

just get a power strip with a master and slave outlets https://www.amazon.com/APC-P8GT-Power-Saving-SurgeArrest-Protection/dp/B002K8S2J6 Raspberry Pi Master Monitor Slave A relay from China costs less then 1USD shipped: https://www.aliexpress.com/item/32909704250.html?spm=a2g0o.productlist.0.0.4084...
by ephestione
Mon Aug 12, 2019 6:31 pm
Forum: Beginners
Topic: Is it possible to power off a monitor when the RPi is powered off?
Replies: 13
Views: 416

Re: Is it possible to power off a monitor when the RPi is powered off?

This will look like a "dirty" solution to some since you will be playing with AC mains, but optocouplers exist for a reason. If the shutdown's happen programmatically, have a relay connected to a direction-out GPIO pin open circuit, and then shutdown the pi. At boot, have the relay close circuit. H...
by ephestione
Sun Aug 11, 2019 8:38 pm
Forum: Beginners
Topic: Is it possible to power off a monitor when the RPi is powered off?
Replies: 13
Views: 416

Re: Is it possible to power off a monitor when the RPi is powered off?

This will look like a "dirty" solution to some since you will be playing with AC mains, but optocouplers exist for a reason.
If the shutdown's happen programmatically, have a relay connected to a direction-out GPIO pin open circuit, and then shutdown the pi.
At boot, have the relay close circuit.
by ephestione
Sun Aug 11, 2019 5:13 pm
Forum: Beginners
Topic: Backup and upload to dropbox an encrypted archive of your important installation files
Replies: 0
Views: 109

Backup and upload to dropbox an encrypted archive of your important installation files

I just made something for myself that I think could be useful to someone else. I already backup my raspi's installations with https://github.com/lzkelley/bkup_rpimage, but you cannot easily manage 4GB files (even if sparse) to make cloud backups, so in case my local disks explode, I also need an off...
by ephestione
Sun Jul 21, 2019 11:19 am
Forum: Troubleshooting
Topic: USB Booting with 2 USB drives
Replies: 9
Views: 1131

Re: USB Booting with 2 USB drives

If you are using a bootcode.bin only SD card, then that's your problem (bootcode.bin tries to boot the first USB drive it finds, and fails if it's not a boot drive). There is no way to fix that without a new bootcode.bin (modified to address that issue). I've been devouring info about USB boot on t...
by ephestione
Wed Jun 12, 2019 5:01 pm
Forum: Advanced users
Topic: Convert a SD boot + USB root system to standalone USB boot+root
Replies: 2
Views: 295

Convert a SD boot + USB root system to standalone USB boot+root

First of all, I have read the sticky: https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177 but it's not for me as I already have something like this running (boot from SD, and cmdline.txt points to the root partition on the pendrive) Also I found this other guide: https://www.makeuseof.com/...
by ephestione
Mon Jun 03, 2019 2:18 pm
Forum: Beginners
Topic: Using capacitor buffer across GPIO pins
Replies: 15
Views: 2640

Re: Using capacitor buffer across GPIO pins

I must have been confusing when writing "nice delay", what I meant is that I could detect it with my human brain as it wasn't an immediate response as soon as I released the microswitch under the PIR sensor carter "Nice delay" did sound longer than it may actually be in practice :) What you have sh...
by ephestione
Mon Jun 03, 2019 11:40 am
Forum: Beginners
Topic: Using capacitor buffer across GPIO pins
Replies: 15
Views: 2640

Re: Using capacitor buffer across GPIO pins

The delay we're talking about is less than one second :) IIRC the specification for UK approved alarms requires action in response to and alarm input in between 300ms and 700ms. (I worked on very early microprocessor based alarm systems around 1981 -- memory may be faulty and standards may have cha...
by ephestione
Mon Jun 03, 2019 6:39 am
Forum: Beginners
Topic: Using capacitor buffer across GPIO pins
Replies: 15
Views: 2640

Re: Using capacitor buffer across GPIO pins

For now there's a nice delay between sensor tamper and siren, so I think I should be ok. Is there enough time for a burglar to cut the cable and short the wires before the capacitor rises enough to activate the siren ? It's probably not a problem in practice but, should it happen, you will have to ...
by ephestione
Sun Jun 02, 2019 3:47 pm
Forum: Beginners
Topic: Using capacitor buffer across GPIO pins
Replies: 15
Views: 2640

Re: Using capacitor buffer across GPIO pins

I was looking to put a capacitor across GND and input exactly for this reason, I have a homemade testing alarm system setup exactly as OP, internal pullup to HIGH, and sensors keep it LOW unless triggered in which case it reads HIGH and triggers alarm. I am using PHP+GPIO.PHP class with watchdogs, w...
by ephestione
Sun Jun 02, 2019 1:38 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO input current draw
Replies: 12
Views: 808

Re: GPIO input current draw

Or rather I'm seeing 3v3 zener's being the hype for that purpose. Or rather again, I just put a 10uF capacitor across the most sensitive input which is the tamper loop, I get a nice small delay before the siren sounds when I open the tamper loop so I should be set without the hassle of setting up op...
by ephestione
Sun Jun 02, 2019 1:24 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO input current draw
Replies: 12
Views: 808

Re: GPIO input current draw

I use an opto isolator when I have this situation. The button side of the opto can be driven from 5V and a resistor with a relatively high current. The other side will be powered from 3.3V and a pull up (or down) resistor and use a much lower current. Because the opto needs at least 3-5mA to trigge...
by ephestione
Fri May 24, 2019 3:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: GPIO input current draw
Replies: 12
Views: 808

Re: GPIO input current draw

How to size said resistor and capacitor is out of my comprehension, even after doing some reading On second thought, with this calculator: http://www.learningaboutelectronics.com/Articles/Low-pass-filter-calculator.php#answer1 it appears that using components which I already have, 10kOhm resistor a...

Go to advanced search