 really like working with my hands so I've been playing with the Arduino over the past couple months and have really really enjoyed it and I finally got to talk together and this is it I've never given a conference talk before I've actually never been to a conference so I hope you guys I hope you guys like it I hope the conference or I hope the talk is a big bang and works out well I work for Pivotal that I like thanking them they they're paying for me to be here and got me a hotel and everything it's really nice and if you ever want to find me I'm on github and Twitter at Austin BV so first what is an Arduino so I assume a lot of people have heard of them but they don't really know what they are they've ever actually touched one or seen one or held one so I have one up here screwed into the cannon so you can come look at it after the talk but what they are is they're a single process microcontroller meaning they're a small computer but they only do one thing and they do that one thing over and over and over again and they take the shape and form or they take a lot of shape and form so that that first one is the mini it's about the size of a thumb then we have the lily pad which is an Arduino that's designed to be sewn into clothing it's waterproof can be washed can go and scuba diving do whatever you want you have the digi spark which is a Kickstarter which is about the size of a quarter and can plug right into plug right into USB Arduino is all open source the community is is really really an open source community and the hardware on the Arduino is open source the firmware is open source the software that you used to program with your Arduino is open source and they allow for a lot of different variations but the main Arduino you'll play with and the one that's on this cannon is the UNO the UNO is probably the biggest but it's also the best for prototyping so the UNO comes with everything you need to get started with an Arduino first you have your USB you can plug right into a plug right into a computer and put your put your software right onto the Arduino without thinking about how to connect them you have power so your Arduino can stand alone you have the microcontroller which is the processor the computer that that makes the decisions and runs your program you have analog pins and digital pins the analog and digital pins are your way of interfacing with the world so what can you do with an Arduino you really can do just about everything with an Arduino people have done done tons of things I built a cannon why not people build rovers skateboards scary toilets displays and Halloween costumes all controlled by a single a single microcontroller they let you start working with your hands seeing physical seeing physical physical things change from the software you write which is really cool because I've written a lot of software I do that every day but it I'm I'm tethered to a screen and the Arduino is like taken away my screen and now I can just interact with whatever I want so I started playing with them actually to to do some home automation stuff and and just kind of like get get like temperature controls or thermometers to work turn on and off lights other other people in my office have done done similar things like opening and closing windows or turning on and off fans so you can really start like writing code that that like makes your life better not just your work day better how do you do this well you use the Arduino IDE which is also open source the Arduino IDE comes with two main features it's really a basic IDE but mainly it has a verify and compile Arduino comes with a lot of header files that let it give you a almost a DSL for C++ to write Arduino to write code for your Arduino so it has a verify and compile button and that will include all those headers and test your code for you or make sure it can compile and has a console so you can make sure everything on your Arduino is working the way you expect it to be working what this does then is after you compile your Arduino after you compile your code and you burn it onto your Arduino it's permanently there the second you start providing power to this little chip I'm not going to point the cannon down because it's loaded but the second the second you provide power to your Arduino the program on it starts running and it's permanently there you can keep replacing that program but it's permanently there until you replace it with something new so you have this one way communication your Arduino ends up being standalone it's isolated and it's small it's really cool because you can start putting them anywhere you want you can bury them in your walls put them in your yard to control sprinklers do whatever you want with them but you have to write C++ I don't like writing C++ I hate thinking about memory allocation I love slow boot times like all those things are really cool so rad is a way to is a way to start writing ruby code for your Arduino and it provides you almost the exact same functionality that you would have with the Arduino IDE but in Ruby so what does a rad script look like looks like this looks really really simple so this is Ruby you say you set a pin 13 to output you name it as an LED and then rad gives you a little blink function so what happens then is rad takes this sketch which is what you call something you put onto your Arduino and compiles it into C and it ends up looking like this it's not pretty there's statically type variables and semicolons and you know something you don't really want you don't want to play with I can't dream and see I can like start thinking in Ruby and that's like one of the things I like about that software or think like about Ruby but rad has a couple problems one it hasn't been pushed to in about two years which means no support for Ruby one nine no support for Ruby two you have to downgrade a lot of the gems that have been updated because that have been updated since then because they're not compatible anymore and then debugging was difficult for me I don't have a lot of experience with C besides college and so I had to think about how my Ruby code was becoming C and failing comp compilation in C and then come back to Ruby and figure out how to change that or change my Ruby code and so there's this like extra barrier and impeding me and so it was really tough so why not think about it in a different way why not think about our Arduino as a service so we'll just talk to the Arduino we'll put all our higher level logic everything that we want our program to do on a computer and we'll let our Arduino do what it's good at we'll let it start interfacing with hardware interfacing with the physical world reading sensors and that that's actually was like a pretty cool idea so I started looking at how to do this now there's some problems you have those three benefits of how you burn to an Arduino before what happens when you burn code onto an Arduino your standalone you're isolated and you're small well now all of a sudden we're tethered to something so we're no longer standalone and we're no longer isolated and if I'm taught if I plugged into my laptop I'm not really small anymore which now now I just may as well have a computer but the Arduino does give you one benefit over a computer you can plug sensors into it it actually has ways to plug wires into it and start talking to proximity sensors or buttons or anything like that that you wouldn't do with your laptop so let's try and get back to standalone isolated and small well first if we want to use a computer there's the Raspberry Pi the Raspberry Pi is a small computer that can run Linux Debian or actually I think people have gotten a lot more running on it but plug an Arduino into a Raspberry Pi and all of a sudden you're standalone again this thing is isolated the power comes from the Raspberry Pi and the Raspberry Pi is small enough to tuck into your wall or bury in your yard so you're now small and standalone again which is pretty pretty neat in the case of isolation I don't really care like being plugged into a computer provides so much benefit for me I don't need to worry about being isolated from that and if I can get them both small and to and self-contained and that's that's good enough everything seems to be tethered in this world already so why not why does my Arduino have to be completely disconnected so I started playing with this and I found that Node.js has really figured it out there's a lot of Node.js libraries out there to start interfacing with your Arduino why did Node.js figure this out while Ruby is seems way behind well I think because mainly the Arduino is asynchronous and Node.js is asynchronous so it's really easy to move between the two and start working with one with working for one with the other so that provides a lot of benefit Ruby is not asynchronous so there are a couple Node.js libraries or NPM packages if you want to start playing with Node and your Arduino that are pretty good Johnny five is really good it provides a lot of utility but it's mainly geared for robotics so unless you're doing robotics it there's a lot of extra stuff that you have to worry about it's probably not as important then there's Dweeno Dweeno is the one I really enjoyed and that actually helped me learn a lot about my Arduino and get going with it and they say exactly what I was thinking like why not just let the Arduino do the low level stuff while the higher level stuff can be done in JavaScript that seems pretty good so now what what Dweeno did is took all the complex problems move them up to a computer and just put a small C++ library on the Arduino that you never have to read like as a programmer I don't want to read it I don't want to think about it it's a service it's like talking to Twitter it should just do things for me I don't want to think about the Arduino so they really did do that they turned this this Node library has turned the has turned the Arduino into a service so now we have message passing between the two and it works really really well it you you can start prototyping things almost instantly in a language that you love but there's nothing in Ruby so what are we going to do without without our favorite language the language that we're all here to account at a conference for the language that we we work in every day now I wrote a gem so I implemented what I thought Dweeno would do in Ruby and I had a couple goals for the gem the first goal was I wanted to do at the pivotal way which is to fully test fully test drive and make sure that everything everything is consumed by automated tests or or covered by automated tests that was really really difficult for me because I don't understand a lot of the things that are happening between between my computer and the Arduino and the cord and the low level stuff so it actually was pretty interesting to get into and I will say the testing is lacking still there's not a lot of integration tests integration level tests the Arduino contest itself but there's not a lot of that going on so it'd be really nice if this gem could move there the other goals is I wanted this library to be really really easy to extend I wanted people there's so many there's so many pieces of hardware out there there's stepper motors from tons of different companies sensors from tons of different companies all of them have a slightly different way of reading hard or reading the physical world I wanted you to be able to write your own library or write your own classes that build upon like this this base structure that lets you interface with your Arduino I wanted to be documented there's a lot of hardware stuff out there and it's just at like the electrical engineering level of I can't understand it's just it's too difficult for me and I just like I blank out and I get frustrated and then I normally just go outside so I wanted people to to look at look at this gem look at the documentation and be able to plug their Arduino into a computer and have a light blinking in five minutes and and what really really is good about that I think is you you don't hit this brick wall and all of a sudden you just don't want to do this anymore because you're constantly getting you're constantly getting a feeling of moving forwards so you never you're never just stuck and the documentation really helped the zero startup time was also a big part of this I didn't want you to have to like grab your grab your user dev to find your Arduino and like plug in the file and deal with IO objects like that's all stuff no one really wants to deal with no one wants to think about how that stuff works how streaming works all how all that stuff works I wanted you to plug in an Arduino and hit go and that should that should be it and lastly it better be fun that's like the whole point of this right like we we program because we enjoy it and so I want it to be fun to to play with I want you to really enjoy building cannons and shooting potatoes at garages um so I began I began development by myself um and I decided I would didn't want to write any C uh so I stole from I stole from that Ecto Duino the Ecto Ecto's library Duino the C that he wrote and I just put it into my library so I want to thank him for writing a great a great base for us um for you know this Ruby gem and uh because of that I was able to get get bootstrapped in Ruby really quickly but I had a couple of problems that I faced first I'm synchronous Ruby is stuck synchronous the Arduino is asynchronous and what I mean by the Arduino being asynchronous is you don't ask an Arduino what state a button is in or what temperature it is outside the Arduino is constantly telling you that the button was just pressed and so you have to be listening for the Arduino to tell you something and it in Ruby the easiest way to do that is to just block so you just end up saying like oh I'll just wait until a button is pressed down and then I'll do something but if you want to do this in a website or a build script or something like that all of a sudden you're blocking you know incoming requests and that's that's no fun so the first thing I thought was well why not just copy like line four line the JavaScript library that I like into the event machine so that worked pretty well it started to like work and I was getting lights blinking and buttons buttons pressing and and everything was pretty neat but it didn't really look good it looked like JavaScript written in Ruby um which was a big bummer right like we want we want our Ruby to be readable we don't want it to be nested we want it to feel like feel like Ruby look at this we have newing up a board then when the board is as soon as the board is ready because when the board news itself up which is the Arduino when the board news itself up it has to like do all this communication and handshaking and then when that board's finally ready we can send it a message and we've yeah we'll leave that off for now um so we can send it a message and now we need to wait for that message to like say that it was okay and the Arduino say like okay we received the message and finally we can start a timer and that timer will run in a link a loop and we'll blink a light so that's a lot of work just to blink a light like compared to what Rad had going on like Rad was pretty pretty simple for blinking a light compared to this so I felt like it was kind of a loss so I moved to celluloid there's been a couple talks about celluloid I think there's another one coming up so I won't like give you the real scoop on it but it was pretty fun working with really it just provided like an actor pattern and a way to like push these things off to the side and not think about them and it gave me a lot of utility to to like pull up dying threads or if an exception occurs that was good but there was also a lot of overhead and as much as I like people doing work for me like celluloid I didn't need all the extra overhead so finally I decided to roll my own event loop so this actually gave me a huge win which was that my gem my gem has zero dependencies so when you gem install this you get nothing else which I thought was awesome you don't have to worry about making sure you're updated with celluloid or the DSL doesn't match and the other thing that's really good is it provides a lot of control for exception handling the way celluloid handles exceptions is not always ideal for physical like physical computing or hardware hacking maybe if my Arduino accepts I can't receive a message I want my website to die like I want something real to happen I don't want that to just like keep trying to spin it back up and it's harder to do that stuff it's harder to do that stuff with the with celluloid and it's rolled specifically for the gem so there's a really there's a really nice DSL around the event loop and tacking things into it but the same rules apply as with celluloid or with event machine you never can block it so it was nice to kind of get get that win out get that win out the door and like feel like I actually had control over my own library I didn't have to read other people's documentation so then how did it end up how did it end up I think it ended up really well I was really surprised I've never written a real gem that I wanted to open source before from from scratch and I didn't know how this would turn out I mean there's a lot of really good choices out there but it turned out really really well so first I'll just kind of talk about what it does and how you guys can get started with it because hopefully like after this talk you'll call up spark fun which is a great place to buy all this stuff call up spark fun or Adafruit and you're like hey man send me an Arduino right away I want it like tomorrow and then you just start working with this stuff because it's really fun and actually spark fun is right in Boulder so it's like a 45 minute drive if you want to get up there tomorrow you probably could make it so the board the class the board class is the physical or the programmatic representation of the Arduino so what does that mean it is the Arduino it has pins it has IO it knows how to talk to things it knows how to read things it knows how to send it knows how to look at messages that are coming into it it is your Arduino just in code and so what you can actually read through it and it like the class structure ended up looking like an Arduino almost like you have like things that you can set pins up on and you have your microcontroller and your your heartbeats and your loops and all that stuff that make like what your Arduino is like it's it's physical piece and so that's really cool so it really is like the heart of the gem it provides all of the utility it is the core but there's one thing that it doesn't do it doesn't communicate and that was a really conscious decision instead we moved communication into its own class which is the TXRX TXRX is a domain term if you've never done hardware hacking you'd probably have never heard it or if you've never done but what it means is essentially like sending and receiving of messages or input and output so TXRX if the Arduino if the board classes the heart then TXRX is probably the mouth it it's how you talk to the computer or it's how the computer talks to the Arduino and so what that did separating that out gave us some really really cool some really really cool features that we didn't see coming but the first thing that TXRX does that's really important is it finds your Arduino for you so it goes out groping your system and looking at all your USB ports and finds your Arduino and sets all that stuff up and tells the board that when it's finally ready the other thing that we do with it is we inject it so I've become a big fan of dependency injection and we can talk about that whenever you want but not not while I'm on stage but I I really like it and by injecting this I'm in no way coupled to my communication method so if someone wanted to they could write a TXRX class for Wi-Fi so you don't actually have to be plugged in so right now if the canon is plugged into a USB port on my computer you could rewrite this TXRX and as long as you adhere to the same public interface then you can use Wi-Fi or Bluetooth or infrared lights blinking at each other like whatever you want it would be really cool to do something like just crazy like that and we wanted those possibilities to be open so then eventually you're not tethered to your computer anymore and you're standalone again which would be really really neat so why not I mean I'll accept pull requests by the way this is an open-source gem I want people to contribute just like the the Arduino community is extremely open-source friendly if you if you submit pull requests I'll I'll take them and then I'll just give you push access to the gem so as long as you're a contribute as long as you want to contribute you can always contribute so now all this stuff those two classes that I talked about are really low level and you might never even have to open them up they deal with IO objects and and non-blocking and have event loops buried into the depths of them and they're they're like really like the guts of what makes this happen but if you don't want to think about that then don't panic because there's a bunch of other stuff that are part there's a bunch of other things that are part of this gem that really like will help you start working with your Arduino and not have to think about the core or the base or the low level stuff and that's all in module components so module components is where we got that where we got that benefit of easy to extend so everything in the module components extends base component base component does a whole bunch of little bits or does a little bit of work for you setting up pins making sure the board is there knowing if it's an input or an output device or whatever you really need so if you write your own just inherit from that and you'll get a lot of free stuff done for you so let's talk about a couple of the classes that that you can use tonight or tomorrow when you go get your Arduino from SparkFun you can use you can start working with an LED the LED is your hello world for physical computing like turn blinking an LED is it like that now you've you've finally gotten like something happening and that's the easiest thing to do so that was the first class we wrote so what does an LED class look like in the gem like if you were to open it up and read the source code that's it because everything is hidden so far into the board and all that low level stuff is pulled away from you this is all there is to it so you set your pin you inherit from so of course this is an inheriting from base component so we call super on our initializer and then we just make sure we're talking about an output device and then we turn the LED off so that's setting the pin to low then we just have two methods on and off and we can either turn the pin on or turn the pin to a high or low and in like the physical world if you were to plug a multimeter into these pins what that means is you're actually letting electricity flow through a wire or not so it's actually like that it goes down to like that far or low and so that's been really cool for me learning like how computers really communicate is and building up on top of that so this is what the class looks like if you were to write another LED class you would get something similar I think but what's it look like when you use it looks like this so it's smaller than the rad smaller than rad and all you really do is you knew up your board and your LED so you knew up your board and you inject your communication class into it in my case it's the TXRX or the serial port or USB cable and then I knew up an LED and I tell the LED what pin I'm on and I give it the board the reason we're injecting the board and we've talked about this a lot but the reason we're injecting the board is Aaron Patterson just gave a talk we're about making salami and he was using not a not Arduino chipset and you could actually rewrite the board to communicate with something that's not an Arduino and continue to use the components and so that was one of our goals too is so everything is not dependent upon what what stands above it so as you get more and more high level the low level things can be can be interchanged as long as you adhere to a public interface and then all you do is you turn the LED on and off and it reads really well it all lays against the left line of your of your text editor it's not nested it doesn't look like JavaScript with dos and ends I think this ended up really really cool I was like stoked when I saw when I saw this finally working and it looked so clean but it didn't solve or it solves one problem and that's talking to the board so talking to the board is is really easy because that's not blocking IO sending messages is really easy because you don't care if those messages are ever received what you really care about is when the board tells you something when a button is pressed when a laser line is broken when something bends you have flex sensor bends or something like that what you do is you want you want to be told that that just happened and that's where it gets difficult in Ruby and it's really really easy in JavaScript so the first place we tackled this was with a digital input device a button so if you look at class button what does it look like button class again inherits from the component base but instead of setting itself up on a pin it actually adds itself as hardware to the board so it tells the board hey I'm here as a piece of hardware you should be looking at me and the other thing that it does is it tells the board what pin it lives on and then it tells the board to start reading on that pin so the C++ the C++ library on the board can dynamically figure out what pins it needs to be reading on based on what hardware is added to the board so that was something really cool is that you're not actually setting up your pins ever if you look at the C++ you're not actually setting up your pins in like a setup loop on the Arduino if you guys have ever used one they're dynamically changing as classes die or are born and the other thing you do so then you have this update function and the board calls update on whatever hardware it's looking at whenever a state changes so in the case of an analog or a digital hardware the state change is really the only important part you know you're not constantly just reading information you're just you only care when the button goes down you don't care what you know what's happening in between down and up so it calls that with a little bit of information the data in this case is a one or a zero it could be changed to something more meaningful like a symbol and probably should be and then we call button up and button down which are callbacks so those callbacks end up finally getting passed in to your class and you'll see those in a minute but first I want to talk about documentation so this is where things kind of get weird and you have a little bit more than an LED going on where LEDs you kind of just drop in and they work or even in the case of the Uno there's an LED built into it so you can play with like it blinking lights without ever buying an LED or plugging wires into anything so we wanted to make it easy for not only you to get started with this gem but get started with your Arduino so we created fritzing documents for all of the utility classes so in the case of a button it's really simple in the case of a stepper motor it's not but they're all there and the goal is that you know when you want to start working with your Arduino you don't even you don't have to go google how to plug all this stuff in and figure out what resistors you're supposed to be using or transistors or capacitors like all of that stuff just exists in an image file and how to with an example and a running script that will make like in the case of a button when you press the button will console log something for you or in the case of a stepper motor will spin a stepper in either direction which you'll see in a minute so the goal is that all of this stuff is really well documented there's images to help people get started if you've never done this before and example classes so if your code's not working but the example class is or the example file is working then you probably are doing it you need to figure out a better way or need to yeah practice I don't I don't know so what does a button look like when you actually use it you pass prox into buttons lambdas functions into into a button as callbacks now you're starting to feel a little bit more like like an asynchronous language now because because now we have functions that we've passed in and we call later they're not called right away and they're not they're passing we're passing functions around rather than just calling functions on things but I couldn't think of a better way to do this and if someone thinks of one please feel free but what you do is you pass callbacks into button down and up and you can pass as many as you want in or remove them later if you want or whatever you want to do and when the button goes down it loops through all those callbacks and calls them asynchronously and then in the same in the same case for up so we make sure we keep all those callbacks in an asynchronous world so you're never blocking your your main thread your loop or your website or whatever's happening that's really that's really like the core of your application and it ends up being pretty small like to get a button working that's I was pretty happy like that's four lines of code and and it all you're already blinking in led so we have the led on and off and passing in and stuff so that's that's digital input what about analog input now a lot of decisions can't be made for you like state change so that's actually a little bit more difficult so we have a sensor class the sensor class is another one of those core classes it's really uh I mean it works you could use it for any sort of analog input device it works really well but it doesn't have like the nice like on off that an led has or the button up and down like those methods that mean something to someone instead we have to deal in in abstracts because we don't know what sensor you're actually working with so what I hope people do is they take the sensor class and in the case of my Halloween party I had little sensors around my yard and as people walked by they would whisper like Arduino would whisper like creepy things at you and I extended I extended sensor for the proximity sensor so a proximity sensor all I cared about was if someone was within a certain range not the range changed so then I could say like within and give it a distance and the sensor class knows now it has now there's meaning there's a DSL the working with a sensor on my Arduino and I thought that was really cool so that's that's kind of how you would do it so what does the sensor look like inside the sensor inside looks pretty simple it has the same update function as a button but you're adding analog hardware which tells the board that it needs to know about everything that's that's one thing that that's the one thing that's different that's different you need to know about everything not just state changes and we start read so it's again very very simple these classes are really small I don't think we have a class over like 25 lines in the end like that's been a really big win besides the board which is fairly large but that has all the event loop buried inside of it as well so when you when you use a sensor what's it look like you just pass in when data received you pass a proc into that or lambda or a function of any kind and it'll call those asynchronously when data is received into the function that you're passing into it so as you see the proc takes one parameter data and it will call it will call that proc with the data that the sensors reading so in the case of a proximity the proximity sensors that I was using it gives you numbers between like one and a thousand and those numbers between one and a thousand have like a logarithmic curve that mean distance so then I had to have some math about how to get the distance to mean like feet to me but it was always called with the data that was getting received or with the data that the sensors is seeing so that raw data and then I have to translate it in my class to something meaningful finally another pivot wrote the stepper class which I use on the canon I'm really bummed actually it's right here is a little stepper motor I had this this thing like full pitch control from a website so you could aim it at yourself and then in an attempt when it got off balance the motor wasn't powerful enough to pull the cannon back up so the way stepper motors work is it's four electromagnets and it pulses them to get a wheel spinning and so actually you can provide more power to a stepper motor and it gets more powerful unlike a DC motor which like that can't happen but I provided way too much and I fried everything actually created a little fire it was neat in my hotel so that's also a fun part about physical hardware is you end up with like cuts and bruises and burns which is fun for me because yeah it's interesting you actually can hold something it gets hot not just like my laptop but be careful please so what does the stepper motor look like it's two methods so step clockwise and stop counterclockwise so all it does is it pulses my pins that pulses the pins on the motor just like you should to get the wheel spinning but it's two methods that's what six, eight, ten lines of code to get a stepper motor working so that was pretty cool and if you go find a different stepper motor it's going to be about the same amount of work for you to get it working so that's what I think was really neat is as you go play with different types of hardware it should be easy for you to implement them in dyno and then start working with them so then to spin a stepper motor we'll just spin it a full revolution clockwise and counterclockwise so that's all this script does is it just like turns it around and then the other action so that's some of the stuff that we wrote it's a quick overview there's a ton more that we're writing have written I say we a bunch of my friends have been helping make sure this is well tested and working and you know I've just had so many people that have been enjoyed it I think everyone in my office has at least given some sort of input which has been really really cool but we have a lot more that you can play with too as you start playing with your arduinos you can start working with infrared I have been working on a foosball table app so a website that keeps score for our foosball table that goes like with leaderboards so you can register who you are and then we know who the best foosball player in the office is and I use infrared light in the goal and the ball breaks the beam and that's how I know that a goal was scored so we have an infrared sensor that's a stepper motor we have RGB LEDs so you can change the color you have a multicolor LED and we have servos so servos are like are a motor that is just not close to as powerful as a stepper but a lot more precise as well and there's even more than that it's like hard to go into how much like it's been in the pipeline and not pushed or been worked on and now has made it up and everything seems to be very well tested and really well supported so I hope that like it's really easy for you guys to get going so what does this code really look like when you use it because I've been using it right so this is the this is the build script for my for the for the gem dyno so it runs the build script if the build is green I turn on a green LED otherwise I turn on a red LED so I actually like have a little light on my desk that turns red or green based on whether or not I broke the build for the gem which I think is pretty cool super nerdy too but what about in rails so rails is rails is weird or I guess just the web is weird right because we have these long-lived classes we have buttons and LEDs and boards and and communicators tx rx that live a lot longer than most of your models ever dream of living right if they're living as long as the board is living then there's probably a problem with your web server because they should be born when the request comes in and die as the request goes out that's not the case of the board the board you want to be the board you want to be able to monitor the world around it even when requests aren't coming in and out because you might maybe you want to to to use Aaron Patterson's live streaming or pusher or whatever to send information to people on your website about the current temperature around you or he could use it for his his salami stuff so I ended up I ended up putting everything in an initial in an initializer in rails anything that was long-lived lives in an initializer maybe there's a better place I don't know if there is or you have opinions on it I'm always welcome to them just find me but I've been a fan of Sinatra so this is the code for the Canon that's it so to run the Canon all I do is I have one endpoint that fires the Canon and the Canon is digital is digital output so it looks like or it feels like an LED it may as well be an LED actually when I was building the stuff for it I was using an LED instead of a Canon because it's way more dangerous to have a Canon firing on accident but this is it so why not look at it and first of all thank you very much so let's oh it's over need a browser so this is the website for the Canon yeah there's a t-shirt in it disclaimer I'm sorry um the compressor could be turned on for number two just kidding I have to actually turn it on yeah safety there's there's a emergency shutoff valve all the way in fonts can go to dot local C U R I E dot local on your computer and you can actually click fire just don't do it while he's in front of the Canon if you can get there I don't know if the conference Wi-Fi is actually working C U R I E dot local and then it's port four five six seven sorry all right you're safe I turned the valve off the safety's on who's trying to kill my friend no I don't I hope not at least I made the website during the last talk so so now someone yeah feel free last one oranges sandwiches potatoes whatever will fit beers breakfast go to the yee-haw the noise is pretty good right so thank you the gem is at austin bv slash dino I think that's it