Go to advanced search

by Paeryn
Mon Mar 30, 2020 9:46 pm
Forum: Bare metal, Assembly language
Topic: Branch prediction in EL3 with bit 11 of SCTLR_EL3
Replies: 1
Views: 43

Re: Branch prediction in EL3 with bit 11 of SCTLR_EL3

Does not setting that bit have any noticeable effect? According to the A72 TRM the branch predictor is always on (though in certain circumstances like changing EL it doesn't predict). 6.5.5 Enabling program flow prediction Program flow prediction is always enabled and no programming is required to t...
by Paeryn
Mon Mar 30, 2020 5:23 pm
Forum: General discussion
Topic: Vector CTRL App
Replies: 2
Views: 72

Re: Vector CTRL App

I assume they are talking about the Anki Vector robot, and the app probably allows you to interact with it via a phone/tablet. It has an SDK which is basically some python modules which allows you to write your own programs on your PC to interact with it, though whether it works on the RPi I don't k...
by Paeryn
Mon Mar 30, 2020 12:22 pm
Forum: Troubleshooting
Topic: “ImportError: No module named board” only when I start a python script though the terminal
Replies: 3
Views: 338

Re: “ImportError: No module named board” only when I start a python script though the terminal

I have the same problem. My script includes both board and busio modules. When I run the script through Thonny Python IDE, it works without any probem. However, when I try to run it in terminal by writing "python blinkatest.py", it gave me the following error: Thonny will be using python3 to run yo...
by Paeryn
Thu Mar 26, 2020 8:31 pm
Forum: C/C++
Topic: Troubleshooting linked libraries
Replies: 4
Views: 119

Re: Troubleshooting linked libraries

My guess would be libcec, same as swampdog I don't have it installed to check against but looking at the cmake file for libcec it will pull in Xrandr, X11, rt, vcos, vchiq_arm, bcm_host. These libraries can (will) pull in other libraries that they rely on.
by Paeryn
Thu Mar 26, 2020 8:05 pm
Forum: Python
Topic: Python Script Not Executing From crontab
Replies: 5
Views: 101

Re: Python Script Not Executing From crontab

There are two places programs send output to: Standard output (stdout) and Standard Error (stderr); You can redirect these outputs to a different place (like a file); File descriptors are used to identify stdout (1) and stderr (2); command > output is just a shortcut for command 1> output; You can ...
by Paeryn
Thu Mar 26, 2020 7:26 pm
Forum: Python
Topic: Issue when setting up a crontab entry - python script
Replies: 23
Views: 343

Re: Issue when setting up a crontab entry - python script

Running processes (ps aux) - 3rd line D+ ??? root 948 0.0 0.3 7220 3216 ? S 12:56 0:00 sudo python /home/pi/Documents/PiScripts/myScript.py root 952 99.2 1.0 33300 9876 ? Sl 12:56 1:20 python /home/pi/pi/Documents/PiScripts/myScript.py root 977 0.0 0.2 5500 2540 pts/0 D+ 12:56 0:00 sudo ls pi 979 3...
by Paeryn
Thu Mar 26, 2020 2:29 am
Forum: Python
Topic: Pyton script crashes after 4 hours
Replies: 9
Views: 258

Re: Pyton script crashes after 4 hours

I'd put a try/except in to your code to skip past any invalid data and wait for the next valid response. For example while True: try: ......... f = urllib.request.urlopen(tvocURL +str(temp[0])) ..... except IndexError: pass #Skip this and try again. Change (or add more) "except IndexError" to be as...
by Paeryn
Sat Mar 21, 2020 7:23 pm
Forum: Advanced users
Topic: Virtual memory 100% while RAM is al 30%, is this normal?
Replies: 12
Views: 488

Re: Virtual memory 100% while RAM is al 30%, is this normal?

Sometimes pages of memory are copied to the swap ahead of time (typically when no other file I/O is happening) in anticipation, that way when those physical pages are needed the kernel can use them straight away without having to wait for the pages to be written out first. And yes, the default for R...
by Paeryn
Sat Mar 21, 2020 6:29 pm
Forum: Python
Topic: Call a function from other class in a same path
Replies: 1
Views: 86

Re: Call a function from other class in a same path

If I'm understanding you right (and glossing over several factors that make the code you presented not match up), you're having problems calling araba.move() because Python is giving you an error. My main problem is I have 2 classes which name front and back dc controls I want to call the functions ...
by Paeryn
Wed Mar 18, 2020 2:31 pm
Forum: Python
Topic: PYC decompiled
Replies: 8
Views: 1781

Re: PYC decompiled

Also .pyc files only run on the same version of Python that created them, so if you take the .pyc files created by Python 3.5 they won't work if you try to run them with Python 3.7. They are meant as a cache so that Python doesn't waste time recompiling modules where their source files haven't been ...
by Paeryn
Wed Mar 18, 2020 12:58 am
Forum: Beginners
Topic: "canvas" type graphical library?
Replies: 5
Views: 389

Re: "canvas" type graphical library?

tkinter has Canvas with create_line etc https://kite.com/python/docs/Tkinter.Canvas Be aware that the lines, circles etc. created on Tk's Canvas aren't just drawn on to a bitmap that you can forget about, they are objects in their own right and will still be there and drawn even if subsequent eleme...
by Paeryn
Sun Mar 15, 2020 6:38 pm
Forum: Python
Topic: Why aren't I getting readings from a multiplexer using python?
Replies: 5
Views: 303

Re: Why aren't I getting readings from a multiplexer using python?

Are the unused inputs to the multiplexer unconnected (floating)? If so pull them them down to ground on your board or enable the pulldown resistor on the RPi's input.

Code: Select all

GPIO.setup(18, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)  #Signal Input
by Paeryn
Wed Mar 11, 2020 11:30 pm
Forum: General discussion
Topic: How To Get Mousepad To Read Standard Text Files
Replies: 99
Views: 3767

Re: How To Get Mousepad To Read Standard Text Files

A default of ISO-8859-15 might seem a lot more logical. The list isn't even in asciibetical order. The list is in an order, they first are grouped e.g. West European then East European etc. and in each group they are alphabetical by name e.g. West European contains Celtic, 2x Greek, Nordic, South E...
by Paeryn
Tue Mar 10, 2020 10:47 am
Forum: Troubleshooting
Topic: greeter keeps appearing, no desktop access
Replies: 17
Views: 491

Re: greeter keeps appearing, no desktop access

I'm surprised that it didn't work when you tried Dougie's method which should have set the ownership for all the files in your home tree. Though Dougie's suggestion of using pi.pi rather than pi:pi is not really recommended as it can be ambiguous and isn't portable (gnu chown allows the usage as a b...
by Paeryn
Mon Mar 09, 2020 7:23 pm
Forum: Troubleshooting
Topic: greeter keeps appearing, no desktop access
Replies: 17
Views: 491

Re: greeter keeps appearing, no desktop access

The main file that gets the wrong ownership (which prevents logging in) when doing sudo startx is (assuming pi is the username, change as appropriate) /home/pi/.Xauthority By running startx as root that file will become owned by root so the next time you try to log in (as pi) that file cannot be mod...
by Paeryn
Mon Mar 09, 2020 8:41 am
Forum: Troubleshooting
Topic: NameError: name 'long' is not defined
Replies: 3
Views: 181

Re: NameError: name 'long' is not defined

Begin Player Traceback (most recent call last): File "bplay.py", line 72, in <module> current_movie_id = long(10) NameError: name 'long' is not defined" I've attempted to search for this long variable in the other files associated with this program but have not been able to find anything associated...
by Paeryn
Mon Mar 09, 2020 12:14 am
Forum: General discussion
Topic: How To Get Mousepad To Read Standard Text Files
Replies: 99
Views: 3767

Re: How To Get Mousepad To Read Standard Text Files

BTW if you run Mousepad with one of those 'bad' characters the default click through choice is -14 not -15. Maybe there's others buried in there that also work but I've got limited time to experiment. Leafpad's doing the trick for now. AFAIK the list of encodings to choose from is just a list of th...
by Paeryn
Sat Mar 07, 2020 11:36 pm
Forum: Python
Topic: Most elegant method to change log daily at 01:00
Replies: 20
Views: 948

Re: Most elegant method to do something daily at 01:00...

Well since strftime()'s job is to return a string representation of the datetime object, it makes no sense to expect it to be able to return a string containing anything other than the exact datetime it's called on. It is able to transform according to time zones. But it is just leaner to keep bein...
by Paeryn
Sat Mar 07, 2020 7:43 pm
Forum: Python
Topic: Most elegant method to change log daily at 01:00
Replies: 20
Views: 948

Re: Most elegant method to do something daily at 01:00...

Ah, OK.the solution is to make the math in the expression BEFORE strftime(). I wanted to do it WITHIN strftime(). Well since strftime()'s job is to return a string representation of the datetime object, it makes no sense to expect it to be able to return a string containing anything other than the ...
by Paeryn
Sat Mar 07, 2020 9:13 am
Forum: Python
Topic: Most elegant method to change log daily at 01:00
Replies: 20
Views: 948

Re: Most elegant method to do something daily at 01:00...

Do the maths on UTC (GMT+0) times, then display the results with the required timezone. I wanted to avoid writing a program that is time zone specific or would require it as a parameter. In fact I am using a log named strftime("%y/%m/%d).log I wanted to check every second if the file strftime("%y/%...
by Paeryn
Fri Mar 06, 2020 10:58 pm
Forum: Python
Topic: Most elegant method to change log daily at 01:00
Replies: 20
Views: 948

Re: Most elegant method to do something daily at 01:00...

Thank you, but is it possible just to make arithmetics with timereferences? I'd prefer to write a program that is independent of the hosts timezone and get something like now()-1h... You can add or subtract a timedelta from a timedate (or from a date or time individually). As always the core module...
by Paeryn
Thu Mar 05, 2020 12:27 pm
Forum: General discussion
Topic: There is any way to count the SD write cycles that are occurring?
Replies: 13
Views: 780

Re: There is any way to count the SD write cycles that are occurring?

You could use iotop to monitor i/o. Works much the same as top does so you get to see a breakdown of which processes are responsible for how much. You'll need to install it with apt as it isn't included by default (I don't t think)
by Paeryn
Sun Mar 01, 2020 11:08 pm
Forum: Bare metal, Assembly language
Topic: Default instruction set for 32bit mode boot
Replies: 6
Views: 467

Re: Default instruction set for 32bit mode boot

The initial cpu mode is dependent on the SoC implementation as is any method of choosing what the initial mode is. As far as I know the VC can only choose to start the ARMs in either AArch32 or AArch64 with no way to specify T32 rather than A32 as the initial AArch32 mode. It may be that it's physic...
by Paeryn
Sun Mar 01, 2020 7:03 pm
Forum: Bare metal, Assembly language
Topic: Default instruction set for 32bit mode boot
Replies: 6
Views: 467

Re: Default instruction set for 32bit mode boot

Yes, A32 is the initial instruction set. The main way of switching is to use the BX (Branch and eXchange instruction set) or BLX branch instructions. For branches where the address is in a register, if the LSB of the target address is 0 it will execute from the target address in A32 mode, if the LSB...
by Paeryn
Sat Feb 22, 2020 4:56 pm
Forum: Troubleshooting
Topic: RPi4 dead?
Replies: 7
Views: 401

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...

Go to advanced search