 Ong, an automated dispenser. So an automated dispenser Honesty has been done Before, although a bit more of a Main team member is literally trying to involve me And a guy who prefers to be known as He as a He's a shaggy, let's just say that already. Okay so, well There's a lot of steps involved in this path to madness And you can get the slides here And you get the code there It's a github thing Blah blah blah And Yes, as I said, this is not a new project If you have been following YouTube, you know, SexyCyborg Has built her own automated dispenser That pretty much inspired this public project Now unlike SexyCyborg's dispenser Which includes conveyor belts and the whole She's just very simply focused on one aspect Which is dispensing itself, you know So the dispensing Without further ado I will let and actually explain it You're selling? Once it's fully refilled, there's nothing Not even how much you play with it Now once it's down, it's just going to down to 100% That's it Done And it's going to reset again Okay, so yeah It's a pretty simple mechanic, you know It just depreses the valve It releases the shock Let go, we refuse to shock And then you can depress the valve again So That's resilient So yeah, so we started with Very quick prototype We built the pumps to depress it Suddenly you will take the valve to depress it So instead we have to pump to depress it instead And we tried it out with A digital power supply And we go further to Parts of space Yeah, we were lucky on the first try So it's done, same Now I'm hoping on here, look at it here So it's not breaking it It's pushing it just nice So yeah, button the shaky camera Because I was the cameraman, yes Yeah, and shaky hands, you know Comes with the territory So okay So what you see is actually literally This particular motor So this is actually a travel motor If I remember correctly That we salvaged from somewhere I still have no idea How we managed to find it But we did find it And one thing that you notice about this And if you look at the code Is that we took a lot of things and efforts Trying to make sure this thing Did not break this thing The plastic valve itself Because Sadly, after we did this A beautiful first try Everything was perfect The second time we did it We broke the valve Luckily we still had 4 more to go with You know So yes So now what if we Make some control I mean, we have got the motor It works, you know Of a student project already Yeah So in this case The theory is very simple Your DC motor That really works Of polarity To change the direction So if you apply polarity It would spin Convise you apply it The reverse polarity It would spin any direction So This jeff is just to highlight that The theory So what we have is That we had Mimos And we started plugging in The motor controls in 2 channels And then after that Through the motor driver The H-bridge motor driver And then we had the Mimos to control How we want polarity To change And the code Very simple As I said, it's really, really, very simple In fact, that's why we had the first talk It can help ease it And then later point you already up Okay So this If you have been doing Walking with Arduino code You should be familiar with this So we started by Setting up our motor pins So that if we ever Have changed in CCR Okay, rather than hunting through For all your code scope So Sorry, magic numbers So the code is very simple Digital write, digital write Apply high low Then when you want to stop Low low So you kill the entire motion Then when you reverse direction High low Reverse it Same thing, you cannot stop So This was what we did For the marriage first prototype And if you go into the Give-up page That you link earlier You'll notice that our code is a bit different We started working with What if Look So what we did with the BHT Stope the one go down I became move in microstats Because Ya, we talked about So that's where One differences begin to code So when you look at the code You'll notice that It's different from what you see on the slides Do what we Hopefully you can figure out What the differences are Okay So Now So That was our second step And our half of man And as we had Actually made ourselves Nice good controls That work only if you know The magic code Right You run the code and then you Trigger So how about if we made The trigger completely wireless Ya By actually having it Over HGTP So In short If we can trigger it Over the internet And in this case For a lot B-MOS Beautiful thing is that It comes included It comes included With an ESP 8266 Wi-Fi module So 8266 Wi-Fi module Is that It's Wi-Fi ready Ya Not only to go by another Shio 2.0 Or experience-sensitive By doing a board It can't give it So How to And Trigger Set up your Wi-Fi That is simply you need to include this Well 3 libraries With a 4th library That we would recommend But Comes with a lot of things So The first 3 are what you need To actually set up The module itself And the last one Is what we call Arduino OTA Over the internet OTSS for Over the internet It allows you to actually update The code In your Controller Without having to plug it in Through your USB cable But anyway I will Provide some things As well To For those who are interested in taking further it At the end of the Presentation So initial code to get started right If you see That it's actually boilerplate code Ready to copy and paste Link Right here Okay Or you can just type out This entire long Long string Okay But okay Anyway Care-wise for The Wi-Fi Is that We are going to build A Wi-Fi server And it's actually going to hold a web page And on the web page It's going to contain Button Button to trigger The dispensi So in short You have Created 50 65 IOT solution You know Where you press a button And something happens Yeah So this Code Can be Re-applied For whatever you want to do Okay So In this case When you look through the code If you're lost There are two things you just need to know There are two key parts One is that There is the Part where we actually Initialise the server So Wi-Fi server server And 80 Is actually the default Pod That you open up For your Wi-Fi server And the second part Will be the code itself So the code For all within this Sub-function pod Void Wi-Fi server So code And sub-function code here Now specifically For this Dispenser There is actually One way That we did the trigger condition Basically every time You click a button It actually loads a page That includes Append A string of text The string of text is Dispens equal start And What happens every time We run the code Is that It always checks For All the text within the string And it checks for This particular string itself If this string exists It will start The testing function Simple Okay Right So, ya HTML code Literally It's built Through the Wi-Fi server It's actually within that Void Wi-Fi server It's entirely Printed In HTML code And Took it You know Line by line Literally Hard-coded Website And Ya The triggers Essentially You will see that There are Two triggers One is a Hypertax And the other is an actual button A phone button Which you will see Very soon And Ya Based on that Ya, we Also I will go and jump So Based on that I just show you the Website itself So Where's my website? Ah, there you go So How do we get to this point? So Ah Oops Suddenly I lost my page How do we get to this point? So, first thing first is that I need to give it Wi-Fi So If you go in Our Vending sponsors Have given us a very beautiful Password WW Guest And do the hustle Beautiful So Internet And I created myself My hotspot And with the hotspot You'll notice that It's already connected And in this case This particular Connection The Network name And the password Is within the original code That means That is actually You'll see Two initialised variables Asking for What is the SSID And what is the password Because When it tries to Connect It will need this Again, this is all part of the Initial code From earlier in the links But yeah I'm just explaining a bit Because Honestly It gave me a lot of trouble Trying to figure out What people would say When they were writing it And yeah And From here You can see the IP address And you can see This is the IP address And hopefully This works This time round So I'm just going to click the link One time out of ten It doesn't And one time out of ten It feels terribly So yeah Thank goodness Pobositi Save task So this is our Third step in our Great Journey of madness Now let's go One more step So you've got a Website And you can click Partets on it Yeah So you can do a website And apply The applications on it Okay Let's go with Voice So Number one thing There are two ways You can do Applets There is a EMPT Like photography Not easy to click this part Kind of a It's a very long stream Of text Another way That you could use Google Assistant So This one Is going to show You How you can Do it through Google Assistant So first thing First I'm giving you The reference itself This is the Creating shortcut commands So What are we actually Going to be doing So yeah Specific This is literally Copy it from The website How to create A shortcut command Using Google Assistant So I'm not going to Label This particular point Go through The tutorial In beautiful And So What happens That when you do Google Assistant Sorry When you do Google Assistant What they will ask you To compute first For your voice clip So you only need Tell it something This is the voice command To trigger the work And then afterwards They will need you To Tell it What particular command You want it to To achieve So in this case What we did Was that we told it To this particular website In order The IP address 192.168 And then After that Slash Dispens Go start So immediately You're triggered To command Right away And Just to give you An example Because My phone is too old To actually support Google Assistant I have To give you This beautiful Pre-vendant video Like a water So So So So yes Now Okay So That literally Must be the end Of this particular problem Minus And Photos were really Really curious There are Actually a couple of links As well Including like You know Getting started With RIMOS OTA Because that Gave us a lot of trouble And lastly The full documentation Is well For those who Really want to Follow us Through this Very cool And with that Thank you very much Okay