PyCon 2014

Introducción al "Internet of Things" con Python

Katherine Scott  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

hi welcome again to continuing our hardware centric track we have Catherine Scott she's the lead developer for temple automation and she's here to give us a crash course on the Internet of Things so let's give her a hand so a quick and dirty guide

to putting things on the internet you guys having fun it's a good day and it's the end of the day so we're gonna have a ton of fun again all right so as I see it I wanted to write an intro sort of tutorial where I I talked about how to do different

stuff with hardware and and part of the problem is is when you go and look at sort of all the tutorials out there there's a bunch of tutorials on how to do little tiny toy things with hardware and there's lots of tutorials about how to do web stuff

and that's because people will tend to break off these cameras right there's people who do massive web scale stuff and then there's people who tend to build more Hardware stuff like robotics and computer vision and that's what I do most of

the time and you know every time I go and build a robotics Justin would grow and build some piece of hardware almost immediately as soon as it's done or as it's being built it's like oh can you go give it a web interface can you go do something

with it so I can see it's an internet it's like yes I can't but I gotta figure it out so I wanted to write like a really simple introductory experience for building something like that how do I take a simple object and connect it to the Internet

so the part of the problem is is that you have to figure out what you want to put on the internet and stuff that sells really well is stuff that deals with pets so I decided to put pets on the Internet and I don't have cats have dogs I used to work in

a neuroscience lab and I kind of fell in love with rats because you can leave them for a week and they have all the best qualities of dogs and cats and they're compact and easy to deal with so I decided to put rats on the Internet which is great because

rats support all sorts of wireless protocols and interface standards and you know they're just they're super easy to wire up oh wait they are totally not easy to wire up on anything they have no standard interfaces except for one and that standard

interface was thought up by this Harvard psychologist and his name was BF Skinner and and so BF Skinner his whole back was since he's a psychologist and he wants to train animals to do tasks so we can see how how they perform those tasks and how they change

when you change sort of their environment and so he built this thing called a skinner box it's also called an operant conditioning conditioning chamber and so the Skinner box you you guys may be familiar with this from work is that it's either a light

or a buzzer and the rat is supposed to hear the light or the buzzer and it's supposed to respond to that by pushing a lever and then it gets food and there's a sort of a other way you can train rats where you electrify the bottom of the cage and you

shock them and then they push the lever and then you stop the electrification I wasn't going to do that because that's not cool so from these sort of just basic conditioning you you build up primitives to do real science did you do real biology and

do real neuroscience and you can also just play with your pets so I went to go buy one anything's in there they're $10,000 I'm not even kidding you it's a lever a buzzer and a computer it's $10,000 this is the quote I got for doing this

and this is actually like a huge problem because like the NIH and the NSF pay people to do research like this and you can't just have one rat no you have to do massive parallel rat testing at scale to get your drug through so you're looking at like

10 Skinner boxes so I decided well shoot I can do this for a hundred bucks I and I totally did and it's it's super cheap to do it last year if you're at PyCon everyone got a Raspberry Pi you know you get a Raspberry Pi for 30 bucks I got a Raspberry

Pi IR camera so IR is kind of like night-vision it's like the poor man's night-vision camera and that plugs right in the Raspberry Pi 30 bucks a couple of metric bolts it's a couple bucks the hardware store if $5 stepper motor a resistor a buzzer

and a little chip called an L in 2803 which is like a stepper driver motor all it does is takes little signals that have not a lot of current make them into big signals with lots of current and a switch and then a lot of really awesome 3d printed parts so

I had a friend from the internet help me do some mechanical design and we basically started building the bits of a Skinner box so there's a food hopper and the food hopper basically distributes treats the rats there's some mounting brackets to hold

it up to a wreckage there's a lever and then just a simple mount for the camera and this all goes inside a Tupperware I took out of my kitchen and so inside the Tupperware is where I mounted all the hardware so the hardware is super easy it's just

[ ... ]

Nota: se han omitido las otras 2.511 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.