Go to advanced search

by Paeryn
Mon Apr 23, 2018 12:48 am
Forum: General discussion
Topic: Help needed
Replies: 11
Views: 211

Re: Help needed

I think you would have to be weird to interpret the question as "any 10,000 digits of PI in any order" rather that the "first 10,000 digits of PI in the normal order". But let's be really weird, it could be "that last 10,000 digits of PI" ! Yes, I was just being pedantic. Automatic response to gett...
by Paeryn
Mon Apr 23, 2018 12:14 am
Forum: General discussion
Topic: Help needed
Replies: 11
Views: 211

Re: Help needed

I'd say the question isn't very good as it doesn't specify that the 10,000 digits in question are the first 10,000, just that they are 10,000 of them. As pi has been calculated to many millions of digits there are many possible selections. That's skipping over the fact that technically doesn't speci...
by Paeryn
Fri Apr 20, 2018 10:43 pm
Forum: Beginners
Topic: Works in command line but not in python?
Replies: 6
Views: 187

Re: Works in command line but not in python?

Python doesn't care whether you use double or single quotes around a string, whichever you open a string with is what it looks for to close the string, this allows you to use the other quote symbol in the string itself without resorting to escaping. You needed to have the filename in quotes to preve...
by Paeryn
Fri Apr 20, 2018 5:53 pm
Forum: Advanced users
Topic: AARCH64 from User Program with 32 bit Raspbian
Replies: 4
Views: 129

Re: AARCH64 from User Program with 32 bit Raspbian

If you start the processors in AArch64 then you can't directly run a 32-bit kernel, the instruction sets are totally different. You could probably start up a 64-bit hypervisor that then runs a guest 32-bit OS... I've no idea how to go about doing that though.
by Paeryn
Fri Apr 20, 2018 5:35 pm
Forum: Beginners
Topic: Works in command line but not in python?
Replies: 6
Views: 187

Re: Works in command line but not in python?

As topguy said, your Python version doesn't have the single quotes around the pattern, therefore your *.jpg is being expanded by the shell into multiple filenames, ffmepg is expecting only one (and that it will do the wildcard expansion itself). Try os.system("ffmpeg -r 24 -pattern_type glob -i '" +...
by Paeryn
Fri Apr 20, 2018 4:51 pm
Forum: Advanced users
Topic: AARCH64 from User Program with 32 bit Raspbian
Replies: 4
Views: 129

Re: AARCH64 from User Program with 32 bit Raspbian

No, if the processors are started in AArch32 mode then there is no way to change to AArch64. You can only change from AArch32 to AArch64 when going up an exception level. When the processors are first started they are already at the highest exception level so if they are started in AArch32 mode ther...
by Paeryn
Fri Apr 20, 2018 12:58 am
Forum: Bare metal
Topic: Get the state of the ACT LED on RPi 3
Replies: 10
Views: 1128

Re: Get the state of the ACT LED on RPi 3

But then in mailboxwrite() you do this: msg[6] = num; And that effectively overwrites whatever value you passed to set(). Even worse the delay() function uses num as the loop counter so the value is always guaranteed to be 50000. In mailboxwrite the variable num is a local which is shadowing the gl...
by Paeryn
Tue Apr 17, 2018 9:43 pm
Forum: Python
Topic: Help installing a new library
Replies: 11
Views: 765

Re: Help installing a new library

I am having the same problem with the RPLCD library I downloaded from github. https://github.com/dbrgn/RPLCD I don't know where to put it or what code to use that allows it to download. I have unzipped it and it sits in the download folder because I have no clue where to move it. Yes I know that th...
by Paeryn
Tue Apr 17, 2018 3:53 pm
Forum: Python
Topic: instant replay code help needed
Replies: 4
Views: 123

Re: instant replay code help needed

