Go to advanced search

by PeterO
Mon Aug 20, 2018 10:09 pm
Forum: Python
Topic: Help a brother understand this Python code
Replies: 2
Views: 40

Re: Help a brother understand this Python code

<< and >> do the same in Python as they do in C.

https://wiki.python.org/moin/BitwiseOperators

PeterO
by PeterO
Mon Aug 20, 2018 4:29 pm
Forum: C/C++
Topic: Problem while accessing /dev/mem
Replies: 4
Views: 90

Re: Problem while accessing /dev/mem

Or use /dev/gpiomem which doesn't need root permissions.

PeterO
by PeterO
Fri Aug 17, 2018 3:21 pm
Forum: Beginners
Topic: Shutdown command after Button press
Replies: 5
Views: 112

Re: Shutdown command after Button press

davidcoton wrote:
Fri Aug 17, 2018 2:06 pm
FTFY (because I couldn't parse it first time).
You should have seen it before I fixed (some of) the typos. My "space bar thumbs" are often a bit to quick !
PeterO
by PeterO
Fri Aug 17, 2018 1:26 pm
Forum: Beginners
Topic: Shutdown command after Button press
Replies: 5
Views: 112

Re: Shutdown command after Button press

It looks like OP thinks gpiozero can only be used on a PiZero ! Which is understandable and shows the poor choice of library names !

PeterO
by PeterO
Fri Aug 17, 2018 6:53 am
Forum: Beginners
Topic: Cpu load test linux -how busy is the cpu - test methods & tools
Replies: 2
Views: 82

Re: Cpu load test linux -how busy is the cpu - test methods & tools

If you want to get information about CPU usage, glibtop provides an API that returns one of these: struct glibtop_cpu { guint64 flags; guint64 total; /* GLIBTOP_CPU_TOTAL */ guint64 user; /* GLIBTOP_CPU_USER */ guint64 nice; /* GLIBTOP_CPU_NICE */ guint64 sys; /* GLIBTOP_CPU_SYS */ guint64 idle; /* ...
by PeterO
Mon Aug 13, 2018 7:00 pm
Forum: General discussion
Topic: (Solved)Which models of USB HDD work when connected directly to the PI?
Replies: 14
Views: 435

Re: Which models of USB HDD work when connected directly to the PI?

I have various models of Seagate 2.5" drives sold as external backup drives that work fine.
PeterO
by PeterO
Sun Aug 12, 2018 10:35 am
Forum: General discussion
Topic: (Solved) Is using a non powered USB HDD possible with a Pi3B+ ?
Replies: 21
Views: 538

Re: Is using a non powered USB HDD possible with a Pi3B+ ?

How about I rephrase it as "can I buy a USB HDD off the shelf and be able to run it off a Pi with no issue of power problems using only an official Raspberry Pi Power Supply connected to my Pi?" You can rephrase it how ever you like, it won't make any difference to the answers you get. If the answe...
by PeterO
Fri Aug 10, 2018 6:17 am
Forum: Off topic discussion
Topic: Any NAS chassis reccomendations ?
Replies: 6
Views: 251

Re: Any NAS chassis reccomendations ?

Thanks for all the ideas.

PeterO
by PeterO
Thu Aug 09, 2018 9:30 pm
Forum: Python
Topic: python code - which editor?
Replies: 8
Views: 221

Re: python code

Thonny is much nicer than IDLE (which looks rather old and clunky these days).
PeterO
by PeterO
Thu Aug 09, 2018 1:41 pm
Forum: Off topic discussion
Topic: Any NAS chassis reccomendations ?
Replies: 6
Views: 251

Any NAS chassis reccomendations ?

Any suggestions on a NAS chassis that will take a couple of 1Tb 3.5" SATA drives that I have spare ? Must support wired ethernet, NFS and preferably ext4 on the drives.

PeterO
by PeterO
Tue Aug 07, 2018 3:45 pm
Forum: Teaching and learning resources
Topic: Can RPi by taught in Microprocessor Interfacing Course?
Replies: 11
Views: 365

Re: Can RPi by taught in Microprocessor Interfacing Course?

I have been teaching microprocessor interfacing course to undergraduate students of computer engineering for few years. Generally we teach them about internal architecture of a microcontroller, its busses and addressing modes, followed by timers, interrupts, serial communication, ADC, PWM, motor co...
by PeterO
Mon Aug 06, 2018 12:51 pm
Forum: Graphics programming
Topic: PySimpleGUI - New package for building custom GUIs in a few lines of code
Replies: 23
Views: 997

Re: PySimpleGUI - New package for building custom GUIs in a few lines of code

Who remembers gtkIOStream ? Another wrapper that was supposed to make things easier, but that no one other than the author ever used.
PeterO
by PeterO
Sun Aug 05, 2018 8:41 am
Forum: C/C++
Topic: Errors when trying to compile simple program
Replies: 8
Views: 275

Re: Errors when trying to compile simple program

OP,

IN test.h try changing "#include "BrickPi3.cpp" to "#include "BrickPi3.h"

PeterO
by PeterO
Sun Aug 05, 2018 8:36 am
Forum: C/C++
Topic: Errors when trying to compile simple program
Replies: 8
Views: 275

Re: Errors when trying to compile simple program

fbe wrote:
Sun Aug 05, 2018 7:52 am
Did you notice, that g++ complains about seeing everything twice, what is in BrickPi3.cpp?
Brick.cpp is in the same place that you read the error listing.
PeterO
by PeterO
Sat Aug 04, 2018 6:11 pm
Forum: Troubleshooting
Topic: MOSFET switch is leaking current when off
Replies: 15
Views: 365

Re: MOSFET switch is leaking current when off

To avoid this connect the disconnected transistors gate to a GPIO ground pin Perhaps I'm misunderstanding what was said above, but isn't that what the pull-down resistor doing? AKA - connecting the gate to ground when not actively being set to high? Do you know how much voltage the OP's circuit get...
by PeterO
Sat Aug 04, 2018 10:03 am
Forum: Troubleshooting
Topic: MOSFET switch is leaking current when off
Replies: 15
Views: 365

Re: MOSFET switch is leaking current when off

Burngate wrote:
Sat Aug 04, 2018 10:00 am
Sorry, PeterO. I wasn't clear enough. Edited my post accordingly.
I would still suggest grounding the gate especially if the lead to the GPIO is "long" (whatever that means :D ).
PeterO
by PeterO
Sat Aug 04, 2018 9:33 am
Forum: Troubleshooting
Topic: MOSFET switch is leaking current when off
Replies: 15
Views: 365

Re: MOSFET switch is leaking current when off

On the "faulty" circuits, disconnect the GPIO. If that cures the flickering, it's a Pi problem. If it doesn't, it's your problem. MOSFET gates are high impedance, so just disconnecting them from the GPIO may mean picked up noise (such as mains hum) will turn the transistor on enough to let the led ...
by PeterO
Sat Aug 04, 2018 8:45 am
Forum: Beginners
Topic: Executing a .o file at reboot
Replies: 13
Views: 384

Re: Executing a .o file at reboot

Normally you would first compile the .cpp files into object files with something like g++ a.cpp -o a.o g++ b.cpp -o b.o g++ c.cpp -o c.o g++ main.cpp -o main.o Then link them together with something like: g++ main.o a.o b.o c.o -lwiringPi -lpthread -lcurl -o myprog so you can then run the applicati...
by PeterO
Fri Aug 03, 2018 1:42 pm
Forum: Beginners
Topic: Executing a .o file at reboot
Replies: 13
Views: 384

Re: Executing a .o file at reboot

It would cause less confusion if you didn't call your linked executable file "a.o" The extension ".o" is used for object files, which contain the compiler output but which have not been linked with other the othre ".o" files from the project and the appropriate libraries (normaly ".so" files but som...
by PeterO
Fri Aug 03, 2018 6:41 am
Forum: Graphics programming
Topic: Pix Gtk3 errors
Replies: 1
Views: 64

Re: Pix Gtk3 errors

All you've posted "It doesn't work, help me!".

We will need at least a hint about the actual errors and which part of your code does produces them.

In these cases it is helpful to try and produce a minimal example that shows the problem.

PeterO
by PeterO
Thu Aug 02, 2018 6:32 pm
Forum: General discussion
Topic: Backup Without Copying the Entire Card
Replies: 6
Views: 333

Re: Backup Without Copying the Entire Card

The above method will attempt to back up a live root filesystem. While there is a minor risk that one or two files will change as they are backed up, rsync does a good job of coping and the changes are usually restricted to log files which don't affect the usefulness of the backup. Unless the purpo...
by PeterO
Thu Aug 02, 2018 10:46 am
Forum: Beginners
Topic: Wifi ad-hoc setup raspbian
Replies: 11
Views: 19342

Re: How to configure Raspberry pi zero w Mesh network

DirkS wrote:
Thu Aug 02, 2018 9:27 am
So why is the same, older topic solved?
viewtopic.php?f=28&t=219176&p=1346201#p1346201
"topic does not exist" .....
PeterO
by PeterO
Thu Aug 02, 2018 6:37 am
Forum: General discussion
Topic: Unpleasant new board smell ?
Replies: 67
Views: 7183

Re: Unpleasant new board smell ?

Jamesh,
Have you asked "The PiHut" (who are quite local) if they have had any smelly boards returned ?
PeterO
by PeterO
Wed Aug 01, 2018 3:37 pm
Forum: Raspbian
Topic: Unexpected feature interaction (dhcp and auto login)
Replies: 4
Views: 191

Re: Unexpected feature interaction (dhcp and auto login)

Did you configure your DNS server correctly? Does resolving name to address and address to name work? It is clearly a name lookup problem. Check your log files. Give more details, which DNS server? Errors in .xsession-errors? Actualy I did find a misconfiguration in the reverse DNS table, but that ...

Go to advanced search