Go to advanced search

by PeterO
Fri Feb 15, 2019 2:17 pm
Forum: The MagPi
Topic: Surprised to see you promoting W10
Replies: 5
Views: 147

Surprised to see you promoting W10

https://www.raspberrypi.org/magpi/windo ... pberry-pi/

Really ? Considering that threads here on the subject are being locked due to legal uncertainties should you be promoting it ?

PeterO
by PeterO
Fri Feb 15, 2019 9:37 am
Forum: C/C++
Topic: GCC Shared Library Behaving Oddly
Replies: 3
Views: 81

Re: GCC Shared Library Behaving Oddly

Try

Code: Select all

gcc -o simple simple.c -I/opt/vc/include -L/opt/vc/lib -lbcm_host
PeterO
by PeterO
Thu Feb 14, 2019 5:45 pm
Forum: General discussion
Topic: [Suggestion]Don't quote long posts in your answers
Replies: 12
Views: 267

Re: [Suggestion]Don't quote long posts in your answers

fruitoftheloom wrote:
Thu Feb 14, 2019 5:36 pm
If one does not quote the whole post then that poster can alter the post one is responding to making the response irrelevant.
:roll:
Just because you aren't paranoid etc etc etc... :lol:
PeterO
by PeterO
Thu Feb 14, 2019 12:31 pm
Forum: Python
Topic: Need help for use Python with QT or GTK
Replies: 7
Views: 96

Re: Need seggations for use Python with QT or GTK

Using Python with GTK+ is covered here : https://python-gtk-3-tutorial.readthedocs.io/en/latest/index.html PeterO Thanks for reply, Did you worked on both , Have you any expample source and visual pics What do you mean by "Both" ? There is a small example on http://www.peteronion.org.uk/PyGobjectGt...
by PeterO
Thu Feb 14, 2019 10:33 am
Forum: General discussion
Topic: kill a pygame app?
Replies: 2
Views: 61

Re: kill a pygame app?

I've discovered I can use htop and sent SIGTRAP, that kills it off. I'm not at all sure what Trap does but it seems to do the job. Is there anyway to send this via the command line? man kill KILL(1) User Commands KILL(1) NAME kill - send a signal to a process SYNOPSIS kill [options] <pid> [...] DES...
by PeterO
Thu Feb 14, 2019 10:29 am
Forum: Python
Topic: Need help for use Python with QT or GTK
Replies: 7
Views: 96

Re: Need seggations for use Python with QT or GTK

Using Python with GTK+ is covered here : https://python-gtk-3-tutorial.readthedo ... index.html

PeterO
by PeterO
Wed Feb 13, 2019 4:28 pm
Forum: General discussion
Topic: Windows 10
Replies: 8
Views: 317

Re: Windows 10

code_exec wrote:
Wed Feb 13, 2019 4:21 pm
wildfire wrote:
Wed Feb 13, 2019 4:18 pm
Tom's HW guide also said the Zero and it's siblings had 512GB memory :?:
512MB, not 512GB.
:lol: :lol: :lol: :lol:
You've missed the point !
PeterO
by PeterO
Wed Feb 13, 2019 3:58 pm
Forum: General discussion
Topic: Windows 10
Replies: 8
Views: 317

Re: Windows 10

liderbug wrote:
Wed Feb 13, 2019 3:54 pm
Tom's HW has a post "You Can Now Run Windows 10 on the Raspberry Pi 3". OK. I don't know why you would want to but whatever... :roll:
Why don't you look at recent posts before posting the same news for the third time today ?
PeterO
by PeterO
Wed Feb 13, 2019 2:12 pm
Forum: Python
Topic: keep TCP socket server running?
Replies: 5
Views: 89

Re: keep TCP socket server running?

@rolgordijn: once a socket has been closed, youcan't reopen it. So move these three lines into the while loop and you should be good: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind((TCP_IP, TCP_PORT)) s.listen(1) Regards Aydan NO that's not right,. The listening socket shouldn't be cl...
by PeterO
Wed Feb 13, 2019 2:03 pm
Forum: General discussion
Topic: full windows 10 64bit on ARM
Replies: 4
Views: 231

Re: full windows 10 64bit on ARM

Unless this is different to https://www.raspberrypi.org/forums/view ... 2&t=233499 expect this to get locked .
PeterO
by PeterO
Wed Feb 13, 2019 1:02 pm
Forum: Beginners
Topic: Pi not connecting to internet when plugged directly into Ethernet
Replies: 6
Views: 99

Re: Pi not connecting to internet when plugged directly into Ethernet

What make/model are you modem and router ?
PeterO
by PeterO
Wed Feb 13, 2019 11:24 am
Forum: General discussion
Topic: Pi to Pi python communication
Replies: 10
Views: 243

Re: Pi to Pi python communication

hippy wrote:
Wed Feb 13, 2019 11:09 am
A typical process for any development is; get it working, ship it, forget about the rest.
Fixed it for you :-)
PeterO
by PeterO
Wed Feb 13, 2019 9:42 am
Forum: C/C++
Topic: [C] compatibility data types 32-64 bit?
Replies: 17
Views: 258

Re: [C] compatibility data types 32-64 bit?

So now I'm sat in front of a PI !

Code: Select all

