 OK, great. Hi, everyone. We'll get started because it's three minutes past. This is the making of the grid. If you haven't seen it yet, the grid is a big thing out by stage A, just slightly further. It's 49 huge aluminium poles bedeckt in LEDs and come dusk. We're going to be turning it all on and it's going to be very bright and exciting and I suspect attract quite a lot of people once it's lit up. So, great. This talk is pretty much a story and a, I don't know, like a pity fest about how much pain we went through getting everything together plus all the details and the gory engineering bits and the fun times we had getting everything in. And then more interestingly how you can write your own code to run on the grid. So what the APIs are, how you can get stuff running, who to speak to and when we'll be testing it and that sort of thing. Great. So I'm Adam, this is David and David's going to walk you through the picture slideshow which is the first half of this talk. And start off, I'd like to say a massive thanks to Element 14 who sponsored us loads of the electronics and cable for this which has really made it slightly less hellishly expensive. So, yeah, I'm going to start off with the making of the grid which is essentially our holiday photos with me complaining in the background. So to start off with the ingredients, start off with one misguided idea. So we started off thinking let's buy loads of LEDs and put them on our tents and then we realised quite how cheap it is to buy a heck of a lot of LEDs on eBay and we wondered what would we do with 250 metres of LEDs and a few evenings later we came up with well let's put them on poles and so if you can see it, this is Adam's blender model of what it might have looked like. And yeah, we shortly afterwards bought a whole bunch of LED strips. 245 metres of LED strip in a rather large box which all came individually packaged for some reason. So after half an hour of unpackaging all of these, our living room looked a little something like this. This is a very small fraction of the LED strips on one of the power supplies but yeah, we wanted to test all the power supplies in the LED strips. So our living room has looked like this for about the last two months I think. Something like this but full of boxes and components in LED strip. So next up, something to put the LED strip on. We went through a number of options here like plastic and fibre glass and things but weirdly enough it turns out the cheapest way to get 50 poles stuck in the ground is aluminium which unfortunately involves a large articulated lorry turning up on a small residential road. Articulated lorries don't fit on residential roads so this was the first funny story of many was one very angsty articulated lorry driver trying to deliver 150 metres of aluminium to a residential address and getting very confused when two guys in sandals wander out to collect 150 metres of aluminium angle section as pictured here. I'm really disappointed that the guy didn't ask what we were doing with all the aluminium but I guess he thought it better not to ask. So next up from LED strips you need power and this was a case of we need 12 volts and quite a lot of amps and we're both students on a student budget and so what's the cheapest way to get lots of amps at 12 volts? It's eBay. eBay's professional power supplies. So I'm not sure what I expected getting a 30 amp 12 volt power supply for £13 on eBay but I was young and naive two months ago and I thought that they would probably work. So yeah I took them apart and had a look but more on that later. We had power supplies we were happy it was good. Next up quite a lot of cable. So connecting all the LEDs to all of the power supplies we underestimated by quite far how much cable that would be when doing the budget and then actually worked out that it would be nearly 700 metres of cable which was unexpected to say the least. So that was one rather large box of reels of cable. This is 400 metre reels there were another 300 metre reels and the mail room were really really unhappy at this stage having gotten several large boxes already and this one was a large and heavy box. We also decided we wanted the pulse to click and it turns out the cheapest way to get something that clicks is relays. Quite a lot of relays. I didn't even realise that relays came in strip packaging but apparently they do. So we ordered 50 of them and Vanell helpfully sent us about 100 of them but I'm not complaining. And finally on the ingredients miscellaneous electronics the best part. So two large very pleasing boxes from Vanell and CPC. The most dubious power cable you've ever seen in your life. If you can't see clearly this is just a UK mains plug on one end with bare wire on the other end. This is exactly what we bought and how it came and we were how unhappy were we? We were really unhappy. Further helpfulness included 200 individually bagged crimps so our living room is still full of 200 individual crimp bags on the floor. That's one to deal with next week I guess. So anyway now our living room is full of many large boxes of LEDs stacks and stacks of reels of cable large box of power supplies and lots of bags of crimp tools. It's time for the preparation. Step one cut up 700 metres of cable into precise lengths. This took quite a few days of reeling cable out and cutting it but I'll try not to complain too much. Step two cut up the aluminium. This one took about a day of soaring aluminium not the time bitter but it was quite pleasing having lots of lengths of aluminium that didn't bit up the stairs. Step three I think repair the power supplies. Now I'm not sure if my mistake was in ordering eBay power supplies or in opening them to have a look what was inside but after shaking the power supply and hearing a rattling noise I decided I'd be better off fixing it before I turned it on rather than after I turned it on. And I was right. Can anybody spot the problem in this picture? It's about here. It's a zoom and enhance. This is the inductor on the power supply output that those aren't meant to be disconnected. So yeah, that was an afternoon of repairing eBay power supplies and the moral of this entire project is don't buy the cheapest power supply you can find on eBay. Thank you. Just kidding there's actually a lot more. Laser cut all the things. I recently came into the use of a laser cutter and slightly enthusiastically decided that all of the electronics should be in laser cut boxes. And about three hours of laser cutting boxes and engraving things later we had something resembling a box. Several more hours later we had something resembling a lid. It was a lot of hours and it was very smoky but it was worth it. Laser cutters are great. So the second moral of this story is get a laser cutter and a window that opens. Make some PCBs. I had originally, in my misguided enthusiasm, decided that the best way to connect up 50 reels of LEDs to four power supplies and relays and God knows what else was to do it all on strip board because I can just buy a massive sheet of strip board and sit there all afternoon soldering it and it'll be great. Adam then hit me over the head with a clue and we designed and ordered some PCBs which came for about $15 or something from China. And so here we have Adam's glorious fashion shots of the PCBs because apparently if you add a blur to photos it makes them look prettier. So moral number three, make PCBs don't use strip board. I think strip board should frankly be banned and also these are really beautiful. I can't say that enough. It probably should have just stopped at the PCBs, ignored the rest of the project and it would have been great and I could have just put them on the shelf and looked at them. So put everything in a box. Earlier you saw the box and then we put the box inside another box and put some boxes in the box and then attached a lot of wires to the box and the box was good. And just in case the box wasn't good enough already we added a shiton of LEDs. And so having enthusiastically put everything together it's time for testing. First of all the LEDs which you got a sample of earlier. We put some LEDs on a pole, stuck it in the garden and this is a very small taster of what you will hopefully be seeing at dusk down by stage A. And here's me enthusiastically testing LED strips with all of the essential ingredients for the PCBs. So you can't read the text but there's a cup of coffee and some LEDs and a suspect power supply and my trusty multimeter. It's much funnier if you can actually see the text. I forgot to mention earlier on we decided that what any installation needs is interactivity because it's basically the buzzword these days. And what better way to add interactivity to your flashy light installation than to add a computer vision system. Because I hear computer vision systems totally don't mind it when you flash lots of LEDs and it's in the dark. So we went off to a field and tested a computer vision system. It was grey, it has infrared LEDs and cameras and a laptop and things. So basically it's infrared lights, infrared camera people walking around, you can see where the people walk and it can do pretty patterns based on that. That's how interactivity works. This slide's in the wrong place, ignore it. Set up. So this is me on Tuesday night collating aluminium in a hallway. Collating caps for the aluminium and electronics. 700 metres of cable. Desperately trying to fit things into the car on Wednesday afternoon. And Adam trying to actually do some work in the car on Wednesday afternoon because his report was due this morning. Having arrived at the field, it's time for setup. This is before setup, happy faces, enthusiasm, generally misguidedly happy. I might just add that we were planning to start setup at noon, finish around dusk as it was starting to get dark, head home, I could finish off some report in the evening. It would be great. We arrived on the site at 8pm. I don't really do mornings. So yeah, this is us arriving at 8pm with a lot of boxes. It was still light at this point, which was nice. Also it wasn't raining yet. Yet. I had to include this slide of Adam looking frankly fabulous. Which can lead us up for a while. This is us sticking poles in the ground and saying a massive, massive, massive thank you to Flig who helped us put all the poles in the ground and he's at the back waving and you should totally go and check out the awesome retro games tent. What? So yeah, he stayed up all freaking night helping us put poles in the ground and it was kind of cold and wet. But hey, we got it done. And entirely unrelated slide of the site looking really beautiful last night over the lake. So this is 50 reels of LED strip on the floor, the first optimistically placed pole. Several hours of setup later, we had a tent. I've never seen a tent with this many cables going into it before so if anybody else wants to beat this record of number of cables going into a tent this EMF is definitely a chance. The electronics with a glorious amount of cables going into it. Adam's still writing his report at 10 o'clock on Thursday morning. But yes, it was almost finished. There were cables, there were poles, there was a tent. Adam was really tired. It was way past dawn, it was light. But anyway, so in case you haven't gone down to have a look at it which you should totally do at dusk here's some photos of it being nearly kind of finished. Yaros for scale. And finally at about 10.30, the final turn on and the poles looked really disappointing because it was morning by this point. But anyway, they look great tonight and now Adam's going to talk to you about the software a bit. Hey! Right, this is the presenter notes on the projector and the other ones on this. Well, you can probably see that. This is really dire. Yeah, you go for it. Right, so yeah, I haven't slept since we broke ground sometimes several days ago. Anyway, there were long boring evenings involving putting poles in the ground. The software, there are some slides. Okay, I think we'll wait, it'll be better. Hooray, the grid software. So basically David's been doing a lot of work on the hardware spent long nights soldering and cutting and doing generally repetitive tasks that he didn't really enjoy epoxying everything it took forever. Meanwhile, I was promising I'd write some software eventually and I've been promising ever since and my plan is to write all the computer vision between the end of this talk and dusk when we turn everything on. But we do already have some software. So the broad layout is there's this control thing at the top which is running everything and it has an HTTP API because that's the cool thing to do these days and that talks to a CLI which exists and a web user interface which doesn't exist but will. And it's quite simple. Then there's the tracking and the computer vision. So the broad idea here is you've got some kind of camera, you've got a field, everything is moving, everything is really hard to see what's going on and it's in the dark. You want to reliably work out where people are and keep track of who is where so that people don't flick in and out of existence. So there are two layers to this. The bottom CV layer is a fairly simple kind of motion detection. We have an IR filter on the camera. We have several IR floodlights that illuminate the whole field in light that you can't see. Then hopefully the camera sees some light reflecting off you somewhere in the grid. Between two successive frames it works out which pixels have changed a lot. Those are the ones that have moved. It thresholds up based on size and if it looks roughly person shaped it sends it off to the tracking layer. Tracking layer is a little more sophisticated, has some idea of where people might be runs a state estimation to see which direction they're travelling in. I don't expect that person to be based on their previous velocity or is this an entirely new person and if it's a new person maybe I should wait and see a little bit until I promote it to a person proper. All of this happens generally great in the background and presents a nice API to our actual patterns which says here's a person they're at this position and the next frame it says that same person now it's at this position and so on. That will totally all be working by tonight. Right then there's the output from the software which is the sinks there are several of them but one of them is a console debug which shows you what the grid is doing and the other is the hardware itself. The design is really simple the software generates a 7x7 matrix it turns it into 7 bytes it sends the 7 bytes to an Arduino which shifts it out to the whole grid which is a series of 7 shift registers so this part is fairly straightforward and it does it really quickly patterns the patterns are the more exciting part patterns the patterns are the thing that are actually doing anything on the grid so this is a piece of software which says okay we want to make this thing look really pretty and it certainly will come nightfall so there's a really simple thing here which just gives you a kind of idea patterns are mostly python classes they inherit from a class pattern you have some kind of decorator which tells the whole system there's a pattern and it exposes it to the interface and lets you run it and so forth it only needs one function method update which will return a 7x7 array of which light should be on and which should be off and a delay in seconds until it should next get updated so it's really simple you can keep state in the function and there's this self dot tracking which is a dictionary of personal idea and person position coming real soon so this is the sample code to turn on one pole the actual patterns are not much more sophisticated so patterns we've got at the moment there's a couple of fun bits and pieces there are some interactive things we are planning to have a kind of maze where everyone can run around inside the maze you're working in your own individual maze so you can only see one cell ahead of you at any given time and you can race someone else we're going to put Tron on it of course so as you run around behind you you trap your opponents inside and race them I suppose plus Pong, various interactive waves waves and ripples and I don't know if it's a stupid smiley face but it's really awful I only run it because it really annoys Adam so really we wanted this talk to be on Saturday so you could all have seen it and got an idea what would be going on beforehand but the intention here as much you know how much pain and suffering we went through to put everything in the ground it's really easy to write your own code we're really happy for people to have some ideas about what would look cool on this come check it out tonight, if nothing else it definitely lights up and looks good hopefully we'll have CV working as well definitely by tomorrow night you can write some code you can do something cool, if you've got some cool ideas give us a shout, we'll be near the grid there's a website the website is thegrid.fish so you can go on that and that will have some contact details and if you have some cool ideas please give us a shout we're very happy to run the code and it will be really cool that's the end of this hastily prepared talk I hope you have some cool ideas for the grid and come see it later this evening by Stage A thank you also we'll be taking questions also I'd like to again say a big thanks to Element 14 and to Flig for sponsoring and helping us respectively also if anybody like fancies being really helpful and enjoys digging we're going to be spending quite a lot of this afternoon digging to put cables in the ground so if anybody wants to help with that that would be great any questions yes so the power supplies are just they're a standard-ish switch mode supply so they take mains in and switch it down and around and all around with 12V lots of amps out so I mean they're quite analogous to just a computer power supply but they're actually these eBay specials which only do 12V and do suspiciously many amps on 12V if I call up the presentation I had some good pictures of them and the Goran side so these power supplies are eBay's professional power supplies as you can see it's a brick kind of this big by this big weighs about a kilogram full of switch mode electronics and they're actually designed for CCTV cameras so they're probably going to explode when we sort of switch LEDs on and off very quickly but it'll be fun to watch what happens okay well if there's nothing else we'll call it a day we'll probably hang around a bit to chat if you want to bug us further we'll either be at the grid crying whilst digging or in the hab village or generally running around and yeah check out the website it's literally www.thegrid.fish I swear it's a URL nobody believes me but yeah .fish is a thing now apparently so thank you all for coming