Go to advanced search

by -rst-
Mon Jun 12, 2017 5:03 pm
Forum: Graphics programming
Topic: Low-level (Linux framebuffer) graphics programming tutorial
Replies: 62
Views: 55232

Re: Low-level (Linux framebuffer) graphics programming tutor

The mailbox interface seems to have changed at some point and will likely not work anymore (as I think I pointed out in one of the posts).
by -rst-
Mon Apr 18, 2016 4:22 pm
Forum: Beginners
Topic: X-Server on Arch Linux ARM
Replies: 8
Views: 9274

Re: X-Server on Arch Linux ARM

2015glsmaxx wrote:How do you install a display manager and XFCE4?

Thanks!
See Hiro's post above for 'pacman' commands.
by -rst-
Wed Mar 16, 2016 2:03 pm
Forum: Python
Topic: Autorun, re-run, save message...
Replies: 6
Views: 894

Re: Autorun, re-run, save message...

Ehm,

Your console output shows that
str(mtmsn) is "1" and data is "Hello World!" ...and as you only write the first one into the file you obviously get only "1" there...

To make your text file into a shell script name it <filename>.sh and add a shebang a the first line.
by -rst-
Wed Mar 09, 2016 9:59 am
Forum: Graphics programming
Topic: Is the FBIO_WAITFORVSYNC ioctl implemented in Rpi's fb?
Replies: 53
Views: 20903

Re: Is the FBIO_WAITFORVSYNC ioctl implemented in Rpi's fb?

