Go to advanced search

by Paeryn
Sat Feb 22, 2020 4:56 pm
Forum: Troubleshooting
Topic: RPi4 dead?
Replies: 7
Views: 322

Re: RPi4 dead?

:cry: Have you read the sticky about booting problems? https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=58151#p437084 and the RPi4 specific post https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=58151#p1485558 Are you powering the RPi with a decent power supply (preferrably the official...
by Paeryn
Fri Feb 21, 2020 7:18 pm
Forum: General discussion
Topic: Commands
Replies: 6
Views: 224

Re: Commands

SCP_1678-B wrote:
Fri Feb 21, 2020 3:41 pm
I need help with my new raspberry pi 4
I want to make something so when i type “welp” is says “bash: welp not found”
I want it so when i type welp this with type this command for me “watch vcgencmd measure_temp“ instead of typing it
An alias will work,

Code: Select all

alias welp="watch vcgencmd measure_temp"
by Paeryn
Fri Feb 21, 2020 7:10 pm
Forum: General discussion
Topic: Directory for auto start does not exist?
Replies: 2
Views: 104

Re: Directory for auto start does not exist?

Good morning! I am just starting to play around, and I'm running into something that I cannot seem to troubleshoot, straight off the bat! I want to configure my auto start, but I keep getting the error message that the director does not exist. This is what I'm keying: sudo nano ~/.config/lxsession/...
by Paeryn
Wed Feb 19, 2020 9:43 pm
Forum: Python
Topic: What is the difference between...
Replies: 18
Views: 506

Re: What is the difference between...

Hardly “ There should be one—and preferably only one—obvious way to do it ”, though. You missed the bit after it "Although that way may not be obvious at first unless you're Dutch." :) It depends on how you interpret that aphorism as well, you could read it as saying that, although only having a si...
by Paeryn
Wed Feb 19, 2020 6:47 pm
Forum: Python
Topic: What is the difference between...
Replies: 18
Views: 506

Re: What is the difference between...

It is, the behaviour is totally consistent with what it is told to do. In this case a lot of people probably see that the two formats generally do the same thing and they assume they are just two ways of writing the same thing without thinking about what they are actually asking Python to do. Breaki...
by Paeryn
Wed Feb 19, 2020 2:40 pm
Forum: Python
Topic: What is the difference between...
Replies: 18
Views: 506

Re: What is the difference between...

In all likelihood they will both import the module, it's just something to be aware of. import will always import a module, from will import anything.
by Paeryn
Wed Feb 19, 2020 2:21 pm
Forum: Python
Topic: What is the difference between...
Replies: 18
Views: 506

Re: What is the difference between...

Not very practical example :- Package mypackage pi@rpi4:~/Programming/python $ ll mypackage/ total 12 -rw-r--r-- 1 pi pi 51 Feb 19 14:02 display.py -rw-r--r-- 1 pi pi 57 Feb 19 14:02 __init__.py drwxr-xr-x 2 pi pi 4096 Feb 19 14:03 __pycache__ pi@rpi4:~/Programming/python $ cat mypackage/__init__.py...
by Paeryn
Wed Feb 19, 2020 11:07 am
Forum: Python
Topic: What is the difference between...
Replies: 18
Views: 506

Re: What is the difference between...

import matplotlib.animation as animation and from matplotlib import animation Are these directives equivalent? No, they behave differently (though in some cases they might appear to do the same thing). import matplotlib.animation as animation will import the package/module object matplotlib.animati...
by Paeryn
Mon Feb 17, 2020 11:29 pm
Forum: Beginners
Topic: The energy consumed by a raspberry card
Replies: 18
Views: 577

Re: The energy consumed by a raspberry card

That's a combination of Ohm's law and Watt's law. Ohm's law is specifically the relationship between voltage, current and resistance , V = I × R Watt's law is specifically the relationship between power, current and voltage , P = I × V Watt's law is actually a combination of Joule's law and Ohm's la...
by Paeryn
Sun Feb 16, 2020 8:21 pm
Forum: OpenGLES
Topic: RP3 GL_LINES Problem
Replies: 14
Views: 366

Re: RP3 GL_LINES Problem

Can you provide a short (complete) program demonstrating this behaviour?
by Paeryn
Sun Feb 16, 2020 3:10 pm
Forum: Beginners
Topic: The energy consumed by a raspberry card
Replies: 18
Views: 577

Re: The energy consumed by a raspberry card

First is to check the voltage and the current , then using Ohms Law to give you the Wattage. Ohm's Law concerns voltage, current and resistance. It is irrelevant if one has values for voltage and current and wishes to calculate power ("wattage"). from BoyOh The watt (symbol: W) is a unit of power. ...
by Paeryn
Thu Feb 13, 2020 1:14 am
Forum: Advanced users
Topic: [Solved] Any way to have infinite /tmp in RAM
Replies: 28
Views: 735

Re: Any way to have infinite /tmp in RAM

When I was setting up /tmp on tmpfs I know I read somewhere that it cannot be greater than physical RAM size, shouldn't be set to more than half, took it to be fact. Turns out it isn't. Problem solved. And thanks to everyone. It might have been back in the day, possibly by marking the memory as not...
by Paeryn
Wed Feb 12, 2020 9:46 pm
Forum: Advanced users
Topic: [Solved] Any way to have infinite /tmp in RAM
Replies: 28
Views: 735

Re: Any way to have infinite /tmp in RAM

Tmpfs has a maximum size set when mounted, as said above, if you don't specify a size it defaults to 50% of your total RAM size. You can never store more data to tmpfs than this size. If you mounted /tmp with size=100M then you're limited to 100MB (actually slightly less due to overheads) in use at ...
by Paeryn
Wed Feb 12, 2020 5:00 am
Forum: General discussion
Topic: Script suddenly stops working
Replies: 5
Views: 228

