Hi folks, this is a straight up call for a small programming job. In my laboratory we have two pieces of equipment that communicate through an improbably complex relay which includes a few obsolete pieces of expensive equipment from companies that no longer exist and a Mac desktop that only exists to receive a trigger signal and pass on a macro command to a PC. Yesterday the relay failed somewhere, and rather than troubleshoot that crap I would rather replace the whole relay with a Raspberry Pi. I need a short program, probably in Python, that can receive an analog hi/lo signal through the RasPi’s TTL input (I believe it’s 3.3v; I can do the wiring) and send a macro command to a PC through an ethernet cable. If you think you can knock this off fast for a reasonable rate, contact me at portusjacksonii at yahoo. First response takes it.
Chat about whatever!
cleek
NC GOP takes another hit:
Keith P.
You lost me at Python, unfortunately. (I lack the desire to learn it…these days I only want to code in C#/.Net)
Trollhattan
A post mentions (delicious) Raspberry Pi and lo, a Cleek sighting. Zounds.
Plenty of nerds here, Tim F. hopefully at least one who comprehends the above.I know what 3.3V means.
Roger Moore
@Keith P.:
I can’t speak for TimF, but I doubt he cares that much about the language you use; Python is just the in language to use for that kind of thing these days. It would probably be fine if you wanted to write it in csh, C#/Mono, or even Perl just as long as it sent the right signal at the right time.
Amanda in the South Bay
It’d be a great project if my day job wasn’t as a software engineer. It’s very hard to get myself to code in my spare time.
Mike J
It sounds like the sort of thing you could make from piecing together two Raspberry pi tutorials. If I had one laying around I’d take the 15 minutes it sounds like it would take.
What’s even easier is telling other people how easy something you don’t have time to do yourself should be.
eldorado
^^ plus python is pretty much the one mainstream language i never bothered with.
cleek
i’d gladly help, if i knew anything about Raspberry Pi.
Mike E
@cleek: the ruling sez no time to redraw maps for the upcoming election tho… Wake Co will revert to old school board and county commission maps after they were ruled discriminatory last week, so there’s a small victory
? Martin
I just asked my son. He’s currently running a camp doing Pi hardware/programming. Sounds like an easy job for him.
OzarkHillbilly
I can fix it. My framing hammer has been a little underused lately.
Matt McIrvin
@cleek: Now that’s interesting, because I think some degree of racial gerrymandering is actually required by the VRA to produce minority representation–and Republicans like that because it lets them pack Democrats into majority-minority districts. They have to be trying pretty hard to actually do a bad racial gerrymander.
Lee
@cleek: Same here. I’ve wanted to fiddle around with Raspberry Pi and have never gotten around to it.
BlueNC
@Matt McIrvin: Oh, trust me. This was a BAD racial gerrymander. Impressively bad.
Joel
I’ve always wondered if people could rescue those old Biocad FPLCs (with the integrated Windows 3.x computers) by replacing the electronics. One of the problems is all the damn serial connections. I know some Python but just to run some homebrew bioinformatics, nothing engineering-related.
catclub
@BlueNC: The most criminally stupid part of Roberts decision was ignoring the facts that Ruth Bader Ginsberg brought up in her dissent. All those states that were listed as requiring pre-clearance CONTINUED to be the worst states for illegal violation of voting rights. Not just in the 60’s and 70’s, but right up until yesterday. There was also a method to earn an opt out by ten years of good behavior, and they could not even do that.
Rudi
This might take care of everything.
https://www.openhomeautomation.net/control-a-relay-from-anywhere-using-the-raspberry-pi/
Roger Moore
@catclub:
I thought the worst part was ignoring the “The Congress shall have power to enforce this article by appropriate legislation” part of the 15th Amendment. They just decided to overturn the expressed will of a large supermajority of Congress, expressly authorized by the 15th Amendment because they disagreed with Congress’s decision. It’s the absolute worst kind of legislating from the bench.
Keith P.
@Lee: That’s next on my fiddler list. I just got acquainted with an Arduino, but stopped trying to program it as soon as I saw some source code for a program (it’s straight C and thus very ugly) I wanted to alter. Raspberry Pi intrigues me because it can run some flavor Windows (maybe NanoServer, which only takes up 500MB of disk), and programming tasks are significantly easier when they’re all in the same ecosystem.
dedc79
Tried running this post through Google Translate to no avail.
Frodo
@efgoldman:
Only the Monty version of Python does that.
les
I thought it was Raspberry Beret, but I’m old. I had a Fortran book once.
Bill Arnold
Haven’t ever played with a Raspberry Pi, sorry. Good luck; you should be able to find something online if your google-fu is adequate.
I’m currently investigating an irritating at-home “when machines attack” problem. All smoke and CO detectors in the house that were connected to the home wiring false-positived simultaneously, including one behind two successive closed doors, at least according to spouse. This also happened last weekend, twice. There are two models of detector (both first alert), one with discrete circuitry and one with what looks like a 28-pin microcontroller (can’t see top of it without destroying the unit). Perhaps spouse was wrong and the only the Fire/CO detectors (with microcontroller, probably some 8051 descendant) went off. The units are not AFAIK digitally connected in any way. The only connectivity is house wiring and perhaps house WI-FI (the detectors don’t do wi-fi – the designs are pre-“smart”-stuff). The heating is air-ducts. No flame in the house at all today – too hot, AC running. Deep (very very deep :-) paranoia: does anyone know of any false-positive triggering attacks that involve either (a) glitching power or (b) crafting wireless network traffic to interfere with microcontrollers?
Currently running with some random battery operated smoke/CO backup units.
Seanly
You’ve exceeded my FORTRAN knowledge (plus it’s been 30 years since I did any programming).
There are times when I think I should have gone into computers instead of civil engineering. It could have been me who owns the Washington Post or the SF 49ers…
Belafon
If you’d needed it about 6 months from now, my middle son could probably have done it. He’s jumped on doing things with Rasberry Pi where I couldn’t get him to get excited about a lot else. He set up one so that we could hook it up to one of our TVs and watch stuff we can stream from a browser. Yeah, you could do it with a computer, but we can leave the Pi box for just that purpose.
LAO
@srv: Not that it’s stopped you from returning again and again and again. ?
slag
Presumably, Tim, you won’t have a problem finding someone for this, but keep us updated.
Major Major Major Major
@Roger Moore: what do you mean, ‘even’ perl‽ Heresy.
I’d do it but I’m not familiar with the AV bindings on Python.
Raven Onthill
@Bill Arnold: You could have gotten a waft of something that triggered the detectors; might not be a false positive at all.
Belafon
@eldorado: One of the reasons I like python is that you can stick
#/bin/env python
at the top of a python file and turn it into your favorite Linux scripting language. Which means that I can use the same programming skills on multiple platforms for doing small tasks.
Mike J
@les:
Wat for?
@Major Major Major Major:
Do I have to wear my “perl is my bitch” t shirt?
grumpy realist
@Bill Arnold: Are you in a flight path near an airport? I’m in an alternate landing path to O’Hare and have noticed that when the planes are using it, the frequency of electronic glitches goes up.
Otherwise I’d chalk it up to a) Mercury being retrograde, or b) cosmic rays, depending on whichever makes you feel better.
jl
Down in the black bowels of the dark caverns of the GOP,, is a civil war boiling along?. I always thought a GOP crack up would be like a train wreck at one of those olde tymey state fairs. Would happen out in public, everyone would know the timing of the collision, could enjoy watching it on youtube, and go up and examine the smoking debris and hunks and chunks of boiler and cow catcher for themselves. But makes sense this kind of thing happens out of sight, and probably will only know for sure about a crack up months or even a year or more after it happens. If it does happen, I hope it does happen, but try not to get hopes up until I see conclusive evidence. Like a ton or so of busted pieces of political boiler lying all along the railroad tracks.
First the party was run by people who were not interested in governing, but more in staging political theatre to win elections. Now the primaries have been hijacked by the rabid base that GOP hacks cultivated, and that rabid base is more interested in being part of a political reality show than winning elections (which in politics, is a serious problem, but the base don’t care anymore).
Report: More Than 70 GOPers Sign Letter Urging RNC To Cut Off Funds To Trump
‘ Dozens of Republicans have signed an open letter urging Republican National Committee Chairman Reince Priebus …. the letter urges the RNC to shift resources to vulnerable congressional races in order to “prevent the GOP from drowning with a Trump-emblazoned anchor around its neck.” ‘
http://talkingpointsmemo.com/livewire/republicans-sign-letter-urging-rnc-to-cut-off-trump-funds
Major Major Major Major
read from serial port on raspberry pi
Then for sending anything over Ethernet… Well, if it’s HTTP I use requests
But, of course, at work. And I don’t own a raspberry pi or anything that even HAS serial ports.
jeffreyw
Mmm… that’s gonna be some fine apple pie, by Dog!
BroD
Um, what?!
I guess I’m not your guy, right?
schrodinger's cat
@jeffreyw: Awww that’s so sweet.
les
@Mike J:
1966, Freshman physics at Iowa State. Book only, no time in schedule for a course. We could write our little program (lab data analysis), take it to The Temple wherein resided the University computer (all one of it) (we were allowed only between the hours of midnight and 3 a.m.), and turn it in. Acolytes would punch cards, the priests would run and the next morning (same hours) mock us if it didn’t work.
catclub
Good news everybody! I saw this today at Time/Swampland
Democrats is disarray does not quite fit.
ETA: jl beat me to it
Miss Bianca
@jeffreyw: that little puppeh has Yoda eyes!
Roger Moore
@Bill Arnold:
IIRC, the behavior you’re describing is the way it’s supposed to work. Smoke detectors that are hard wired are supposed to have an extra wire that communicates between the units so they’ll all alarm at the same time; that way everyone in the house gets an alarm at the same time. Unfortunately, that applies to false alarms as well as real ones.
Keith P.
@Bill Arnold: low voltage lines can be interfered with by high voltage. I built a CNC machine last year, and it’s a definite issue, as the stepper lines run parallel to the controller lines. Additionally, it’s got a USB line that is very temperamental. Depending on whether it’s normally high or low, you can clean up the signal with a resistor or cap (google pull-up/pull-down)
Origuy
@les: Watfor (and Watfiv) were popular Fortran compilers from the University of Waterloo.
I did this sort of thing for the Developmental Psychophysiology Lab at Illinois back in the Dark Ages. This was on a PDP-11. The driver programs were in Fortran, but the device handling was in assembler. The researchers would hook up lab rats and Psych 100 students to monitors for their respiration and heart beats. Each heartbeat would cause a Schmitt trigger in a A/D interface to fire, causing an interrupt. The PDP-11 had 16MB of core memory (look it up, kids!) and filled most of a six-foot high rack. The A/D interface device was even bigger.
Prescott Cactus
@Bill Arnold: Try going over each device with either a vacuum cleaner attachment or a leaf blower. This will remove any accumulated dust or lint.
Long shot, but…
catclub
@Belafon: Could you explain this more? Does it mean I could put a bash script below that top line
and then run it on a windows computer? Does python include various languages as subsets?
Bill Arnold
@Raven Onthill:
I suppose this is possible. Live in country though, with houses pretty far apart, and did not smell anything or feel any effects any of the 3 times it happened. AC sucks air from main floor of house and cools then circulates it. I didn’t find anything confirmed on coolant leaks causing CO detector FPs though, and as I said no flame in house today.
Roger Moore
@Major Major Major Major:
I was trying to project the opinion of somebody who would ask for it to be done in Python. I’m JAPH.
les
@Origuy:
Huh, didn’t even know. Probably why my work actually got done with pencil, paper and slide rule–letting us use The Computer was a treat, donchaknow.
Bill Arnold
@grumpy realist:
Oooh. Yes, under an occasional flight path for a regional airport that sometimes deals with large jets including jumbo military transports (and Air Force One, at least once in the last several years). Planes can be as little as 2000 feet up (estimated), usually higher though. “Glitch” is an unsatisfactory explanation though, since with sufficient care and expertise glitches can be reliably replicated. The development I’m in has quite a few houses built by the same developer and probably using the same detectors; will ask around. (Hypothetical power glitches with causal powers could hit the whole neighborhood as well, I suppose?)
Keith P.
@Major Major Major Major: It’s probably UDP, but it’s about as easy to send UDP packets with all the libraries available.
EDIT: On second thought, it’s a Pi, so it may be HTTP. Just for hardware comms, I usually see UDP.
Mike in NC
I worked with COBOL 25 years ago. Get off my lawn with your fancy coding!
Bill Arnold
@efgoldman:
Related thoughts, cross the mind they did.
Mike J
@les:
U of Waterloo wrote the most widely used Fortran compilers. When I was in school, the intro programming class was Fortran IV with WATFOR and WATFIV compilers. “Wat for” was a joke.
les
@Mike J:
Yeah, Origuy already noticed I didn’t get it. At the time, I didn’t know what a compiler was. At least we didn’t wear our slide rules on our belts like the engineering geeks. We wore sweatshirts with Maxwell’s Equations.
Amir Khalid
@jeffreyw:
Gabe’s curiosity about the pie is sooo adorable. Squee!
Juju
@Mike in NC: COBAL is a nice color blue as far as I’m concerned.
waysel
@Bill Arnold: Roger Moore is right, they are supposed to all go off together. They would be wired with 3 wire w/ ground. They should each have a ‘test’ button which may reveal something. I assume one unit could have a failing component that could cause the problems you are having. Also:
To determine which Smoke Alarm initiated an alarm:
During an Alarm:
On Initiating Alarm(s) Red LED(s) flashes (flash) rapidly.
On All Other Alarms the Red LED is Off.
After an Alarm (If Latching Feature is present): On Initiating Alarm(s) Green LED(s) On for 2 seconds/Off for 2 seconds
On All Other Alarms Green LED(s) On, Red LED(s) is Off
From :
Uncle Cosmo
@srv: FUCK OFF & DIE, SHITSTAIN!
mapaghimagsik
sent an email. I’m a noid.
waysel
@Bill Arnold: @waysel: @waysel: From:http://www.brkelectronics.com/faqs/diy/how_do_i_install_hardwired_brk_alarms. I can’t get the knack of this link business.
Calming Influence
In my day, if we couldn’t get a grad student to replace an obsolete piece of expensive equipment, we’d have been ashamed to call ourselves scientists!
Bill Arnold
@Roger Moore:
@waysel:
Ah, very good, thank you!!! There are definitely 3 wires at the connectors for the units and one is orange. So I could test this with a deliberate sort-of-false positive. And there was clearly at least one CO false positive if this was what happened. Still no explanation for that yet, but a single-unit glitch is more parsimonious. Also, that would explain why two units that are supplied by a different junction box (MiL apartment) did not go off (according to spouse).
tybee
@jeffreyw: nice shoes, too.
Eric U.
I have had the webpage for webOPI open for the last few months. Written in python for the raspi, it can drive the hardware ports. Would definitely help getting started with this.
I got too much going on right now to do my own projects, much less an outside project.
Aardvark Cheeselog
@Origuy:
I bet we were at U of I at around the same time… late ’70s-early ’80s?
Motivated Seller
@Bill Arnold: Same problem happens to me. We rewired the house 4 years ago and once every couple of months the whole system would go off, usually around 3am-ish. Drives us crazy.
Disconnect the individual units from the house supply and allow them to function by battery only. Then play the waiting game. Eventually you should be able to isolate which unit is setting off the others. Then switch it with a working replacement. (Make sure you mark the units with tape or sharpie.)
A better alternative is to cut your losses and pay a certified fire-alarm contractor to install a new system.