pi@raspberrypi:~ $ gcc -m32 -o test test.c
gcc: error: unrecognized command line option ‘-m32’
pi@raspberrypi:~ $ 
One solution is to include stdint.h and use the explicit sized types such as int32_t in your code.
PeterO
by PeterO
Wed Feb 13, 2019 9:29 am
Forum: C/C++
Topic: [C] compatibility data types 32-64 bit?
Replies: 17
Views: 258

Re: [C] compatibility data types 32-64 bit?

Looking at https://gcc.gnu.org/onlinedocs/gcc/Opti ... p_letter-M it's not clearr that -m32 is even a valid switch on ARM architectures.

Easiest thing to do is give it a try and see what "sizeof" returns for various C types.

PeterO
by PeterO
Tue Feb 12, 2019 9:34 am
Forum: Troubleshooting
Topic: Do we have a way to invert the logic of the GPIO serial port?
Replies: 10
Views: 240

Re: Do we have a way to invert the logic of the GPIO serial port?

...... The GPIO uses negative logic... No..... On the RPi the UART data stream: A logic level 1 (High) is 3V3 A logic level 0 (Low) is 0V Start bit is Low. Idle is High. Idle is high so that a disconnected plug/socket or a break in the circuit (which would cause a long period of low) can be more ea...
by PeterO
Tue Feb 12, 2019 9:28 am
Forum: Python
Topic: keep TCP socket server running?
Replies: 5
Views: 89

Re: keep TCP socket server running?

Look at the examples in the python documentation, they do what you want .... https://docs.python.org/3/library/socket.html Examples are that the bottom of the page. PeterO # Echo server program import socket HOST = '' # Symbolic name meaning all available interfaces PORT = 50007 # Arbitrary non-priv...
by PeterO
Mon Feb 11, 2019 10:01 pm
Forum: Troubleshooting
Topic: Do we have a way to invert the logic of the GPIO serial port?
Replies: 10
Views: 240

Re: Do we have a way to invert the logic of the GPIO serial port?

rin67630 wrote:
Mon Feb 11, 2019 9:52 pm
My device outputs the signal in positive logic.
It's normal to provide TX and RX inverted as the "industry standard" line driver chips expect inverted logic level signals to produce the correct line level signals.

TBH it is your design that is the problem here !

PeterO
by PeterO
Thu Feb 07, 2019 11:18 am
Forum: General discussion
Topic: We've opened a shop!
Replies: 61
Views: 1857

Re: We've opened a shop!

by PeterO
Thu Feb 07, 2019 8:45 am
Forum: Beginners
Topic: Is 5V 1A enough for Raspberry Pi 3 B+
Replies: 9
Views: 277

Re: Is 5V 1A enough for Raspberry Pi 3 B+

Potentially. It depends on your "power supply" and the connected cable. Please STOP trying to give advice about things you don't understand. PeterO What advice us there in "potentially"? I stated it's possible, nothing more. Yes, I've misworded some of my replies in the past. I'm more careful with ...
by PeterO
Wed Feb 06, 2019 1:35 pm
Forum: Raspbian
Topic: New HELP ideas
Replies: 18
Views: 445

Re: New HELP ideas

rpdom wrote:
Wed Feb 06, 2019 1:33 pm
hippy wrote:
Wed Feb 06, 2019 1:04 pm
Only with respect to the "be good to each other" rule
and Party on dude! ;-)
The Bill & Ted quote is "Be excellent to each other".
PeterO
by PeterO
Tue Feb 05, 2019 9:03 am
Forum: Raspbian
Topic: New HELP ideas
Replies: 18
Views: 445

Re: New HELP ideas

Kirk Fraser wrote:
Mon Feb 04, 2019 9:47 pm
Raspbian is hard to learn and use for any applications.
In your opinion :lol:
PeterO
by PeterO
Mon Feb 04, 2019 9:20 pm
Forum: HATs and other add-ons
Topic: Official Raspberry Pi power supply -- adding power switch
Replies: 8
Views: 720

Re: Official Raspberry Pi power supply -- adding power switch

In my case the PI is headless. Only connections are PSU,Ethernet and Audio to HiFi from 12S DAC, so no route to back power via HDMI.

PeterO
by PeterO
Mon Feb 04, 2019 6:25 pm
Forum: HATs and other add-ons
Topic: Official Raspberry Pi power supply -- adding power switch
Replies: 8
Views: 720

Re: Official Raspberry Pi power supply -- adding power switch

I have seen the same thing happen on the PI that I use as a media player though it doesn't have the official PSU. I think it is due to a small A.C. current flowing through the switch due to capacitance between the open switch contacts. This current is enough to slowly charge the high voltage DC capa...
by PeterO
Mon Feb 04, 2019 5:32 pm
Forum: Python
Topic: How to import Date & Time
Replies: 3
Views: 161

Re: How to import Date & Time

I would like to import date & time from the RPI and convert it to a digital code. How can i import the date & time with python and where can i find the data in the system? How is it saved in the system (string-hex-binary)? thks Be aware that when talking about python the word "import" has a very sp...
by PeterO
Mon Feb 04, 2019 12:11 pm
Forum: C/C++
Topic: xWindow on Pi Segmentation fault
Replies: 4
Views: 132

Re: xWindow on Pi Segmentation fault

It's a missing font problem My Mint-19 has "10x20" installed.. $ xlsfonts | grep 10x 10x20 $ But Raspbian does not ! Try using 6x13.. fontinfo = XLoadQueryFont(display, "6x13"); Oh, and you really ought to be checking return values from Xlib calls. Checking the return value from XLoadQueryFont() wou...

Go to advanced search