Go to advanced search

by MarkTF
Tue Jun 09, 2015 8:54 pm
Forum: Python
Topic: Best approach - waiting in Python
Replies: 9
Views: 7197

Re: Best approach - waiting in Python

time.sleep is a blocking function meaning that nothing else can happen until time.sleep completes. To be clear, time.sleep will block the python thread, but it doesn't take significant CPU cycles from any other processes that may be running. The python script will be unresponsive until its nap is o...
by MarkTF
Fri Jun 05, 2015 12:54 pm
Forum: Python
Topic: Very simple GUI for monitoring system
Replies: 10
Views: 4911

Re: Very simple GUI for monitoring system

The issue, as I understand it, is that "line = ser.readline()" is blocking, that is, the program will sit there waiting for an end-of-line character to be received over the serial port before continuing code execution. Thus if the data link drops out or the transmitter side isn't running, the GUI ha...
by MarkTF
Fri Jun 05, 2015 3:13 am
Forum: Python
Topic: Very simple GUI for monitoring system
Replies: 10
Views: 4911

Re: Very simple GUI for monitoring system

SandMan874, I'm just trying to learn Python GUI programming myself, but here's a rough (partial) cut at your GUI with serial interface. This is based off the recipe I found here: http://code.activestate.com/recipes/82965-threads-tkinter-and-asynchronous-io/ For compactness I've only implemented two ...
by MarkTF
Fri May 22, 2015 6:40 pm
Forum: General discussion
Topic: What is the best way to send data from one Pi to another?
Replies: 27
Views: 8165

Re: What is the best way to send data from one Pi to another

For what it's worth, I did essentially this in a bash script that periodically reads the time and temperature, logs that data to a file, and uses "scp" to transfer the file to a remote computer. It required setting up ssh keys on both machines, but it's only a few lines of code. If one needs the ser...
by MarkTF
Tue May 19, 2015 2:18 pm
Forum: Python
Topic: Problem with Python script
Replies: 3
Views: 560

Re: Problem with Python script

"ghp" has given good advice, but it's worth noting that in the original post code if "while lines[0].strip()[-3:] != 'YES':" statement is not true you will skip over the sleep statement. Since that is the typical case, you get the rapid on/off cycles you've observed.
by MarkTF
Tue May 19, 2015 1:55 pm
Forum: General discussion
Topic: Removing ports from the Pi
Replies: 7
Views: 1413

Re: Removing ports from the Pi

It is possible, but it is not a trivial task. Removing through hole components with a lot of pins (e.g. the GPIO header) is something that makes even very experienced technicians nervous as there is always a risk of damaging the printed circuit board. Having the right tools is a necessity, that is a...
by MarkTF
Wed May 13, 2015 4:44 am
Forum: Python
Topic: Performance increase on pi2
Replies: 9
Views: 1647

Re: Performance increase on pi2

