 It's nice to say everyone up and up and about this early. This is Mike Turner talking about the orbs game, gave us a nice round of applause to Mike. Hello, so I'm sure you've all seen the orbs kicking around the site. So I've thought explain exactly what was going on for those interested. The idea started last EMF camp. Ac mae'n cael ei wneud i'r mhwyl yn cael unrhyw arfer. Mae'n ddraeth i'r ffawr. Mae'r ddweud i'r ddad o ran y dyfodol. A dyna y gallwn i'r cyfan. Mae'r ddweud i ddweud i'r ddweud o'r holl ymlaen. Mae'r ddweud i'r ddweud i'r ddweud i'r ddweud. Mae'r ddweud i'r ddweud. Mae hi'r ddweud i'r ddweud i'r ddweud i'r ddweud. E-S-P-8 266 er mwyn yn gwybod. IFI D readers very cheap. I could get PCBs made cheap. It was really good. So I thought I could do this for under a tenor. I'm sure I can. I'm sure I can. So that's what I thought I needed. That's what I actually needed to put in them. Things like power regulation didn't really cross my mind until I was actually trying to design it. Felly, y dyfodol y cwrs yw 14-15 yn awb fel yw'r unig. Mae'r defnyddoedd ar ôl y bydd y bydd yn gweithio yn y cyfnod. Felly, mae'n roedd y prototyp yw'r cyflodiad. Mae'r cyflodiad yw'r hefyd. Mae'n gweithio, mae'n go iawn, hynny'n fawr i'w wirio'r Gymru EF? Mae'r cyflodiad yw'r cyflodiad, mae hwnnw'n gweithio. Felly, mae gynnawch yn dda. Dyna'r rhan o'r drosio ar gyfer y Gymraeg. A yn y gŵr, mae'n meddwl i'r module ESP. Mae'r meddwl yn meddwl ar gyfer childyr yma ar 2016, ac mae'r meddwl i'r module ESP yn meddwl, a'n meddwl i'r meddwl yw'r meddwl i'r meddwl yn moddol, mae'n meddwl i'r meddwl i'r meddwl i'r meddwl, Felly, rydyn ni'n meddwl yw'r gweithio ar gael ychydig yma, ac mae'n meddwl gan hynny'n ymlaen i'r ardal o'r ddweud yma, yw'r gweithio ar gyfer y gallai gweithio'r cymryd. Y cyfwyrdau cymryd yma yn y blaen, mae'r cyfwyrdau sy'n sefylltio'r cyfwyrdau yn gyfwyrdau'r cyfwyrdau. The ESP modules are quite power hungry when they're running, and I needed something that could just wake up, check for an RFID card and go back to sleep again. So I picked one of them. The one that's on there is the 16F15345. It's just a generic, it runs at 32 MHz, it can do all sorts of stuff, so it was ideal for that, but it will go to sleep and it will draw almost nothing. So the boards, when they're asleep, draw about two and a half milliamps in total across the whole thing. When they're awake, they draw about five milliamps, including the PIC, and then the RFID reader, it draws about just under 30 milliamps when it's active. The Wi-Fi module is about 70, so you can see adding all together, I couldn't afford to have the Wi-Fi module on very much. So these RFID card modules that you buy from China, they're cheap. They're like £1.10 on eBay. The problem I found was that they had a read distance of about two centimetres, and could only read a Mi-Fair classic. And I was desperately trying to work out why, because everything said it should read more. My initial thought was, ah, it's a fake chip on there. So I bought some genuine ones, swapped the chips over, and it had the same problem. But eventually I managed to find somebody who posted an article on a forum, and he'd actually looked at the specs that they'd used. And if you look down at the bottom left corner, where the arrow is pointing, there's two inductors, and those inductors were underrated on all the boards coming from China. So I swapped those for 155 milliamp parts, and suddenly it could read my Barclay card, my Santander card, it could read anything I threw at it, basically. So for those interested, if you're going to do anything with these RFID boards, I think the number there, the 182.6601, that is the RS components part number that I use to replace these to actually make them work. So if anybody's having a play around with that, it's well worth a look. So the way this particular bit worked was the picture would turn on the RFID card reader for as short a time as possible, enough that it could then check for a card, turn that off, flash an LED to show the team zoning it, and go back to sleep. And then the moment somebody interacted with it, it would read the card ID, power up the ESP module, which it would then communicate with, send the card details to that, and that would then send all the details off to the main server. The picture, I wrote the software in a thing called ProtonBasic, which is a compiler that I've used for PICs for many years. It's pretty straightforward to use, so that's why I use it. On the Wi-Fi module, I actually used MicroPython, so that's got a MicroPython script that listens on the serial port to commands coming in from the PIC, and it responds and sends the responses back. Just because I know where I'm at when I wrote the communications, all of the comms coming in and out of the orb are signed with a SHA256 signature to make sure that they're coming from the server and from the orb. So nobody could game it in that way, hopefully. I forgot I was zoomed in on this. Just a rough thing, the black little components across the middle are MOSFETs for turning the LEDs on and off, and just below that on the left where the power leads come in, that's the power circuit to regulate it to 3.3 volts. Incidentally, if anybody's scared about doing surface mount, I thoroughly recommend just get a £30 airgun and spend £15 on some solder paste. It's actually really, really easy. I had somebody doing it who's never sold it before in their life within 10 minutes. They were soldering boards, so it's really straightforward. So yeah, that was the zooming on that one. So the way it works. So there's a Raspberry Pi, the one at the bottom. It's got a battery backup just in case because I know I was going to unplug it at some point by accident. That's currently in my tent, and everybody's been avoiding kicking it and moving it around if possible. The orbs and the scoreboard all communicate back to that server via MQTT, and it's just a case if they subscribe to certain message chains and certain topics. So when you capture an orb, it will go through, it will send a token, which is so orb from then the MAC address. That presents an interesting problem when two of my Wi-Fi modules had the same MAC address. And then the line below it is the message content. So you've got the token ID of the user, then you've got a message ID number. So the message ID is increasing every time, again to stop replay attack. And then after that you've got the SHA256 hash of the message and the topic. And then you've got a list of the different kinds of messages that would be sent and received between the orbs and the server to allow people to register, to allow people to check who owns the orb, that sort of thing. The back end, so to say, it's Raspberry Pi, it's running Python, a Python script, and all the data is stored in a tiny DB, which is basically just a JSON file. I did that just because it was quick and easy and it worked. I wasn't sure how scalable it was, but I thought, well, this is a way of testing it. The scoreboard runs Pygame, which is pretty straightforward. If anybody wants to do some simple graphics, you can get some pretty good refresh rates on it, providing you don't use high complexity JPEGs and so on. So I used BMPs and it worked really well, and that allowed it to draw that scoreboard screen. Hopefully you've all seen that one. So, yeah, the build. Building 40 of these things was interesting. So, yeah, it was quite chaotic at times. Boards everywhere, people soldering, lots of stuff. There's a lot of experimentation as well while I was building some of these things. You can see the remains of that kicking around in the top right corner. And when you say you're going to build 40 and then you see 40, you realise what a mammoth task you actually have in your hands. The orbs themselves were just sort of hobby baubles that you could buy and sprayed them with frosting. So, just to give that fostered effect, I also discovered ways not to draw holes in them. I went through quite a few that way. You can also see there was a couple of mistakes I made when I was designing these precisely in a rush and they ended up getting sent to production a little bit early and then realising that all the LEDs that I bought were rated at 3.3 volts, which is ideal for my circuit, but I put space for resistors to go in on all of the LEDs and so we had to wire link a load. So, a few people helped. Nick, Dan, Yestin and Patrick all helped out getting it across the line so I really appreciate all the effort they put into that. I wouldn't have done it on my own. One of the things that did come up, I ordered things rather late, let's say late, sort of about six weeks out, one of the problems was that the batteries that I decided to use suddenly went out of stock as I went to order them. So, I ended up having to buy them from elsewhere and I actually bought them from a company in the Netherlands and they got 18650 cells which were inside the orbs. I was originally going to use this particular one to two amp-power batteries. I got this email, as you can see, a week before EMF camp, to say they were back in stock after I bought a load from somewhere else. It's always the way. So, things that I changed, read the LED ratings would probably be a good start before I designed a board. It's a cheap connector. Some of the boards are struggling to read and that's mostly because the headers on the board were just cheap ones. They're not making very good contact. There's not much I could do about it at that stage. So, all to the parts sooner is really the answer. Build it sooner. We all know we're going to not do that next time. Maybe use something that stays together because they kept falling apart. I'm going to use stickers to hold them together, if anybody noticed. There was one little thing that I did notice when I was remoting on to the Raspberry Pi's. That was, for some reason, the last login was from Johnty'sbeard-nightstand.gchq.org.uk. No idea what that was about. So, yeah, that's it. Have we got time for Q&A? Plenty of time, yeah. OK, cool. Anybody got any questions? You said that the RFID chip could only read a certain kind of RFID and then you upgraded it to one that could read any RFID, is that right? So, the board, as standard, was constrained by power. So, the inductors that they supplied with it were rated about 7 milliamps. The chip can output 150 milliamps onto the radio circuit. So, what was happening was it couldn't deliver enough power out of the board to then energize the RFID cards. So, as a result, only cards that needed very little power, like the My Fair Classics, would actually power up. The more modern ones, like a Desfire EV, just wouldn't turn on at all. My old oyster card would read, but none of my bank cards, my Tesco club card, I couldn't get anything else to read with it. I swapped those inductors over and the same piece of code then read all of the cards. So, yeah. Including my bank credit cards, and people have been playing with their bank cards, by the way. I am honestly not taking any of those details. I read the UID and that's it. Any more questions? There's a hand up at the back on the right. I was wondering what interesting statistics or data you might have seen come in, or anything you might have learned from people playing the game that was not expected to you. People did detect some of the stuff that I left in the game, like speeding captures up by leaving your card underneath. So, there's a couple of little quirks I deliberately left in the game. Defending the orb as well, people figured... I think I put some stuff about that, but people were actively defending their orbs and so on. I haven't looked at any stats yet, but the game does log an awful lot of information about what's going on. So, if you look at the scoreboard, it's flicking through a bunch of different personal stats. There's actually more captured. There is a log file recording everybody's time of visit to every orb. So, one of the things I wanted to do, but I run out of time, was that I wanted to be able to draw a map of everyone's visit around the camp for the weekend. So, the data's there, but there's no EMF camp coming up for me to quickly rush to write that bit of code. So, I don't know whether I'll get around to it, but what I'll probably do is I'll put the data out there if anybody wants to have a hack around with it. I mean, there's just a text file and a JSON file and they contain all the data from the game. So, only UIDs of course. Anyone else? Any more questions? Oh, there is definitely one at the back. Are you planning to do this again next year and do you have any ideas how you might evolve the game in that time? I'll say next year, two years time. Yeah, it's a bit of development time, isn't it? So, first of all, I want to make them more reliable and not fall apart. Those are two kind of quite important things. Evolving the game, I'd have to ask for ideas on that one. I do want to put some puzzles in the game. So, I wanted to do some things where you have to visit certain sequences to unlock certain stuff. So, you have to, for example, if I can plan it well enough in advance, you have to write out a certain symbol or letter and then your team will get a bonus point and it would come up that you've unlocked something from the scoreboard. I also wanted to, and again, there's a few things. I wanted to add a badge app where you could register and set your name, a website that didn't happen. There's a number of bits that just haven't happened that I need to make happen so you can set your name and register. For anybody interested, you can just read your RFID card on a mobile phone, look at the UID and figure out which player is you on the screen. But yeah, those are things I'd like to do. Oh, and team names. Red, green and blue is a bit boring. I mean, I'll put it out for people to vote on it so we're boating the boat face, whatever people come up with. Yeah, there we go. I've got ideas, please let me know. Oh, and one thing before I forget. I have set up a GitHub repository which I will be uploading to at the moment it's empty. But it is, if you just search for Orbs game, then you will find it on GitHub. Any more questions? Nope, okay. Oh, thank you, Mike.