Re: Script suddenly stops working

I think your problem may be due to an incorrect file, text files are meant to have a newline at the end of every line including the last. When read encounters EOF it returns a failure code, so if the last line of the text file doesn't end with a newline then that last line, although read, will fail ...
by Paeryn
Tue Feb 11, 2020 3:04 pm
Forum: Bare metal, Assembly language
Topic: How to do a "if(low level detect)" of RPi4 in bare metal
Replies: 4
Views: 149

Re: How to do a "if(low level detect)" of RPi4 in bare metal

I don't know about the rest of the code but your bit test is long (2 instructions where only 1 is needed) and the value you use is in the wrong base (hexadecimal numbers need the base specifying). Also line comments begin with an @ unless the source is pre-parsed with cpp. You can remove the cmp in...
by Paeryn
Tue Feb 11, 2020 1:12 pm
Forum: Bare metal, Assembly language
Topic: How to do a "if(low level detect)" of RPi4 in bare metal
Replies: 4
Views: 149

Re: How to do a "if(low level detect)" of RPi4 in bare metal

I don't know about the rest of the code but your bit test is long (2 instructions where only 1 is needed) and the value you use is in the wrong base (hexadecimal numbers need the base specifying). Also line comments begin with an @ unless the source is pre-parsed with cpp. Assuming you are using gas...
by Paeryn
Tue Feb 11, 2020 12:08 pm
Forum: Python
Topic: -save-pts using Thonny/Python
Replies: 3
Views: 114

Re: -save-pts using Thonny/Python

HermannSW wrote:
Tue Feb 11, 2020 11:34 am
"--save-pts" needs a file name argument following.
Ah, thank you. The documentation page linked to by the OP doesn't make it clear that the option requires a filename after it. I'll update my code snippet.
by Paeryn
Tue Feb 11, 2020 1:26 am
Forum: Beginners
Topic: sharing a bluetooth keyboard, without tearing hair out?
Replies: 2
Views: 90

Re: sharing a bluetooth keyboard, without tearing hair out?

Pmub Err, what? As to the question about swapping a keyboard between multiple hosts, pretty much your keyboard has to support such a facility. I know Logitech make some e.g. the K780 which allows you to pair with three hosts and lets you switch which hosts it connects to. Most generic keyboards onl...
by Paeryn
Tue Feb 11, 2020 12:14 am
Forum: Python
Topic: -save-pts using Thonny/Python
Replies: 3
Views: 114

Re: -save-pts using Thonny/Python

You can't "call" --save-pts , that is a command line option of the raspivid program. You can run the raspivid program and pass it command line arguments from within Python e.g. something like this. import subprocess subprocess.run(['raspivid', '-t', '5000', '-o', 'video.h264', '-b', '3500000', '--sa...
by Paeryn
Fri Feb 07, 2020 9:11 pm
Forum: Troubleshooting
Topic: Python3 help not working correctly
Replies: 2
Views: 104

Re: Python3 help not working correctly

Slightly edited the quotation to cut out some of Python's wordy message (not relevant) and put it into a code block to make it easier to read. Hi all, I have an issue with Python3 help on my RPi 4. I have just re-imaged my SD card with the latest raspbian Buster version. I have installed some Circui...
by Paeryn
Thu Feb 06, 2020 11:10 pm
Forum: Raspbian
Topic: Cannot update FreeType2
Replies: 3
Views: 173

Re: Cannot update FreeType2

freetype-config isn't installed by default anymore, pkg-config is the preferred way of querying packages, e.g.

Code: Select all

FT2_CFLAGS=$(pkg-config --cflags freetype2)
FT2_LIBS=$(pkg-config --libs freetype2)
by Paeryn
Wed Feb 05, 2020 12:30 pm
Forum: Troubleshooting
Topic: LXTerminal stuck in python - Need to spam Ctrl+D ~30 times to use command prompt (Resolved)
Replies: 3
Views: 94

Re: LXTerminal stuck in python - Need to spam Ctrl+D ~30 times to use command prompt

The only thing I can think that may have caused a problem would be that I was messing around in the bash file creating an alias for python to set 3.8.0 as the default version. Does anybody know what I might be doing wrong? Thanks It sounds like you've made a mistake in creating your alias and are a...
by Paeryn
Tue Feb 04, 2020 8:22 pm
Forum: Advanced users
Topic: Restricting Linux to say 3 cores.
Replies: 3
Views: 172

Re: Restricting Linux to say 3 cores.

I just tried "isolcpus=3" added to /boot/cmdline.txt It did not work as I was able to use "taskset" to run a job on any of the four cores (and /proc/cpuinfo showed four cores). Anyone know how this is done on Debian? isolcpus does work, it just doesn't do what you want. The isolcpus= option doesn't...
by Paeryn
Mon Feb 03, 2020 11:02 pm
Forum: Python
Topic: Need Help
Replies: 9
Views: 717

Re: Need Help

So that just leaves how best to exit from full-screen mode. Hopefully someone with more experience of PyGame than me might be inclined to help out there. I was going to post about the possible need of running xrefresh after closing the display to force X11 to redraw the framebuffer but I've just te...
by Paeryn
Wed Jan 29, 2020 3:16 pm
Forum: Troubleshooting
Topic: sudo apt autoremove removed my desktop!
Replies: 14
Views: 1014

Re: sudo apt autoremove removed my desktop!

Hi Paeryn. Your answer to this post is the most informative I've come across on the systemd error a lot of people are seeing after git-all install. My Plex server stopped working because of this on a headless Raspberry Pi 4b. It would be really helpful if you could guide me on what packages I would...

Go to advanced search