[Tutor] Seismometer alarm Python

Alan Gauld alan.gauld at btinternet.com
Sat Jan 3 19:46:57 CET 2015


On 03/01/15 17:06, Ted wrote:
> Hi Folks,  I have a small python code to write.  It has at least three parts, 1,2 and 3.
> I think I have 1 and 3 working.
>
> I do not know how this Tutor at python.org works,

You post questions, the rest of us try to answer them.

Please supply Python version, OS and the full text of any errors.

Also, if the code is short(<100lines?), include it in your post.
If it's longer put it on a pastebin - but be aware you may get
fewer responses to long listings.
Better to  create a shorter example and post that.

Please post in plain text not HTML since Python relies on indentation 
and HTML strips the spacing out making it impossible to read.

And please don't top-post since it annoys some members... and
also because it makes it harder to follow discussions.

We cover anything to do with the Python language and its
standard library, and we can usually take a stab at SciPy/NumPy
and the standard web frameworks (Flask, Django etc) although
there are dedicated fora for discussing these.

> Basically, I am receiving a list of numbers (int)? on a serial port in python.
> I want to add a trigger, which will play an alarm file on the computer
 > when these numbers reach a certain condition.

OK, that's a good overview.
Now, which part of it are you struggling with?
- Reading the data from the serial port or
- Using the data to trigger the alarm? or
- Playing the alarm file?


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list