I use the Adafruit driver (I don't know actually, but I followed their guide). And if I don't have FBIO_WAITFORVSYNC, is it possible to have a tearing-free display with a SPI TFT ? I tried using the vsync_callback() (which seems to work), but no success. And I don't really know what to code, I'm ne...
by -rst-
Wed Mar 09, 2016 9:56 am
Forum: Python
Topic: script dies after unknown time
Replies: 5
Views: 687

Re: script dies after unknown time

Fairly deep in the library... source code appears to be here https://github.com/adafruit/Adafruit_Py ... 2C.py#L129

Maybe worth asking Adafruit or logging an issue here https://github.com/adafruit/Adafruit_Python_GPIO/issues
by -rst-
Wed Mar 09, 2016 9:33 am
Forum: Graphics programming
Topic: Low-level (Linux framebuffer) graphics programming tutorial
Replies: 62
Views: 55232

Re: Low-level (Linux framebuffer) graphics programming tutor

[quote="itsagoodquestion"... So anytime after I run it, I have to reboot the machine via serial to tty cable to get display back. I've also tried running fbset w/depth-16 set before and that doesn't work either. ...[/quote] One trick that might help in these situations (obviously if it is not a comp...
by -rst-
Mon Mar 07, 2016 4:33 pm
Forum: General programming discussion
Topic: Raspberry Pi jukebox
Replies: 2
Views: 816

Re: Raspberry Pi jukebox

Take a look at:
- Qt with C
or
- Kivy with Python

On Raspberry Pi the ready made player to check first would be omxplayer (the above may have their own player components too).
by -rst-
Mon Mar 07, 2016 4:28 pm
Forum: General programming discussion
Topic: Running Code in endless loop ?
Replies: 3
Views: 566

Re: Running Code in endless loop ?

As stderr says something like this should be fine: import time while True: if your_checks_here: your_commands_here time.sleep(1) (change the time to sleep so it suits your needs (longer or shorter) Of course it would be better to set up an event/interrupt listener if what ever you are checking in yo...
by -rst-
Mon Mar 07, 2016 12:47 pm
Forum: C/C++
Topic: Timer interrupts with a LED
Replies: 6
Views: 1279

Re: Timer interrupts with a LED

If a simple sleep loop is not good enough then it does get complicated... Something like http://linux.die.net/man/2/setitimer Or if creating an app with a GUI maybe could use GTK http://www.gtk.org/tutorial1.2/gtk_tut-17.html#ss17.1 Worth noting that Linux is a multiuser, multiprocess system and tim...
by -rst-
Mon Mar 07, 2016 12:29 pm
Forum: Python
Topic: Network QoS monitoring with Python
Replies: 2
Views: 626

Re: Network QoS monitoring with Python

There are a lot of ready made Unix tools (ping, wget, etc.) you could possibly use (subprocess.Popen in Python).

If you want to do it all in Python maybe take a look at the requests library http://docs.python-requests.org/en/master/
by -rst-
Mon Mar 07, 2016 11:04 am
Forum: Graphics programming
Topic: SDL wrong screen size
Replies: 5
Views: 1638

Re: SDL wrong screen size

I have a fresh Jessie image (4.1.17 Tue Feb 9 2016) - at initial setup I disabled overscan - I use a 1920x1080 monitor over HDMI - everything is fine - fbset -s reports 1920x1080 - config.txt disable_overscan=1 - overscan_left etc. and framebuffer_width/height are commented out. Maybe worth re-check...
by -rst-
Mon Mar 07, 2016 10:45 am
Forum: Graphics programming
Topic: Is the FBIO_WAITFORVSYNC ioctl implemented in Rpi's fb?
Replies: 53
Views: 20903

Re: Is the FBIO_WAITFORVSYNC ioctl implemented in Rpi's fb?

Are you sure you use the latest version https://github.com/rst-/raspberry-compote/blob/master/fb/fbtestXIV.c#L154 passing the proper pointer? __u32 dummy = 0; ioctl(fbfd, FBIO_WAITFORVSYNC, &dummy); [Edit] Ah, saw your other post and seems you have done this. If that is not the issue, it is quite po...
by -rst-
Mon Mar 07, 2016 9:40 am
Forum: Graphics programming
Topic: Low-level (Linux framebuffer) graphics programming tutorial
Replies: 62
Views: 55232

Re: Low-level (Linux framebuffer) graphics programming tutor

Hmm, that sounds odd. I only have version 1 Pis so cannot be 100% sure but I have tested with both the older Wheezy versions of Raspbian and the latest Jessie.

Does it return back to the shell prompt after 5 seconds (as it should)?

Which OS and version you have (what does 'uname -a' output)?
by -rst-
Thu Mar 03, 2016 5:18 pm
Forum: Python
Topic: Error in library
Replies: 4
Views: 549

Re: Error in library

Sorry, not sure I fully get what you mean... The outer loop 'while True' will run forever (until forcibly interrupted, for example hitting Ctrl-C). The inner loop 'while not radio.available(0)' waits until the radio has received something (as far as I understand). Then the message is read and - the ...
by -rst-
Thu Mar 03, 2016 5:03 pm
Forum: Graphics programming
Topic: SDL wrong screen size
Replies: 5
Views: 1638

Re: SDL wrong screen size

Ah, well - was worth a try. I have a nagging feeling I have seen something similar on the forums... Is the 1776 x 952 the native resolution of your display?
by -rst-
Wed Mar 02, 2016 2:27 pm
Forum: Python
Topic: uinput help
Replies: 6
Views: 691

Re: uinput help

Well, I can't say I know this library and the docs (http://tjjr.fi/sw/python-uinput/) are fairly sparse so not sure. Looks to me like you need to initialise it with a list of keys you are planning to send ...and your script looks like it could take any keys, so... Maybe you can just start with a cou...
by -rst-
Wed Mar 02, 2016 2:17 pm
Forum: Graphics programming
Topic: SDL wrong screen size
Replies: 5
Views: 1638

Re: SDL wrong screen size

Disable overscan in raspi-config?
by -rst-
Wed Mar 02, 2016 2:15 pm
Forum: Python
Topic: Autorun, re-run, save message...
Replies: 6
Views: 894

Re: Autorun, re-run, save message...

1. Auto start could be done like in this https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=138196 or see #2 2. Use cron (instead of the #1) ...except that are you sure you want to run this script again or would you be better of looping&pausing in the script itself? Something like: ... import t...
by -rst-
Wed Mar 02, 2016 1:52 pm
Forum: Python
Topic: Python script on startup not working
Replies: 1
Views: 617

Re: Python script on startup not working

Maybe change the init script to redirect output to a file to see what is going on:

Code: Select all

  start)
    echo "Starting incidentalerts" > /home/pi/incidentalerts/alerts.log
    /usr/bin/python /home/pi/incidentalerts/checkmail.py >> /home/pi/incidentalerts/alerts.log 2>&1 &
    ;;
by -rst-
Wed Mar 02, 2016 12:48 pm
Forum: Python
Topic: Error in library
Replies: 4
Views: 549

Re: Error in library

Looks like the message received includes the Ctrl-C character (byte value 3) and printing that 'raw' into the output is handled like the user would hit Ctrl-C. You might want to output the read bytes differently instead of just printing them (on line 32).
by -rst-
Wed Mar 02, 2016 12:41 pm
Forum: Python
Topic: uinput help
Replies: 6
Views: 691

Re: uinput help

Well, it clearly says what the issue is "name 'device' is not defined" - you have not defined or imported the name 'device'. Looks to me you are missing the creation of the uinput.Device object: #!/usr/bin/python import uinput import sys my_key = str(sys.argv[0]) device = uinput.Device(...) device.e...
by -rst-
Tue Mar 01, 2016 5:31 pm
Forum: C/C++
Topic: Sending and receiving integers from Arduino (endian)
Replies: 4
Views: 1623

Re: Sending and receiving integers from Arduino (endian)

As far as I know, Arduino Serial.write(val) only sends one byte, so you are probably getting one byte to your array[0] and the rest is just garbage! Always good to initialise arrays to zero and check the read number of bytes: int cport_nr = 24, num; unsigned char buf[sizeof(int)]; memset(buf, 0, siz...
by -rst-
Tue Mar 01, 2016 4:03 pm
Forum: C/C++
Topic: Sending and receiving integers from Arduino (endian)
Replies: 4
Views: 1623

Re: Sending and receiving integers from Arduino (endian)

'Single byte' and 'endianness' does not compute, sorry :roll: Endianness refers to the order of the bytes, comprising a digital word... so a multi-byte 'word' would be represented differently but single bytes are not affected. To me what you write sounds like the bits in the single byte come in wron...
by -rst-
Tue Mar 01, 2016 1:21 pm
Forum: General programming discussion
Topic: Welcome home sounds with information Please Help
Replies: 1
Views: 440

Re: Welcome home sounds with information Please Help

Depends a lot on what the Crestron processor and/or the door lock unit can provide (if anything) for integration - links to datasheets?

Go to advanced search