start	end	text
0	1280	Hi, everybody.
1960	9220	I got to warn you in advance, if you're expecting a very serious AI talk about vibe coding, this is not this talk.
9220	13660	This is a deeply unserious talk, I have to tell you in advance.
13920	15700	But I think it's kind of fun.
15700	21220	So welcome to vibe school, making dumb devices smart with AI.
21260	32320	My name is Katie, also known as Insider PhD, and I am a YouTuber, I'm a security advocate, which means I have a really fun job of just going to a company and telling them, by the way, do you know that security is important?
32320	33220	And they go, yeah.
33220	36040	I'm like, great, can you buy the product my company sells?
36320	37960	I work for Semgrep.
37960	42060	So I am very new to hardware hacking.
42100	45100	So this is my first and most recent project.
45100	46580	I'm very proud of it.
46700	51140	It programs eink labels for me for my 3D printing filament.
51140	61880	I designed everything from the box to the little thing on the bottom and all of the little parts, including cadding them, and it worked.
61880	68420	And off of the back of this immense achievement, I decided I'm good at this.
68780	74420	Now, something I want you to keep in mind as I talk about this is this thing my partner said.
74500	81980	So when I started to take up electronics, he said to me, it's expensive to be bad at this, huh?
82020	85320	After I tell him I need to make another order on AliExpress.
85460	89740	And I want you to remember this throughout the presentation, because this will come up.
89740	91420	There is a test at the end.
91640	93720	I'm pretty sure you know what the answer is.
93720	94960	Now, I'm British.
94960	96320	I live in the U.K.
96700	98440	We all look forward to summer.
98440	100420	The rain gets warmer in the U.K.
100420	107720	And to be honest, in the U.K., you really can't join topical conversations unless you are very informed about the weather.
107720	109640	Heat wave, moan and complain.
109840	111740	Rain, moan and complain.
111980	113980	Ice, moan and complain.
114180	116320	Snow, guess what?
117000	120000	Grey, but it doesn't actually rain yet, moan and complain.
120140	121720	Brits love talking about the weather.
121720	123920	It's the first thing we do whenever we do anything.
124120	129540	So in order to join this hot topical conversation, I want a weather station, right?
129540	131180	I want a smart weather station.
131180	136520	I want one that fits into my home assistant, because I'm really into my smart home stuff.
136760	144380	And I look at the price of these and I'm like, jeez, 135 quid, that's a lot of money.
144380	147640	And again, I want you to remember it's expensive to be bad at this.
147640	164260	So instead of ordering the 135 pound weather station that I know works with home assistant and that I know will work with everything else, I decide my order is going to be for, one, a radio weather station with these little sensors that talk to a base station,
164260	165860	and an ESP32.
166260	168220	So here's the plan, right?
169360	173920	We're going to get AI to do it for me, because I'm not going to do it.
173920	176420	So one, define my goal.
176500	177880	It's to make a weather station.
177900	180080	Two, get AI to do it for me.
180420	184320	Three, for profit.
184640	188640	So my AI of choice in this adventure is Gemini.
188640	190180	There's a few reasons why.
190220	194960	One is because it can use the internet as sources and it's less likely to make stuff up.
195240	197880	Now, is it impossible for Gemini to hallucinate?
197880	198640	No, of course it's not.
198640	199980	It's going to make stuff up all the time.
199980	202760	But it does use the internet, so that's slightly better.
203420	205500	It can generate code pretty well.
205920	209520	It supports deep research to research presumably deeply.
210120	214640	And it comes free with my subscription to my smart doorbell.
214640	220140	So if I want to have the smart doorbell, I may as well use the thing I already purchased.
220800	223780	And so the way I started is by creating a gem.
223780	229920	So a gem in Gemini allows you to kind of customize the output of Gemini by feeding it stuff.
229940	231560	So you get ten files.
231660	234360	So I was like, what ten files are going to help me the most?
234380	236060	And I picked these books.
236060	240180	So I picked Eugene Lim's from day zero to zero day.
240180	242160	That's about hacking stuff, right?
242240	244180	Zero day is probably relevant.
244180	247800	Practical IoT hacking sounds practical and relevant.
247800	250160	Hacking APIs by Cory Ball.
250660	254080	The hardware hackers handbook.
254080	259040	Some ESP stuff and some other stuff about programming in C.
259420	264200	Now, I had to give it a I had to give it instructions as well.
264200	267140	So it started with you're an expert.
267140	274240	You're an IoT and API security expert, which it kept reminding me of every single message.
274240	278740	As a cyber security expert, as a cyber security we get it.
278740	279740	You're an expert.
280200	282280	So what are the rules?
282280	284180	Here are the rules I come up with.
284180	285160	Gemini only.
285160	286760	No Googling anything, right?
286760	289180	Like if we have to Google something, we've cheated.
290120	294880	AI generated code can be debugged by a human, but also by AI.
295700	298580	I can buy parts, but only what Gemini tells me to buy.
298580	301920	If Gemini tells me to buy the wrong thing, well, sucks to be me.
302520	307240	And I can include libraries, but again, only what Gemini tells me to do, right?
307240	309100	No thoughts, just vibes.
309100	310700	Like that is what we're going for.
311320	311780	Okay.
311780	313740	So step one, what is the first step?
313740	314800	Great question.
314880	316360	Gemini, what's the first step?
316360	318220	So I started with deep research.
318220	326200	So if you've never used this in Gemini, it basically tries to create, like, a research report around your, like, projects.
326200	328420	And this is how it develops it into an action plan.
329220	332880	And it will kind of turn it into, like, a step by step.
333060	337220	Honestly, this took, like, so long, and I should have just Googled it.
337400	338880	It was not great.
338880	339820	And it took forever.
339820	341220	I was sitting there being like, is it done yet?
341220	341700	Is it done yet?
341700	342220	Is it done yet?
342220	343100	Is it done yet?
343520	344440	So here's the prompt.
344440	345320	Here's what I said.
345760	359800	So I want to complete a project to combine my specific radio weather station that will come up, an ESP32C6, again, very specific, that's the one I had, via Zigbee, because that one supports Zigbee.
360620	364740	Identify what needs to be done, what the deliverables are, any sources that will be needed.
365760	371860	And then, you know, I said, can we also include steps to implement the ESP32 at the main hub weather station?
371860	375300	And I started with the sniffing SPI lines.
376480	382160	And they basically ‑‑ Gemini told me, you idiot, why are you sniffing SPI lines?
382160	384520	You can do radio frequency.
385460	389620	Don't worry, this won't be actually the first time Gemini insults my intelligence.
389620	391560	It does it multiple times.
391680	393140	So, okay.
393140	394240	What's the result?
394260	395740	There's a lot of steps here.
395740	396600	There's a lot of text.
396600	398420	It just produced a really long report.
399100	401360	I'm going to keep it for reference.
401500	403400	But, like, this is too much.
403660	409380	But it's okay, because we can get Gemini to turn it into a TLDR, which is what we do.
409820	412180	Please turn it into, like, five steps.
412180	416300	So, one, we're going to capture the weather data with an SDR dongle.
416300	418980	Didn't know what that was, by the way, when I first started.
420060	422100	I'm going to have a receiver.
422400	424760	Again, sure, I guess.
424940	427340	Get it working with Visual Studio Code.
427340	428320	Get it working with Zigbee.
428580	430820	Problem solved, right?
432140	439200	Here's the slight problem here, though, because the ESP32 needs to be configured before we add a receiver to it.
439200	442000	So, I corrected it and told it it's wrong.
442000	442700	So, it's fine.
442700	444060	We got it fixed.
444160	445440	And then shopping time.
445440	448220	So, I bought everything they told me to buy.
448540	452320	Again, it's expensive to be bad at this, huh?
453880	458240	You will very quickly see what the end result of this is.
458240	463100	So, step one, capture weather data with an SDR dongle.
463100	467520	So, dongle check, software check, knowing how to use it.
467520	468000	Like, no.
468000	468920	No idea.
468920	472900	But it created these nice pretty pictures and I assumed there was some data coming out of it.
472900	473900	But it's okay.
473940	476120	Because it told me what to use.
476120	478640	So, I looked at the analyzing signals.
478740	483100	I get a little screenshot and it's like, yes, correct, it is working.
483560	486300	And it was like, now you have to use RTL433.
486480	488540	And I was like, okay, great.
489140	490220	What's that?
492080	493560	But it decoded it, right?
493560	494780	So, yeah, we got this.
494780	495140	Okay.
495140	495660	Cool.
495660	496140	Right.
496140	498320	So, then we have the packets.
499340	499940	Wow.
499940	500440	Okay.
500440	504180	So, I tried to like it's explained to me what the packet structure was.
504700	511180	And I was looking at GitHub and it was like, hey, you should check out GitHub to see the implementation of this.
511180	512440	And I was like, is that cheating?
513540	517320	So, I did get the information and I sent it the source file.
517320	519580	I said, here, please extract the packet structure.
519960	522120	And then we set up Visual Studio Code.
522300	526220	Then we gave up with Visual Studio Code because it was not working very well.
526260	530940	And then we went back to good old fashioned Arduino's IDE instead.
531740	535400	It would turn on like this, but it would do literally nothing else.
535520	536700	So, throw that away.
536700	537620	That doesn't matter.
537840	539100	Where do we plug everything in?
539100	539520	Okay.
539520	543180	So, I ask it, here is the schematics for the dev board.
543200	544360	Where do I plug stuff in?
544360	546500	Again, I don't know how to do electronics.
546540	551600	So, we're vibe soldering, vibe electronicsing.
552020	554640	And I said, here, tell me where to put it in.
554660	558320	So, I put it in and it was like, hey, this is where you put the antenna.
559220	559920	Sorry, what?
559920	561260	I didn't buy an antenna.
561260	563120	Do I need to buy one of those on Amazon?
564600	567300	I then learned that I could make an antenna.
568180	569100	Good day, right?
569100	572020	We don't need to buy another Amazon purchase.
572020	576640	Instead, we've just got a piece of wire that I stripped and I kind of turned upwards like this.
577500	578420	So, great.
578700	578980	Right.
578980	580380	Then it came to the packet structure.
580380	586160	So, I gave it the structure that I had found and I said, here's the file, please extract the packet structure.
586660	590120	And this took a lot of prompting.
590860	592820	This was an absolute nightmare.
592820	595820	Like, I cannot tell you how broken this was.
595820	597320	It could not decode it.
597320	600260	Like, it doesn't matter exactly what I did.
600260	601700	I just couldn't do it.
601700	605600	And I was like, okay, I got channel one to work, channel two doesn't work.
605600	609860	And it was like, okay, I got it to work a little bit and then there's not enough data for the packet.
609860	613140	And I'm like, nope, not working, still not working, please fix it.
613680	623100	And the sass I got, my God, what a cheeky, it was like the amount of sass of you are absolutely correct.
623160	625920	Your observation that this is not working is correct.
625920	628700	Like, I can see that it's not working.
629260	634420	And when I tried to help it debug its code, I was like, hey, can you try this, this, and this?
634420	640620	And telling it what was wrong, it was like, no, you are wrong.
640620	640960	Okay.
640960	641240	Right.
641240	642720	Well, it then sent me this.
642720	645800	It's like, please upload this final sketch to ESP32.
646080	650860	When our weather station transmits, you should now see the fully decoded data printed in the serial monitor.
650960	652160	It's a very bold claim.
652160	653420	Was it correct?
653460	655540	Oh, actually, yeah, it was actually correct.
655540	656460	It worked.
656460	659160	And I was like, yes, sorted, done.
659800	663700	And then this was the final decode algorithm.
663760	671300	It was essentially like the InafiniFactory C from the RTL433.
672320	676140	And it just, like, it was literally the same code in Arduino.
676280	677260	So, perfect.
677260	678040	Sorted.
678160	680260	I then let AI take the lead.
680260	686340	You know, I said the problem why it wasn't working, maybe it was the loop.
686340	687940	It was going a bit too fast.
688080	691040	And there were some quirks here to, like, get it to work.
691340	698160	Often when it comes to working with AI, you have to get it to regenerate its whole code from scratch all the time.
698260	702580	Because you, like, as soon as you touch it, it forgets how to program.
702580	703420	It's like, I'm done.
703420	704520	I'm out of here.
704520	706360	Like, I can't do this.
706380	716440	And every single time, and I've made this mistake multiple times, over many projects, by the way, as well, when code worked, I didn't actually commit that anywhere.
716620	720080	So, what would often happen is it would give me working code.
720260	722360	It would break something on something else.
722360	726500	And I have to go back to the working code and remind it, hey, this is the code that worked.
726820	730860	And it doesn't quite understand how its code becomes, like, output.
730860	733340	So, it can't really debug things.
733360	735920	And this eventually got to this state.
736040	737980	I understand your frustration.
738060	739880	And I sincerely apologize.
739880	742920	The custom code that has been so unreliable.
742980	756460	We have reached the point where the problem is no longer a simple bug, but a very difficult timing and signal to noise issue that is extremely hard to solve reliably on a microcontroller with this type of receiver.
757020	758120	Challenge accepted.
758120	759400	I don't give up.
759480	760740	Why did it work?
760740	764020	Well, it turns out it was working when it was printing stuff.
764100	780900	Now, what was happening is because I was printing to the serial port, it was slowing down the loop enough that it was able to actually, like, slow it down so it could not be milliseconds between each packet capture.
781040	783380	And then I told it that it worked.
783400	786080	I don't know why I told it it was working now.
786080	787780	I just wanted to show off to it.
787780	790260	I was like, you gave up, but I didn't.
791080	793360	And, you know, it said I nailed it.
793720	794680	Thanks.
794680	795640	I did.
795640	798020	I have a degree in computer science, by the way.
798520	801860	And finally, we have it working.
802180	803960	Can anyone see the problem?
804520	808420	They were right next to each other and the temperatures are completely wrong.
808880	809140	Okay.
809140	812220	Let's not worry too much about the weather station being broken.
812640	813360	ESPHome.
813360	824380	So, originally my plan was to use ZigBee on the ESP32 and use the existing Sky Connect little dongle that I have that I've already used in my ZigBee Home Assistant.
824700	826320	And AI talked me out of it.
826320	827920	Because I was like, I really want to use ZigBee.
827920	829560	And it was like, no.
829980	831540	No, don't use ZigBee.
831540	833300	Use ESPHome instead.
834060	838700	And also, at this time, it was like, you are not capable of doing this.
840620	841420	Wounded.
841420	841700	Right.
841700	842580	Let's keep going.
842580	846220	So, then it started arguing with ESPHome.
846220	850260	When it came to, like, generating the config files, this took a while.
850260	858720	Here is a lovely screen, like a video of my chat with it trying to, like, actually get it to generate the config files correctly.
858840	861020	I thought it would be cheating to do it myself.
861020	864180	So, I thought, well, I'm just gonna continue to use AI.
865060	869620	And I had to tell the AI, can you read the documentation, please?
870940	876600	I've got to say, like, the more I was working with AI on this project, the more angry I was getting at it.
876600	880560	I was genuinely becoming quite abusive to the poor little AI.
882340	886880	And, like, I really struggled with the YAML configuration.
886920	890920	So much so, I then ran out of time on the good coding version.
891460	894660	So, it took four or five hours of prompting.
894700	898400	And this entire time, I was thinking to myself, it's just YAML.
898460	902740	Like, would it be cheating that much if I just did it myself?
903320	906180	And I decided to commit to the bit.
906180	914560	And I was like, nope, I'm gonna keep going, I'm gonna keep going, I'm gonna keep going .
914740	919460	My ESP32C6 does not work for the ESP home and that was the problem.
919500	929240	But finally, finally, it's finally happened that I did the thing that wasn't gonna work, but I had the parts for it.
929240	931000	I didn't have to buy anything.
931300	934460	So, I had another ESP32 lying around.
934500	937000	So, I just switched it out and then it worked.
938260	939200	And there we go.
939200	941900	There's my final hardware configuration.
942040	945180	You can see it has all of, like, eight wires.
945640	947780	This took me several days.
947780	948480	Okay?
949200	954720	I cannot tell you how much my soul left my body for this project.
954840	957620	And the temperature sensors are also, like, wrong.
957620	959120	They're completely wrong.
959480	962280	But here it is in all its glory.
962280	964100	The final output.
965060	966780	Over a second.
971860	979260	Unfortunately, over a second, you can see channel one has massive temperature fluctuations that had absolutely nothing to do with me.
979260	980220	Channel two was fine.
980220	981500	They were next to each other.
981560	985020	Unfortunately, the weather station, it's broken.
986820	988000	Wait a second.
988140	989580	Why are the temperatures so different?
989580	990600	They're right next to each other.
990600	992160	They should have the same value.
992820	994620	Yeah, it's expensive to be bad at this, huh?
994620	996620	Because I bought all of those parts.
997140	1000660	And I had to just buy one anyway because it didn't work.
1000980	1002720	But it's expensive to be bad at this.
1002720	1010080	I encourage you, should you have the disposable income to give IoT hacking a try, and why not get Gemini to do it for you?
1010080	1011320	You can vibe.
1011320	1015360	You can enjoy it while the rest of us break into tears.
1015360	1016980	Thank you very much, everybody.
1023920	1027700	I have five minutes for questions, if anybody wants to ask questions.
1027700	1028740	Yeah, go for it.
1035210	1036930	2.5 pro.
1039410	1049150	Honestly, though, I also not included in this because I was getting, like, chat GPT to check Gemini's work because I wasn't sure exactly which one I'd commit to in the final presentation.
1049430	1052410	And actually, I did find that Gemini worked better than chat GPT.
1052470	1055050	But I don't have, like, a subscription for that.
1055050	1057250	So it's literally just because I had the Google subscription.
1057330	1058290	Yeah, go for it.
1061850	1067150	So I think it's probably just because there's probably less in its training data, likely.
1067790	1073330	YAML isn't really, like, especially ESP, sorry, Home Assistant stuff.
1073330	1074930	It's so specific.
1074930	1082570	And it's so specific to, like, your configurations that I wonder if it was just that actually it didn't have any training data.
1082570	1085050	So it was essentially hallucinating what to tell me.
1085050	1086650	And just guessing.
1086690	1088530	Though, to be honest, I don't really know.
1088770	1090270	Not included in this.
1090270	1098310	But one time when I was actually playing with the YAML, I managed to break Google Gemini and have it output, a bunch of absolute garbage.
1098450	1100430	I think from its training data.
1100630	1102090	And I could not replicate that.
1102090	1105310	So I was gonna submit that as a bug to Gemini.
1105310	1106690	But it didn't work.
1107230	1107790	Yep.
1114950	1119710	So if I'd done that, I probably wouldn't have spent four to five hours prompting it.
1119790	1123330	It's that kind of ingenious that vibe coders are missing.
1123570	1124530	No, I didn't.
1124530	1127490	I mean, part of it is also because I didn't want to cheat too much.
1127490	1130210	I wanted to try and get the AI to do it on its own.
1130210	1133990	Because I thought it would make a funny talk more than anything else.
1134570	1149970	But, yeah, I would suspect that if you were doing this for real and actually trying to get this to... you're actually using it as a coding buddy, a kind of emotional support AI as you're working on electronics projects, that would probably be a better approach.
1151250	1151770	Yep.
1156890	1160890	I think it would have been more effective, yeah.
1160890	1165930	If I just sat there and spoke to the duck and been like, please help me with my C code.
1166030	1167130	Yeah, probably.
1167710	1176230	Honestly, AI... what made it so convincing was this project I showed at the start.
1176230	1182350	So a lot of the UI for this was vibe coded, because I wasn't really familiar with this touchscreen interface.
1182530	1184810	And I was trying to load it from an API.
1184810	1187570	So my background is in web development.
1187850	1191530	So I was like, okay, I'm gonna make it a RESTful API.
1191750	1195970	So this gave me a lot of hope that AI would be good at something.
1196070	1200850	Unfortunately, if it doesn't have an API, AI is really bad at it, actually.
1202210	1202530	Here you go.
1202530	1209210	There's my thing here of having my little tags update.
1209830	1212510	Again, this gave me a lot of hope that AI would be good at this.
1212510	1214770	And that was dashed very quickly.
1217050	1219130	Any other questions?
1220110	1220790	Yep.
1223170	1224790	Sorry, can you say that a bit louder?
1228250	1230330	I don't know, to be honest.
1230330	1236750	I feel like it did simply because it knew that radio frequency analysis would be the best approach.
1236750	1238830	Because I didn't know that at the start.
1238830	1241850	Radio frequency analysis was very, very new to me.
1242390	1247550	Actually, the first thing I did when I got one of the dongles, okay, it's time to listen to air traffic control.
1247730	1250030	Because I learned that's what you can do with it.
1250090	1252830	But I didn't know it was a thing.
1252830	1266330	I was fully intending to open up the main body and then go into the SPI lines and get the data from there and hook something onto the back of that PCB, rather than the approach I ended up doing, which is going for the radio frequency analysis.
1266450	1268210	And it did tell me it would be easier.
1268470	1272750	And of course, I didn't have the skills to do the other one, which is probably right.
1274670	1275470	Yeah?
1280220	1282280	Do you want to see the code?
1282640	1284080	I will.
1285560	1286460	I'll upload it.
1286460	1287320	I'll upload it tonight.
1287320	1287620	Check my...
1295750	1298910	Oh, and see what I could improve on.
1303040	1305180	I was getting so angry at Gemini.
1305180	1307800	I don't think I would have the patience for another AI.
1308540	1310860	I cannot tell you, I was getting genuinely angry.
1314260	1316260	The ship of Theseus.
1321190	1322510	It's a good idea.
1322510	1328270	I'll put the code up on GitHub if people want to have a go and see if they can ship a Theseus, my code.
1328270	1329170	You're welcome to.
1329170	1331790	This, actually, this vibe coded project is on GitHub.
1331790	1335290	It's in a GitHub gist under my username inside a PhD.
1337690	1338230	All right.
1338230	1340270	Thank you so much, everybody.
1345150	1346930	Enjoy the rest of the conference.
