Author Topic: Fettled any computer stuff today?  (Read 217415 times)

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #575 on: 17 May, 2016, 10:52:56 pm »
The I2C board has a good rep at Makerspace. seems to behave nicely for modest loads and give a robust behaviour (unlike PWM direct from the Pi)

Yeah, it appears to do what it says on the tin.

Trying to do anything timing-critical[1] on a Pi is asking for trouble.  That's what microcontrollers and/or application-specific driver chips hanging off serial busses are for.  (Last week's project was a board to off-load the grunt work of driving 8 channels of stepper motors.)  I believe the Pi has hardware PWM on one pin, but a single channel isn't usually going to get you very far, so I haven't investigated.  The Pi's GPIO pins are best kept for slow and not particularly time critical things like user interface blinkenlights and polling the fire alarm a couple of times per second to see if it's going off.


[1] Other than those for which kernel modules exist, such as 1-wire, PPS and LIRC.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Fettled any computer stuff today?
« Reply #576 on: 17 May, 2016, 10:55:31 pm »
And even then it can be suddenly swapped out for a bit. For anything timing critical, offboard it with a suitably robust communications protocol. Pi are nice but very misapplied. (I'm building the 'see like a bat' project and it makes n^2 more sense to use an arduino for it.)

 
"By creating we think. By living we learn" - Patrick Geddes

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #577 on: 17 May, 2016, 11:07:46 pm »
Pi are nice but very misapplied. (I'm building the 'see like a bat' project and it makes n^2 more sense to use an arduino for it.)

Agreed.  The main things the Pi brings to *that* party are the ability to run the development environment directly on the Pi (which is mostly an educational thing) and a choice of high-level languages, including Scratch.

Where the Pi is really useful is when you want your embedded system to be running a full OS to talk to a network, handle data, provide a user interface or something, which probably involves offloading the low-level control to something else.  It's great to reduce the timekeeping side of your alarm clock project to "apt-get install ntp", for example.

If you don't need that, and can cope with debugging C, then Arduino's generally a better choice.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Fettled any computer stuff today?
« Reply #578 on: 24 May, 2016, 07:49:14 pm »
Extracted text from every document we give the students in their core modules for the first two years (nearly 400 docs) and ran a text similarity (cosine similarity on TF-IDF scores for the keen). Gives a credible network clustering that looks really cool in 3D. Tomorrow I add level 3 and if that behaves then level 4. Then to add some easy to use R functions (not always an oxymoron) and a Jupyter notebook wrapper so that my colleagues can make use of the data.

It is far more fun than marking exam scripts anyway, and gives a traversable view of the curriculum where we can ask questions like 'which is the best module for them to understand this?' and 'where is there overlap between modules?'
"By creating we think. By living we learn" - Patrick Geddes

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #579 on: 24 May, 2016, 07:53:15 pm »
Deployed a small shell script to make exim reject emails with zip attachments that contain Windows executables.  Because it's been a long time since I had a sensible reason to email one, and all the trojans that sneak past the spam/virus filter are getting boring.

Re: Fettled any computer stuff today?
« Reply #580 on: 24 May, 2016, 08:01:05 pm »
Yesterday at close of play I was trying to get my Pi Zero to talk to a spectrometer. Unfortunately the serial adapter (RS232) just had the minimal connections - +ve, GND, RX and TX. The Spectrometer dates from the era of very slow serial printers (anyone remember those?) so requires hardware control. A quick visit to Makerspace and use of a soldering iron, some headers and I could then bridge CTS/RTS and pull DTR high. It now behaves so I can enhance the functionality of the spec with simple Python.

I should really put the DSR and or DCD (whichever is the equivalent of DTR going the other way) instead of guessing the time it takes to perform operations like shutter open/close and changing wavelength. At present I just use a time.sleep(n) to allow it time to do what it needs.

But it works and the colleagues are impressed.

La la la la fingers im my ears I'm not listening ! I had to do too much of that sort of rubbish 20 years ago. I think  I still have an RS232 break out box in the attic somewhere.
I think you'll find it's a bit more complicated than that.

Zipperhead

  • The cyclist formerly known as Big Helga
Re: Fettled any computer stuff today?
« Reply #581 on: 24 May, 2016, 09:13:24 pm »
Yesterday at close of play I was trying to get my Pi Zero to talk to a spectrometer. Unfortunately the serial adapter (RS232) just had the minimal connections - +ve, GND, RX and TX. The Spectrometer dates from the era of very slow serial printers (anyone remember those?) so requires hardware control. A quick visit to Makerspace and use of a soldering iron, some headers and I could then bridge CTS/RTS and pull DTR high. It now behaves so I can enhance the functionality of the spec with simple Python.

I should really put the DSR and or DCD (whichever is the equivalent of DTR going the other way) instead of guessing the time it takes to perform operations like shutter open/close and changing wavelength. At present I just use a time.sleep(n) to allow it time to do what it needs.

But it works and the colleagues are impressed.

La la la la fingers im my ears I'm not listening ! I had to do too much of that sort of rubbish 20 years ago. I think  I still have an RS232 break out box in the attic somewhere.x

In the attic?  I think my interfaker is on the shelf in the office.  It makes me even more appreciative of USB. ....
Won't somebody think of the hamsters!

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #582 on: 24 May, 2016, 09:24:47 pm »
In the attic?  I think my interfaker is on the shelf in the office.  It makes me even more appreciative of USB. ....

Yeah, I've got one of those around here somewhere...

Phil W

Re: Fettled any computer stuff today?
« Reply #583 on: 24 May, 2016, 10:06:00 pm »
In the attic?  I think my interfaker is on the shelf in the office.  It makes me even more appreciative of USB. ....

Yeah, I've got one of those around here somewhere...

You'll find many petrol pumps still use RS432  over the simple wires buried in the underground conduits before hitting the IP convertor boxes in the fore courts and off onto the networks.

Gattopardo

  • Lord of the sith
  • Overseaing the building of the death star
Re: Fettled any computer stuff today?
« Reply #584 on: 24 May, 2016, 10:16:22 pm »
Fettled the imac back in to life after a few bits came loose.

marcusjb

  • Full of bon courage.
Re: Fettled any computer stuff today?
« Reply #585 on: 24 May, 2016, 10:38:13 pm »
Hardly a day goes by without me talking to something over a serial cable, or more likely these days still is getting two devices to talk to each other over a serial connection.

Today I made a lighting control system from manufacturer X talk to an interface from manufacturer Y to deal with some curtains. All at 9600 baud (8 1 N for total transparency). I actually had a conversation with one of my business partners about why I ran it so slow (as low as one of the interfaces would go, I think the other could drop even lower) when they could both run at 115200.  Because I don't feel the need for speed to exchange a very infrequent amount of 30ish ASCII characters and over the years I have seen plenty of stuff claim it can handle the giddying speeds of 115200, but in fact just curl up into a ball and die when something throws it some stuff to deal with.

9600 forever!

Anyway, in the world of BMS and lighting controls, serial is still dominant because it does just work both in point to point and multi-point flavours.
Right! What's next?

Ooooh. That sounds like a daft idea.  I am in!

tiermat

  • According to Jane, I'm a Unisex SpaceAdmin
Re: Fettled any computer stuff today?
« Reply #586 on: 25 May, 2016, 10:28:55 am »
Managed to show-horn the latest software updates onto the Garmin, at the 10th attempt.  A combination of using VirtualBox, with a Windows VM, a slightly dodgy USB port and Garmin Express' flakiness meant it was a lesson in patience.  Word to the wise, if you need to follow this route, disable ALL power saving and screen locking (both on the VM and on the host OS).

Then I installed some apps (not cycling related) on the new smart TV.  I am dithering as to wether to sign up for a NetFlix account, might wait until Friday, so we can maximise the use of it.
I feel like Captain Kirk, on a brand new planet every day, a little like King Kong on top of the Empire State

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #587 on: 25 May, 2016, 11:23:14 am »
Deployed a small shell script to make exim reject emails with zip attachments that contain Windows executables.  Because it's been a long time since I had a sensible reason to email one, and all the trojans that sneak past the spam/virus filter are getting boring.

Trojan-free inbox this morning.   :thumbsup:

(Just the regular phishing from NatWest)

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Fettled any computer stuff today?
« Reply #588 on: 25 May, 2016, 02:39:29 pm »
Hardly a day goes by without me talking to something over a serial cable, or more likely these days still is getting two devices to talk to each other over a serial connection.

Today I made a lighting control system from manufacturer X talk to an interface from manufacturer Y to deal with some curtains. All at 9600 baud (8 1 N for total transparency). I actually had a conversation with one of my business partners about why I ran it so slow (as low as one of the interfaces would go, I think the other could drop even lower) when they could both run at 115200.  Because I don't feel the need for speed to exchange a very infrequent amount of 30ish ASCII characters and over the years I have seen plenty of stuff claim it can handle the giddying speeds of 115200, but in fact just curl up into a ball and die when something throws it some stuff to deal with.

9600 forever!

Anyway, in the world of BMS and lighting controls, serial is still dominant because it does just work both in point to point and multi-point flavours.
You speed demon! This is 1200, 7 bit, odd parity 1 stop bit. Hardware (CTS/RTS, and DTR required.) Given the response time of the spec I may well try the DSR to optimise for speed.
"By creating we think. By living we learn" - Patrick Geddes

marcusjb

  • Full of bon courage.
Re: Fettled any computer stuff today?
« Reply #589 on: 25 May, 2016, 03:00:50 pm »
You speed demon!

 ;D

Opening and closing curtains at staggering speeds!

A lot of 'modern' stuff won't go any slower, so 9600 has become pretty much default across my industry.
Right! What's next?

Ooooh. That sounds like a daft idea.  I am in!

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #590 on: 25 May, 2016, 03:05:04 pm »
I just wrote some code that takes compass bearings and works out how much to turn a thingy.  Once typo-fixed and compiled, it did the right thing first time.  No sign errors, no cockups as it crosses zero, no 1541 disk drive impressions as it merrily ignores the hardware limits.

I think I'll have to go and do some gardening or something.  No way that sort of programming luck can continue...

woollypigs

  • Mr Peli
    • woollypigs
Re: Fettled any computer stuff today?
« Reply #591 on: 25 May, 2016, 04:44:41 pm »
Put a quid on the lottery you might be on a roll.
Current mood: AARRRGGGGHHHHH !!! #bollockstobrexit

Re: Fettled any computer stuff today?
« Reply #592 on: 25 May, 2016, 04:46:27 pm »
Bought a chrome cast as a tool for showing people stuff what is on my phone. So far, all I've done is watch some Naruto on Crunchyroll.

Phil W

Re: Fettled any computer stuff today?
« Reply #593 on: 25 May, 2016, 07:58:22 pm »
I think our dial up when I got my first laptop in 1990 was 19,200 baud. It connected to a Browns Box connected to our mainframe. More than quick enough for text based command line exchanges.  The joys of pagers and oncall. Before that in the late 80's I'd have dot matrix print outs of the code of the trial we were doing. Then do support over phone whilst reading through the code. Happy days from more than a quarter of a century ago.

David Martin

  • Thats Dr Oi You thankyouverymuch
Re: Fettled any computer stuff today?
« Reply #594 on: 25 May, 2016, 09:20:52 pm »
My dial-up to the ULCC from student digs in 1989/90 was a 1200/75 modem. Fast enough to read email, just, when it was entirely text based on a Vax. And you got very good at one letter cryptic commands.
"By creating we think. By living we learn" - Patrick Geddes

Feanor

  • It's mostly downhill from here.
Re: Fettled any computer stuff today?
« Reply #595 on: 25 May, 2016, 09:33:47 pm »
My first foray into dial-up was in about 1983, dialling into EMAS ICL-2900 in Edinburgh, and also Robert Gordon's DEC-20.
This was 300 baud, ( not acoustic coupled, but a grey old-fashioned GPO telephone with built-in modem and big radio-pushbuttons for voice and data ).

The 'Terminal' was an Apple ][ running a self-written very simple terminal emulator, which simply echoed keystrokes out the serial port ( on an add-in card, IIRC ), and echoed serial in to the display.

This required ( as do all my RS-232 projects, it seems ) burning your fingers making up custom leads with the necessary crossover-ness and RTS/CTS and DTR/DSR jibbling to make it work.

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #596 on: 25 May, 2016, 09:38:05 pm »
This required ( as do all my RS-232 projects, it seems ) burning your fingers making up custom leads with the necessary crossover-ness and RTS/CTS and DTR/DSR jibbling to make it work.

Barakta deserves special commendation for doing this as a teenager, after a parental holiday packing cockup threatened to strand her without communications for a prolonged period.

These days she delegates that sort of thing to me, on account of my having more fingers to burn.

Phil W

Re: Fettled any computer stuff today?
« Reply #597 on: 25 May, 2016, 09:50:09 pm »
I remember our school had a computer terminal linked to the schools network. That did have an acoustic coupler. Would have been 1200 or 2400 baud I think but could easily be wrong. It was so precious it was locked in its own room away from the rest of the computer room. The other computers were Tandy TRS80's followed by the BBC micros a few years later.  None of them were networked and only one had a disc drive attached on a ribbon cable. A smart kid worked out how to send games over a serial  port between TRS80's so galaxian / space invaders et all could be sent from the one disc drive puter to the others. I wrote some machine code (think they were Motorola 68080 chips or something) that sat on one of the interrupts to bypass copy protection. There was also the memory you could write to that was directly mapped to the screen output. This was 1979/80 - 83/84. More happy days and my earliest introduction to programming.

Mr Larrington

  • A bit ov a lyv wyr by slof standirds
  • Custard Wallah
    • Mr Larrington's Automatic Diary
Re: Fettled any computer stuff today?
« Reply #598 on: 25 May, 2016, 11:55:10 pm »
My first employer was still using an acoustic coupler for dial-up access from both the Aberdeen and Stavanger offices and DEC when I moved on in late 1987.
External Transparent Wall Inspection Operative & Mayor of Mortagne-au-Perche
Satisfying the Bloodlust of the Masses in Peacetime

Kim

  • Timelord
    • Fediverse
Re: Fettled any computer stuff today?
« Reply #599 on: 26 May, 2016, 12:01:43 am »
I'm fairly sure we have at least three acoustic couplers downstairs.  Anyone want a textphone?