One thing to keep in mind is that Python is single threaded, unless the code explicitly creates multiple threads, hence only one of the four CPU cores will be executing the code. If your application is CPU limited then you should see some performance increase from the faster/more advanced core (nomi...
by MarkTF
Tue May 05, 2015 2:12 pm
Forum: General discussion
Topic: GoPro
Replies: 5
Views: 809

Re: GoPro

I understand that hobbyists sometimes build stuff simply "because they can", but I'm having difficulty understanding why one wouldn't just buy a suitable tablet computer for this application. Generally one can get higher spec memory and processing power and a reasonable range of software selections ...
by MarkTF
Tue Apr 28, 2015 5:57 pm
Forum: Python
Topic: Autonomous boat: Auto compensate the rudder?
Replies: 19
Views: 1677

Re: Autonomous boat: Auto compensate the rudder?

You might want to read through this and reconsider Massi's offering: http://en.wikipedia.org/wiki/PID_controller
by MarkTF
Sat Apr 25, 2015 3:17 pm
Forum: General discussion
Topic: multiple precise outputs with the rpi
Replies: 10
Views: 1624

Re: multiple precise outputs with the rpi

The BeagleBone Black has a couple embedded programmable real-time units (essentially fast microcontrollers with direct access to I/O along with the ARM processor) and is more suited to bit banging I/O quickly and precisely than the RPi. There may be other options, but the RPi doesn't sound like the ...
by MarkTF
Fri Apr 24, 2015 11:45 am
Forum: General discussion
Topic: Satellite Ideas!
Replies: 3
Views: 589

Re: Satellite Ideas!

I don't wish to discourage you, but whatever your mission requirements, the implementation has to fit within the platform constraints of size, weight, and power. The latter is a big concern. See for instance: http://www.control.auc.dk/~raf/Aerospace/CUBESAT.pdf To directly address your question, som...
by MarkTF
Thu Apr 23, 2015 2:27 pm
Forum: General discussion
Topic: booting only from USB - in future - (USB-on-the-go)
Replies: 45
Views: 8692

Re: booting only from USB - in future - (USB-on-the-go)

Anyway, have you considered using a board that actually *is* able to boot from USB, like a Beaglebone Black? I have a BBB, but I didn't know it could boot from USB. Note that it has on-board flash/NAND, and is setup to boot from that. Are you sure that's not what you are thinking of? According to v...
by MarkTF
Wed Apr 22, 2015 4:13 pm
Forum: General discussion
Topic: Electric Shock
Replies: 15
Views: 3026

Re: Electric Shock

Definitely not normal. Disconnect everything but the power supply and see if you still have the problem. If you're still getting shocks then replace the power supply. If not, then reconnect things one at a time until you find the item that's causing the problem. I did what you said and it worked th...
by MarkTF
Wed Apr 22, 2015 3:50 pm
Forum: Python
Topic: Manipulating the display without pygame
Replies: 1
Views: 376

Re: Manipulating the display without pygame

I'm not certain I understand the question, but "Tkinter" might be the answer.

https://wiki.python.org/moin/TkInter
by MarkTF
Tue Apr 21, 2015 9:43 pm
Forum: Python
Topic: Script fails after some hours
Replies: 8
Views: 1209

Re: Script fails after some hours

If your "requests.post" statement fails for whatever reason, you'll get an unhandled exception and the program will terminate. You might try putting that statement inside a "try / except".
by MarkTF
Tue Apr 21, 2015 9:29 pm
Forum: General discussion
Topic: Electric Shock
Replies: 15
Views: 3026

Re: Electric Shock

The highest voltage on the Pi is 5 volts which isn't enough to give the sensation of a shock. My guess is that your AC power outlet (or whatever you're using to convert house power to microUSB) is wired incorrectly and the side that should be earth is the hot side and this is putting high voltage AC...
by MarkTF
Tue Apr 21, 2015 2:28 pm
Forum: General discussion
Topic: How to solve the Wine problem?
Replies: 16
Views: 2803

Re: How to solve the Wine problem?

Wine makes the software think it is running under a Windows operating system. You also need something to make Wine think it is running on an x86 architecture processor rather than the ARM processor that it is in fact running on. QEMU does this and there are people who have tried to get Wine/qemu wor...
by MarkTF
Fri Mar 13, 2015 4:32 pm
Forum: General discussion
Topic: The Future of the Pi A series
Replies: 65
Views: 9245

Re: The Future of the Pi A series

What is IMO missing for stuff that A is targeted for is better power management at runtime - i.e. allow suspend to ram or sleep while idle so it lasts days/weeks sleeping and can be resumed in microseconds. This is how e.g. smart phones work yes, I'm a little surprised that didn't come with the A+ ...
by MarkTF
Tue Mar 10, 2015 3:40 pm
Forum: General discussion
Topic: Does the Raspberry Pi work in a Vacuum?
Replies: 60
Views: 8287

Re: Does the Raspberry Pi work in a Vacuum?

Very interesting, so peltier is out of the question, so how would you guys recommend doing it? What setup would you use? Without better definition of a specific application environment, I don't think one can propose a general solution. The initial thread question was "Will the RPi work in a vacuum?...
by MarkTF
Mon Mar 09, 2015 8:35 pm
Forum: General discussion
Topic: Does the Raspberry Pi work in a Vacuum?
Replies: 60
Views: 8287

Re: Does the Raspberry Pi work in a Vacuum?

Just a question on the cooling... Couldn't you use a heatsink and a peltier unit? Just out of interest. The amount of power that can be radiated in free space goes as the 4th power of the radiator's temperature, so there might be some merit to using a Peltier unit in some application, even at the e...
by MarkTF
Tue Mar 03, 2015 5:50 pm
Forum: General discussion
Topic: Does the Raspberry Pi work in a Vacuum?
Replies: 60
Views: 8287

Re: Does the Raspberry Pi work in a Vacuum?

You cannot count on radiative cooling of electronics in a hard vacuum. At 85C the RPi's SoC radiates just 145mW, and gets 65mW back from the walls of the vacuum chamber (at 20C). Compare that with 300-600mW power consumption. In order to shed 600mW the chip must reach 250C! A conductive path is nee...

Go to advanced search