while running: for event in pygame.event.get(): if event.type == pygame.KEYUP and event.key == pygame.K_c and event.mod & pygame.KMOD_CTRL: pygame.quit() sys.exit() camera.wait_recording(0.2) if GPIO.input(5): print 'Instant Replay ACtivated!' From that it looks like you are only checking the GPIO ...
by Paeryn
Mon Apr 16, 2018 9:42 pm
Forum: Python
Topic: writing I32 to binary file: endian-ness on R-Pi
Replies: 12
Views: 261

Re: writing I32 to binary file: endian-ness on R-Pi

<This is off-topic to the original post so I won't continue after this> @Paeryn It is quite interesting how a computer is built and how the computer maths. For a small inside see this project where a guy builds his own computer for adding https://blog.hackster.io/redditor-builds-8-bit-alu-using-only...
by Paeryn
Mon Apr 16, 2018 11:43 am
Forum: Beginners
Topic: Newbie question - Raspbian Jessie
Replies: 8
Views: 255

Re: Newbie question - Raspbian Jessie

AlkemaCJ wrote:
Mon Apr 16, 2018 7:55 am
I downloaded the full "Noobs" zip under the download section, and have successfully installed, and connected to wife.
Should I ask how you connected your RPi to your wife or is that too personal? :lol:
by Paeryn
Mon Apr 16, 2018 11:20 am
Forum: Python
Topic: writing I32 to binary file: endian-ness on R-Pi
Replies: 12
Views: 261

Re: writing I32 to binary file: endian-ness on R-Pi

For the CPU to do multiply what it does is a loop over addition e.g 3 * 5 does 3+3+3+3+3 and addition is done by looping over just adding 1 at a time e.g 3+3 is done by 3+1+1+1. So if you have a large number and multiply it by 512 then it require a hell of a lot of cycles to do the job compared to ...
by Paeryn
Sun Apr 15, 2018 11:02 am
Forum: C/C++
Topic: ERROR : setup my raspberry pi to receive message from Arduino using C++
Replies: 13
Views: 395

Re: ERROR : setup my raspberry pi to receive message from Arduino using C++

I got RF24 library from https://github.com/nRF24/RF24 . I checked the function construct. It seems to be okay. https://github.com/nRF24/RF24/blob/master/RF24.h I even compared the RF24 fuction defination(below) from RF24.cpp file and apparently i am passing the correct parameter ( type) still I am ...
by Paeryn
Sat Apr 14, 2018 8:43 pm
Forum: General programming discussion
Topic: How Much of the Raspbian Stack is Open Source?
Replies: 7
Views: 372

Re: How Much of the Raspbian Stack is Open Source?

Device Tree stuff isn't closed source, the source files are in the kernel source (that might not be the correct kernel version, can't remember off the top of my head which we are on). The bootloader I would say is part Broadcom part RPF (most likely RPF alterations to a base provided by Broadcom), t...
by Paeryn
Sat Apr 14, 2018 7:56 pm
Forum: C/C++
Topic: ERROR : setup my raspberry pi to receive message from Arduino using C++
Replies: 13
Views: 395

Re: ERROR : setup my raspberry pi to receive message from Arduino using C++

What includes you have won't affect which libraries get linked (though if the headers were different then the mangled name could be different). Looking at your original compile line from the first post you appear to be linking against librf24 which I would assume should have the functions in it. Tho...
by Paeryn
Sat Apr 14, 2018 12:38 pm
Forum: C/C++
Topic: ERROR : setup my raspberry pi to receive message from Arduino using C++
Replies: 13
Views: 395

Re: ERROR : setup my raspberry pi to receive message from Arduino using C++

After lot of hit and trial - Now I am able to successfully compile my C++ code on Raspberry Pi3 however while running an executable file. I am getting below error. pi@raspberrypi:~/RF24/librf24-rpi/librf24/examples $ ./Test2 ./Test2: symbol lookup error: ./Test2: undefined symbol: _ZN4RF24C1ENSt7__...
by Paeryn
Thu Apr 12, 2018 11:35 pm
Forum: Advanced users
Topic: Configuration EEPROM read modes?
Replies: 12
Views: 397

