Go to advanced search

by Paeryn
Tue Jun 19, 2018 7:48 pm
Forum: Graphics programming
Topic: 3d graphics libraries that run on the Pi 2 that aren't slow?
Replies: 1
Views: 17

Re: 3d graphics libraries that run on the Pi 2 that aren't slow?

Hello everyone, Just wondering if there is a such thing as a 3d graphics library/3d game engine that isn't slow and laggy and doesn't push a Pi 2 up to 100% CPU constantly... :lol: Please help! Boomonster The obvious 3D graphics library is OpenGL|ES 2, 1 is also available but it's fixed-function ra...
by Paeryn
Sun Jun 17, 2018 8:11 am
Forum: OpenGLES
Topic: glDrawElements abysmally slow
Replies: 9
Views: 359

Re: glDrawElements abysmally slow

Also, that is making a lot of 2-triangle draw calls. You really want to batch as many triangles as you can in each draw call and you want to make the minimum number of state changes between each draw call. Every time you have to send a command to the GPU there is an overhead, and the overheads for c...
by Paeryn
Sat Jun 16, 2018 8:41 am
Forum: Beginners
Topic: Need terminal command to open maximised terminal and run script in it
Replies: 25
Views: 520

Re: Need terminal command to open maximised terminal and run script in it

I want to use a command to open a terminal in a new maximised window and run a script. This is the command I have so far: lxterminal -e ./home/pi/Mining/tmuxScript.sh You have got the path to your command wrong, the period at the start says "starting in the current directory" (a single period is a ...
by Paeryn
Sat Jun 16, 2018 3:49 am
Forum: C/C++
Topic: Writing data to BCM2835 - SPI
Replies: 24
Views: 700

Re: Writing data to BCM2835 - SPI

Saying it different way - if the register is not memory but a hardware why did I went thru memory mapping process? After all the register addresses in datasheet only the lower part of 32 bit address matches the datasheet It is all dynamically mapped to different addresses every time start the app. ...
by Paeryn
Fri Jun 15, 2018 10:15 pm
Forum: C/C++
Topic: Writing data to BCM2835 - SPI
Replies: 24
Views: 700

Re: Writing data to BCM2835 - SPI

Since I cannot read what I set to SPI_FIFO_DATA - how does it recognize if I write all zeroes as first data? Seems like catch 22. The very act of writing to the register puts the value you write onto the TX FIFO. Hardware registers, whilst looking like normal memory locations, aren't necessarily li...
by Paeryn
Fri Jun 15, 2018 7:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: More BCM2835 / SPI questions
Replies: 15
Views: 534

Re: More BCM2835 / SPI questions

I am aware of all of that - after all it is S(erial)PI. I am just questioning the notion that after physically transmitting one bit the receiver will read what is coming back. There is no logical reason to do that - responding on single bit transmitted by master and received by slave. Cheers The SP...
by Paeryn
Fri Jun 15, 2018 6:47 pm
Forum: C/C++
Topic: Writing data to BCM2835 - SPI
Replies: 24
Views: 700

Re: Writing data to BCM2835 - SPI

Just had a long walk to ponder on the statement of setting the RDX as an indicator that ONE bit is "received". That is contradictory to SPI protocol of working with minimum of 8 bits. Why would slave responded after receiving 1 bit? I am still not sure what triggers the BCM hardware to actually STA...
by Paeryn
Fri Jun 15, 2018 3:04 pm
Forum: C/C++
Topic: Writing data to BCM2835 - SPI
Replies: 24
Views: 700

Re: Writing data to BCM2835 - SPI

Sorry , been there , done that. The code does the job , but gives no feedback, with the exception of monitoring DONE and TXD . But TXD never changes! For one thing - it assumes char to be output - AKA 8 bits. The BCM2537 SPI_FIFO DATA register is 32 bit wide. The "standard " SPI data is 8 bits wide...
by Paeryn
Fri Jun 15, 2018 2:22 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: More BCM2835 / SPI questions
Replies: 15
Views: 534

Re: More BCM2835 / SPI questions

So what you are saying is that this "bytes" business BCM uses in their datasheet is bogus as I suspected. I will try to modify my SPI_FIFO DATA to "send" only one bit and see what develops. No, whilst the SPI bus is only one bit wide, the hardware always transfers data in blocks of 8 sequential bit...
by Paeryn
Fri Jun 15, 2018 4:31 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: More BCM2835 / SPI questions
Replies: 15
Views: 534

Re: More BCM2835 / SPI questions

I wasn't telling you what you can and can't do, I was saying that if you use spidev at the same time as manipulating the hardware registers directly then chaos can ensue as you can end up interfering with each other. Especially, for example, with the FIFOs because if spidev reads a value whilst you ...
by Paeryn
Thu Jun 14, 2018 10:51 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: More BCM2835 / SPI questions
Replies: 15
Views: 534

Re: More BCM2835 / SPI questions

As to writing to the FIFO, it doesn't look complicated. Once you've set up the HW you go in a loop If you have data to send and TXD shows it isn't full write one byte to the FIFO (you have to write it as a 32bit value though). Keep doing this until either you have no more bytes to send or TXD shows ...
by Paeryn
Thu Jun 14, 2018 8:09 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: More BCM2835 / SPI questions
Replies: 15
Views: 534

Re: More BCM2835 / SPI questions

My apology if I have already asked this or posting in wrong forum. All I want is to send SPI data to BCM2835 and verify it got processed in software. I am not interested in verifying actual hardware output, not yet. Here is what I have done so far Configured RPi 3B (raspi-config) for SPI. Verified ...
by Paeryn
Thu Jun 14, 2018 7:44 pm
Forum: Python
Topic: what does this code do...?
Replies: 3
Views: 280

Re: what does this code do...?

You can even decide that you don't want all of them and use the underscore symbol to ignore 1 or many parts. This will get parts1, 2 and 4 but ignore part 3. part1, part2, _, part4 = this_is_a_tuple Technically the underscore doesn't ignore a value, an underscore is a variable name just like part1 ...
by Paeryn
Wed Jun 13, 2018 4:50 am
Forum: Beginners
Topic: Is it possible to compile this code for the Pi if it was intended for different processor architecture?
Replies: 8
Views: 390

Re: Is it possible to compile this code for the Pi if it was intended for different processor architecture?

It would be more difficult (read: a lot of work) to port from x32/x64 to ARM in my opinion because of the reduced instruction set in RISC. This would be reflected in the compiler and necessitate some creative coding to work around (if possible at all) missing functions. The code is C/C++, the only ...
by Paeryn
Tue Jun 12, 2018 4:46 pm
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

I guess the old school method using "new" is frowned upon today. It requires you remember to have a corresponding "delete" somewhere. With malloc it is clear that free does not have to be called at the end of the program because the heap is automatically freed by the operating system upon terminati...
by Paeryn
Tue Jun 12, 2018 4:22 pm
Forum: Bare metal, Assembly language
Topic: Multi-core example fails on Pi3 B+, aarch32?
Replies: 12
Views: 482

Re: Multi-core example fails on Pi3 B+, aarch32?

seriously they changed the bootloader? it doesnt spin in a loop anymore? it puts the core to sleep? is there a thread/posting with the disassembly? will have to re-visit this when I have time... Thanks, David They are here. AFAIK armstub.S is the one loaded for the RPi0/1, armstub7.S is the 32-bit ...
by Paeryn
Tue Jun 12, 2018 12:41 am
Forum: C/C++
Topic: Dynamic sized arrays
Replies: 120
Views: 3572

Re: Dynamic sized arrays

OK, riddle me this, any C++ gurus out there. When I change my little variable size square array class to use an old school "new double[size * size];" to hold the data the execution time of norm1cm becomes 3 times longer. Far worse still the norm1rm execution time balloons out to 27.16589689. That's...
by Paeryn
Mon Jun 11, 2018 8:01 pm
Forum: Bare metal, Assembly language
Topic: Multi-core example fails on Pi3 B+, aarch32?
Replies: 12
Views: 482

Re: Multi-core example fails on Pi3 B+, aarch32?

The stub that gets loaded by default has CPUs 1-3 waiting for the CPU's event signal before they check their mailbox for a start address (this allows the cores to go into low-power mode and wait rather than constantly checking). At a guess, try adding the SEV instruction after setting the target add...
by Paeryn
Sun Jun 10, 2018 2:08 am
Forum: Bare metal, Assembly language
Topic: Reading GPIO input assembly
Replies: 3
Views: 318

Re: Reading GPIO input assembly

That is gpio 23 not 4. Looks like you are confusing the wiringpi name/number (which looks to be labeled #4 on that pin) with the actual BCM gpio number which you need to use when reading the hardware registers.
by Paeryn
Sat Jun 09, 2018 7:46 pm
Forum: Python
Topic: build of python 3.6 has 'lost' installed python3 dist_packages
Replies: 3
Views: 272

Re: build of python 3.6 has 'lost' installed python3 dist_packages

At a guess your manual building of Python3.6 has defaulted to /usr/local/lib rather than /usr/lib which is normal. /usr is generally used as the base for system installed packages, /usr/local is generally used as the base for manually installed stuff, that way minimises possible clashes between what...
by Paeryn
Sat Jun 09, 2018 12:18 am
Forum: Beginners
Topic: Script error - can't see the wood for trees!
Replies: 10
Views: 288

Re: Script error - can't see the wood for trees!

I spoke to soon! Not solved. The script works fine when called from terminal but not when called via crontab. Why is that? Usually down to cron running jobs with a minimal environment compared to what you have from the terminal e.g. $PATH often has less directories, if any program you try running i...
by Paeryn
Fri Jun 08, 2018 9:04 pm
Forum: General discussion
Topic: Forum Shuffle
Replies: 29
Views: 1181

Re: Forum Shuffle

You must've been burning the midnight oil to get the forum so organised, well done.

<Hands out virtual glasses of wine / pints of beer / other beverages of choice to all involved.>
by Paeryn
Fri Jun 08, 2018 6:16 pm
Forum: Python
Topic: Help please, how to make the variable float in TextBox (guizero)
Replies: 2
Views: 217

Re: Help please, how to make the variable float in TextBox (guizero)

Hi, tell me how to do it so that when you enter a number in the field it is defined as a float? Var = TextBox(app) Var should be float. You get the contents of a TextBox by looking at its value and this will always be a string. If you want the floating point value entered you need to check that it ...
by Paeryn
Fri Jun 08, 2018 5:55 pm
Forum: Beginners
Topic: GPIO event detection with break statement
Replies: 5
Views: 137

Re: GPIO event detection with break statement

function do_something takes only 1 argument two given. I have only given self ,nothing else. Can you please clarify also this? def real_program(self): GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_DOWN) GPIO.add_event_detect(24, GPIO.RISING, callback= do_something, bouncetime=200) adc = Adafruit_AD...
by Paeryn
Thu Jun 07, 2018 11:37 pm
Forum: C/C++
Topic: reading pin state
Replies: 5
Views: 286

Re: reading pin state

Well , it did not work Writing 1 to GPCLR register configured as output has no effect on value of the register. The GPCLR is R/W and resets to 0 - really ? Ether the datasheet is bogus or I am reading / writing to wrong register. But I can set the pin as output and read it back using same code . Ne...

Go to advanced search