Posts Tagged ‘peter scargill’
Another year draws toward it’s conclusion. We had a nice day today overall, got up late, in my case because I was up until 2.30am last night playing the excellent “Bioshock Ultimate” game on the PC – which I have to say is superb by any standards, action, imagination, imagery. We had some “home made” croissants, that is out of a tin and into the oven– which you’d think would be marginally better that bought in a shop – but no, actually. Still – a nice change.
This afternoon we took some flowers to Joe’s graveside which was a little un-nerving but I guess the right thing to do. We then headed off to Whitley Bay to see my daughter Elizabeth and family – she’s in cloud 9 right now having just passed her driving test. Not sure how long that will last as the crushing costs of running a car become apparent – still – it’s always worked for me (I’m not the world’s greatest lover of public transport) so I wish her well.
As I was sitting, surrounded by Christmas wrapping paper I started twiddling with the mobile phone, testing out a new backup and sync app which I installed last night – and in the process wiped out just under 80GB of data – a process I’m now sitting here near midnight repairing (thank heavens for NAS drive backups). I’m feeling a lot more relaxed now, though the Baileys might have something to do with that. Maureen gave up for the night but I note she’s back up researching summer trips to Spain.
After a somewhat noisy dinner with the grandkids we headed off home and settled down to a little TV. I virtually NEVER watch live TV so when we noticed that Channel 5 were playing the EXCELLENT “Time Machine” 2002 version with Jeremy Irons we put it on record and started part way in to watch so as to excape the ads. This will tell you how long it’s been since I took notice – are you aware you’re looking at 6 minutes of adverts.. we only used to get sessions that long on the hour. I can’t see TV advertising surviving this generation unless in some radically different form. The only effect ads have on my these days is to bring on homicidal tendencies when I see the leeches that call themselves legal companies offering no-win-no-fee for accidents or the loan sharks who offer interest rates the mafia would be proud of. No, give me recorded on demand video any day.
And so here I am writing this blog, thankful my home office is nice and warm and watching the excellent Windows Security Essentials restore my backups while conveniently cleaning out virii I didn’t even know I had from old files.
Thankfully I’ve a few days break from work and I plan to build another heating controller for the cottage, finish off some work I’ve been doing on lighting and give my office a bit of a winter clean up – meanwhile the cottage has clients arriving at the weekend who’ve returned for their 5th or so break – which is really great so we’ll be giving the place an extra once-over tomorrow to make sure they have a great time. I also plan to grab Crysis 3 while it’s on special offer just in case I end up with any Billy-no-mates evenings in January – I’ve at least one trip to Brussels planned – first time I’ve been there at this time of the year – I hope it’s warmer there than it is here.
Got my pal Jonathan and his wife coming to stay in the gap between new year and work recommencing which is nice.
If you’re reading this before the new year – have a HAPPY NEW YEAR.
The highlight of the week for me has to be having met Toyah Wilcox – amazing experience. She was about to go live on stage at the FSB Annual Conference… and we met up in the holding room first for introductions. Amazingly pleasant and despite crutches due to an injury she put the effort in to give us some decent photos…
As IT Director it is my job at our conferences to ensure our presence on the web includes topical reporting, imagery, video and this year – social media.
On the social media front it is our first shot at doing this properly at one of our conferences and everything worked wonderfully well, with nice comments coming in throughout.
The delegates (several hundred) arrived on Thursday for the AGM (in which new national officers such as the chairman are elected), at Curve, Leicester (don’t ask why they don’t call it “The Curve”)followed by 2 days of debates, resolutions and exhibition.
Friday after a very early start, I caught John Allan – the new National Chairman, in our hotel and video interviewed him on the spot – John has some strong views on out of town parking as you’ll see – the video is on the FSB website along with many other videos.
Later in the morning we had an excellent talk by Peter McAvoy of Google – I met him some months ago in Southern Ireland while at an ESBA meeting at Google’s HQ.
He talked about Google’s ideas and in particular, Google Glass which is a fascinating project about to come to fruition and involving micro-miniature circuitry effectively putting the power of a modern mobile into a set of glasses with transparent projection in front of your eyes. The video explains what they’re trying to achieve.
The exhibitions included Dell and Microsoft (the latter funded the excellent Friday night drinks reception) as well as the guys from ESBA (European Small Business Alliance) – Saturday saw more of the same culminating in the talk by Toyah Wilcox.
The whole lot is up on the web (I should add that was surrounded by an excellent team of staff and volunteers who’re working hard to make sure this all runs smoothly – but these photos are my own). Here are some more pics from the event.
This one’s for techies only! The NRF24L01 2.4Ghz transceiver.
So you have your Arduino (single-chip micro with bootloader) or similar (could be a PIC project really but you’d have to understand and re-hash the libraries) up and running and you need two of them to communicate. How do you do it?
One way is the excellent EASYTRANSFER library (just look up ARDUINO EASY TRANSFER) which among other things lets you define 2 wires for serial communication.. the library can let you transfer arbitrary blocks of data back and forth reliably and at speed, but placing that cable can be a pain depending on location and/or the patience of your spouse.
If you need wireless communication at low cost, then perhaps the NRF24L01 modules are for you. I must stress that the really cheap units with PCB aerials do not have a lot of range (ignore the crap people put in print about range – such comments are about as reliable as the ads that claim 96 hours standby on your smartphone – yeah, right).
The problem I found is that there is SO much incorrect or contradictory information out there I decided to write my own blog on the subject. As I sit here, I have two dissimilar Arduinos (one is a NANO, the other is simply built from scratch on a breadboard, both use the 328 chip, a marvellous if limited device that costs just a few ££s) and I have the two passing messages across to each other reliably – when I say reliably, we’re talking about radio but what I mean is that only accurate information is being sent – you can rely on it within the limits of range of the devices (and the weather and walls and WIFI signals etc.).
Often when radio people write such stuff you get how to send a character across and the rest is left to you on the assumption you know your stuff – well we’re all beginners at SOME point. What I’ll describe here is sending an arbitrary BLOCK OF DATA across – that data can be whatever you want but let’s say a character string like “Hello world” or an integer containing the time – or both.. you might want a wireless display board or weather station etc.… who knows – this will let you send whatever you need to send back and forth.
So, do you need wireless transfer and you’re happy with maybe 20-30ft with no walls or maybe the next room? This article is for you (and if not you might be looking at the same thing with and external aerial so this article is STILL for you).
So firstly lets take a look at the radio hardware. The NRF24L01 radios comprise a unit smaller than your average thumb with either an 8-way or 10 way connection depending on which module you go for – makes no difference, you need in total 7 wires to do the job including power and ground.
The connection details are here and you need the RF24 library – rename it simply to RF24 so the Arduino IDE doesn’t kick up a fuss. There are a couple of variations of this library – mostly unfinished – it’s a shame people take all the time to make a library – put it out there – admit the library has a long way to go – and then forget about it! An example is the RF24SH library – “needs work” – and no updates for a year! What!!?
Gregg Copeland has done mods to the RF24 library but the one I’d check out now is here. He has also done mods to the RF24NETWORK library. http://tmrh20.blogspot.co.uk/2014/03/high-speed-data-transfers-and-wireless.html
First thing to note – these unit run on 3.3 volts – and will EXPLODE (slight exaggeration, more like smell for a while then pack in) on 5v so don’t even think about it. One of them is running on the 3.3v output from the NANO, for the other I simply dropped the 5v supply through 2 4001 diodes – that’s it – you don’t have to worry about the data lines, just don’t feed 5v into the power lead. On reflection (August 2014) the diode dropper wasn’t a good idea – and I’ve recently learned about all sorts of issues with current spikes on these radios so I consider it a MUST to attach a capacitor across the power lines ON the board, a 6.3v 330u cap works for me. Without this expect all manner of strange issues of range.
Using the library I mentioned above (you need the RF24, NOT the MIRF library from that website) you’ll find an example of how to send the time from one board to the other wirelessly… but that leaves SO many questions including how much RAM does this use etc.. well, here are some quick wins for you. The library uses only something like 16 bytes and the chip will retry messages 15 times – if you want more data it’s over to your code. The chip will send and receive it’s own buffer of up to 32 bytes… that is – your code can be doing something else while it’s buffering up 32 characters. Great!
Of course you need to store the data somewhere – if you’re sending you need to store the output buffer, if you’re receiving you need to store the input buffer and in their time example the same code handles both transmitter and receiver, using an Arduino pin to select what job the board is doing (GREAT way to knock up a test). So – I decided to allocate 64 bytes of RAM to this in total – 32 in one direction, 32 in the other. I knew I wanted various types of data so I created a simple STRUCT…
So what’s a UNION – you don’t see much about these but they’re dead handy.. a UNION is a block of memory and it’s size is dictated by the largest item in it – they overlap so you can’t use them at the same time – but for a buffer they’re ideal as you don’t then have to do all sorts of conversions depending on the data you need. I could have just used a struct but in this case I wanted to experiment sending different types of data at different times.
In this case, if I wanted to populate RADIO_OUT
buffer with text I might simply do this…
strcpy((char *)radio_out.package,"Peter calling breadboard.......");
So, look at the example in the RF24 library which lets you bounce the time back and forward between two modules – and then instead of sending the time – send this data… if you look at the library example you’ll see where this belongs…
bool ok = radio.write( &radio_out, 32);
You’re sending the address of the union (block of data) and it’s size (32 bytes in this case – note the reference to 32 above – that tells radio.write how much data I’m sending – and remember the chip’s internal buffer will handle no more than 32 bytes at once – if you want more, send more than once package one after the other – but remember you’ll have to buffer that too and the Arduino with 328 only has 1K of RAM IN TOTAL). You could send less if you don’t need that much but I figured as the chip is capable of processing 32 bytes and I needed to send text – why not. It might be that I’d want to send a bunch of integers …. same send code but populating as:
In the note above I’m referring to the UNION – don’t use all it’s innards at the same time as they overlap each other and are merely a convenience for you.
So assuming you got the demo running sending time back and forth, now you have the information to send arbitrary data up to 32 bytes at a time – you might use that to make a wireless message board using a 16 character by 2 line display (but remember- there’s a zero on the end of C strings so you’d only be able to send a pair of 15 byte messages unless you then later added a zero in your own buffer).
Update August 2014: Elsewhere you’ll find information on the RF24NETWORK – this works well but has a strange numbering system – an alternative is the RADIOHEAD network – but beware – the latter has a full mesh network option – tried that – had varying results until I realised that the NRF24L01 chips do not have any means of detecting signal strength – which begs the question – how does the network know how to pick the strongest signals! I went for the intermediate option with that library and defined the nodes and their connections manually. At the time of writing I’m still having reliability problems with the large (NRF24L01+PA) radio modules but the little cheap ones work just fine.
I did a short video on this showing this in action at the end..
This article is part of a chain or articles which started back early 2012 with my cottage thermostat article. How things change. This was followed up by the original UberBareBoard article detailing a 328-based Arduino clone. The next article after this is called home control over the Internet.
At Tescos of course!
I got up somewhat after 3am this morning to take Maureen to the airport – she’s off to see her folks. On leaving Newcastle airport and aware that I’ve a quiet Easter weekend coming up I thought I’d take a trip to the supermarket.
So at 5am I popped into Tescos in Hexham. Figured I’d get everything I needed for the next 4 days – and a spot of wine for TV dinner tonight.
Got to the automated checkout and started firing items at it… SORRY said the machine, can’t sell you wine!! Well, last time I checked I was WAY past 18 years old… so I asked the attendant. It turns out that Tynedale council refused to let them have a 24-hour alcohol licence – and so they can only sell alcohol from 6am.
What kind of stupid-ass policy is THAT?? Does it help small shops? NO because they’re all closed at that time of the morning. Does it help the environment? FAR FROM IT because I now have to take ANOTHER trip from my village to the supermarket JUST to get the wine… who’s BRILLIANT idea was that. Half an hour after I left the store it would have been ok to sell me the wine!
Don’t you get sick of so many stupid regulations dreamed up by so many stupid people!