Re: Configuration EEPROM read modes?

HATs have eeproms, as far as I'm aware an RPi itself doesn't. I assume you are designing a HAT or similar. I wouldn't have thought it mattered which way the RPi reads the HAT's eeprom, the eeprom should respond correctly whichever way is used. Have you followed the design guide on what types of eepr...
by Paeryn
Thu Apr 12, 2018 10:52 pm
Forum: Other languages
Topic: A Extended Pascal Implementation : CONCEPT.
Replies: 28
Views: 955

Re: A Extended Pascal Implementation : CONCEPT.

Having the parser created by bison/yacc is a big boon as the BNF source gives the user a formal description of the language which the parser is actually generated from. You don't have to worry about keeping the two in sync. Yacc only handles LALR(1) grammars I think so you have to be careful with am...
by Paeryn
Thu Apr 12, 2018 1:44 pm
Forum: Troubleshooting
Topic: logged in as ' ' user
Replies: 8
Views: 208

Re: logged in as ' ' user

I assume he is running it whilst being logged in as root.
by Paeryn
Thu Apr 12, 2018 1:41 pm
Forum: Python
Topic: TypeError: 'int' object is not subscriptable
Replies: 3
Views: 134

Re: TypeError: 'int' object is not subscriptable

@Paeryn I changed this: if (int(rect[:1] < rect[:1][max_index] + rect[2:2][max_index] and rect[:1] > rect[:1][max_index] - 0.1* rect[2:2][max_index] and rect[1:2]> rect[1:2][max_index])): confidence += 45 And I get error: ypeError: only integer scalar arrays can be converted to a scalar index I can...
by Paeryn
Thu Apr 12, 2018 12:31 pm
Forum: Troubleshooting
Topic: logged in as ' ' user
Replies: 8
Views: 208

Re: logged in as ' ' user

Hmm, I need to study that stuff more I guess, I had tried set SUDO_USER=pi ; raspi-config But it makes sense it had to be in the environment from somewhere, I hadn't tried putting it in my bashrc yet. And it probably should have been export, not set. I like tcsh's setenv, it's less ambiguous. Yes, ...
by Paeryn
Thu Apr 12, 2018 1:09 am
Forum: Troubleshooting
Topic: logged in as ' ' user
Replies: 8
Views: 208

Re: logged in as ' ' user

The environment variable SUDO_USER is set by sudo itself in the environment it runs the command in. It should be the name of the user who invoked sudo, e.g. pi@rpi3:~ $ echo $SUDO_USER pi@rpi3:~ $ sudo sh -c 'echo $SUDO_USER' pi If you aren't using sudo to run raspi-config then there's no surprise t...
by Paeryn
Wed Apr 11, 2018 5:32 pm
Forum: Python
Topic: TypeError: 'int' object is not subscriptable
Replies: 3
Views: 134

Re: TypeError: 'int' object is not subscriptable

I don't know about opencv (especially the differences in how it is used in C++ vs Python), but your Python code doesn't do what the C++ code does. The error you are getting is because you have the following code if ((x < x[max_index] + w[max_index]) ... If x is an int then it can't also be a list of...
by Paeryn
Tue Apr 10, 2018 11:04 pm
Forum: General programming discussion
Topic: Raspberry Pi Benchmarks
Replies: 103
Views: 44539

Re: Raspberry Pi Benchmarks

One thing that has bothered me about this thread since it began: If we are attempting to benchmark the abilities of the HW, why are we running in an Operating System? It would make better since to run any benchmarks baremetal, displaying results to the framebuffer only between tests. I could unders...
by Paeryn
Tue Apr 10, 2018 10:14 pm
Forum: Python
Topic: Infinite loop checking potentiometer
Replies: 40
Views: 1861

Re: Infinite loop checking potentiometer

Your code is doing two reads of a pot each time and only registering if the difference between those two is over your detection limit of 0.2. If the pot is changed in the time after the second read and before the next first read then your code won't register it. What you want to be doing is to only ...

Go to advanced search