 I don't think you'll be able to turn in these months. I'd rather have it not tilted, but one side. Yeah, sorry, the resolution's a bit off. That's great now. Okay, hi. Can all of you here? Great. Okay, hi. Thank you, King Wing. He spoke about this topic a while ago, and then he graciously infected me down today. So I'd like to talk about hacking the PIXMOB LED band. And I was just wondering, have you guys actually seen this band before? Did you all go to the NDP last year? Okay, this is the LED band made by PIXMOB, which was used in last year's NDP. And this is really cool because everyone in the audience becomes like a human pixel. And then at certain parts of the show, you'll light up in a certain color. And this is a used band. I changed the batteries out. So if you've been to the show, you'll realize that it's in this motion mode. And during the show, it will actually light up like this, your turn blue, or whatever the color is. So my motivation for doing this running custom code on this PIXMOB thing is because of this micro-bit, which is this tool. I would say it's a board, it's a tool for teaching and introducing programming to kids. And I noticed that primary five students, they go down to this event and I was wondering if this could be like this learning tool for all of them. So this was my inspiration. But yeah, there were some issues around the way which you will talk about later. So we look at the hardware first. On the back of the board, you have this battery, three-volt battery and a vibration switch. When you shake it, it closes and you have a connection and then this lights up or something. And then there's an infrared sensor at the Li-8 kHz, RGB LED, I squared CE from, and the heart of the board, the ABOF MC81F4204. So this board, MC81F4204, it's a mouthful. I'm going to just call it a chip. It's quite an exotic part. It's made by ABOF, a Korean company. It's got 4K flash 192 bytes of RAM and uses this very exotic architecture which is the A10 core. So there are very few peripherals on this board. There's no serial as we like to call it. And you can only use the proprietary compiler and they sell a bunch of very hard-to-find ISPs to program it. So the big question, can it be reprogrammed? And the answer is yes. So I actually have a bunch of things here. I programmed this to be an infrared detector. So when there's infrared, it actually lights up like this because I think we are all used to taking our phones and checking for infrared. But now the filters are pretty good, so it's a bit hard to do that. So this is quite convenient. There is also this shake-to-blink. So yeah, you shake it and it blinks. I guess it's useful in a rave party or something, but I don't really have a use for it. It's just cool. And yeah, these are some ideas of what you can do when you can reprogram these boards. So I'll talk about what didn't work. I think it's quite an interesting journey as well. So the first thing you have to do is to find a programmer because if you don't have a means to flash the chip, then it kind of defeats the purpose of going anywhere. So the datasheet is 155 pages, but it doesn't say anything about programming the chip. And then I was hoping that some of them might have done the hard work already, like an open-source programmer or something. And there's this guy almost there, but not quite a Leo, a kilo-kilo-6 bravo, what, something. It's not on the radio, sorry. He made this programmer, and it's very similar, but not quite what we're looking for. It just didn't work. So unfortunately, this was a no-go. Then I tried to reverse engineer the A-Bofs tools because they have an ISP software, and then there's a chance they might be using, like, you know, FTDI chip, and then they did bang it from the whole site, but nah, it didn't happen. So unfortunately, it didn't work. But the chip ID is there, so it just confirms that the previous slide doesn't work. I went to try to buy a programmer or online, as well, Aliexpress, emails and things like that. I sent a few code emails, but none of them reply. I even sent it in Chinese, but yeah, in hindsight, I should have done it in English because maybe it looked more credible as an international customer. But maybe my Chinese was bad, I really don't know. So the funny thing is, when you go to A-Bofs website, if you switch it to Chinese, they have an official Taobao store, and if you go there, this is the only programmer that works for the MCA-1F4204, and it's $203, so it's quite expensive. Put it to perspective, I could buy a flight to Seoul. One way, yes, there's air reserve, but it gets me there. So what worked? I bought a flight to Seoul, and I visited the A-Bofs office, and I didn't know what to expect, so I explained to them what I wanted to do, and I wanted to buy a working ISP from them. So they were super friendly, I thought they were going to Broadcom, or something like that, but they were really friendly. So they told me, number one, that you can't buy a compatible ISP anymore because the chip is at the end of life and they don't stock the ISP anymore. So they gave me a lot of advice and told me about a chip shortcoming. So the biggest issue so far that I understand is that when you try to flash it a few times, the flash dies, it just dies, it doesn't work anymore. So yeah, they told me about that, and I was surprised at how forthcoming they were with their issues. It's, ooh, cool, okay. They were very helpful, and I would recommend them, I mean, I'm an individual, just going there, I'm not a corporation, and they were just really helpful. And the best part is they actually gave me the programming data sheet. That's exactly what I was looking for. So it tells me about timings, the functions, the signal diagrams, and I guess to take away is if you ask them nicely, they might give it to you. So amazing. Okay, so building the ISP. When I got back to Singapore, I started work on this. When we want to flash the ISP, we want to flash this board. There are a few test points, so zero data, zero clock, nine-volt, and the power. It's something like SPI. It uses a bidirectional data line but it's a bit like SPI. Then you have to apply nine-volt on the reset pin to program it, and that's the only part that requires special hardware to generate and switch this nine-volt signal. So with that in mind, I developed this open-source board. I call it ABOF ISP. It's not a very creative name. It stacks on top of this Arduino Pro micro and it's built, of course, in mine. I can build this whole thing for about 15 years, this shit. So what it really does is it generates nine-volts and allows you to switch the nine-volts and it's quite flexible because in hindsight, I realized I can swap that out with a nine-volt battery and if you really want to, you can use your hands to control the signal if you really wanted to. Yeah, so ISP firmware, it's quite straightforward and it does everything for you. You don't have to worry about it. And the protocol is also very straightforward. I think if you're using AVR, you'll be used to this thing called use-bits. You have this thing called configuration byte, which is in square brackets. You send it in square brackets and send the firmware down in curly braces and when you're done, it uploads it for you. So building a firmware, this is the only compiler you have for it and it's free, but proprietary. It sounds a bit funny. I can't phrase it better and it reminds me a bit of Visual Basic 6. Yeah. And I think us as, oh, it's a bit dark. Us as hardware developers, the first thing we usually do is to try the Bling firmware and so this is the Bling firmware for this fixed mode thing. It blinks the rate LED and I try to relate it to Arduino. You have to implement your own delay function because there's no delay. So I just waste a lot of cycles there. Then, yeah, otherwise it's about the same. You just have to manipulate the ports directly, like AVR. So if you compile that, you'll get a bunch of files and the one I'm really interested in is the hex file, which is the firmware and the SREC format, the Motorola SREC format. So if you take this and then you put it down a programmer, I put it down a programmer, you will get the blinking LED. So before we do that, I thought I'd just go a step further because I want to make the development process a bit more familiar. So I ported it to the Arduino IDE and yeah, it's a common ground for, I think quite a lot of us here, but I would say it's not stable. Please don't use it for anything serious. I wrote here it's not stable, it's not reliable, it's not web-scale, so don't do that. Oh, I'm running out of time. So I just go through this and go straight to the programming part. So this is the ISP itself. I don't know if you guys can see it here. Oh, all right, okay. Okay, I'm going to open the camera and bring it here. It doesn't really show up. Okay, so this is the programmer itself. It's a bit dark, so you can't really lock well. And I have a carrier board somewhere. I think the camera is a bit dim, so I'm just going to hold it up like that. This is the PIXMOP itself. I've soldered a bunch of 30-gauge wire to it so that I can program it. Yeah, so it's here, and this is the ISP. So just to make sure I'm not cheating you guys, it's the real deal. You can pass it around later. Yeah, I think I'll pass it around later. Yeah, okay, it's blue now. It's the real deal. So I'm just going to put it together like this. So I have my board like this now and there's no ID. It's on my... Okay, it looks like this. I think most of us are used to this. Okay, so this is the A-Boff. I ported it here and the processor, the clock, and the flash lock, and the footage resets up. They're all here. So what I do is I connect it to my ISP and hopefully it works because this is a fresh board. I didn't upload it because once I override the original firmware, I won't have it anymore. So I'm just going to upload it and I hope that it works. Ah, okay, so it's programming now. And it's done. So it's blinking in three colors now. Just to make sure that I'm not turning on the LED with this microcontroller, I'm going to pluck it out and then I'm going to put in this battery again. Yeah, it still works. So yeah, it works. I'm surprised that it works. Yeah, so unfortunately, I'm a bit short on time so I'm just rushing through a bit of this here. But what we have is custom clock execution on this LED band and I couldn't be a micro bit or rather it didn't make sense too because if you're going to buy a microcontroller, it doesn't really make a lot of sense. It just sticks to the Arduino itself. And the files are all open source. It's at my GitHub. And hopefully in the future I might be able to talk about dumping the firmware. It looks promising. I haven't got a chance to do it but it looks promising. So, yeah, it's been quite a bit of talking here. It's my first time here but I want to say thank you all. It's nice talking to you all. You're a really nice audience. And if you have any questions, oh, I don't have any time. Okay. I guess you can shoot me a tweet or something at jg.com. I'll try to answer you as much as I can. Yeah, but thank you all so much. Take care. At the end we'll have a lot of signage. Okay, great. We'll be seeing you soon. Ah, okay. Right. Sorry. Okay, so...