Arduino 101 | Physical Computing for Beginners Patt Vira https://www.youtube.com/watch?v=gMMxPPYjlvI Transkript (automatisch erstellt) 0:00 as you may know I have made over a 100 coding tutorials using the open source JavaScript library called p5js to create beautiful visual outputs such as this 0:10 one this one and this one they're all on the computer screen and while there's nothing wrong with that I thought that we would shake things up try something 0:20 new something different and that thing is to dive into the world of physical Computing this is where software meets Hardware in a way that allows us to 0:29 create product objects that are interactive tactile and dynamic these two worlds are more integrated than you think and that is exactly what we're 0:38 going to be exploring in this series but before we get there I want to lay out some Basics so that we're all on the same page in this video I'm going to 0:47 talk about what physical Computing is and why it matters how we should think about physical Computing when getting started the core components that we're 0:56 going to be working with and last but not least my plan and for you and I to explore this world together also I am no expert in physical Computing so we're 1:06 going to be learning this together as a team expect mistakes breakthroughs and moments of Joy when things work and the opposite when things do not but fear not 1:17 that is part of the fun right what is physical Computing physical Computing is about designing systems that interact with the physical world through code you 1:28 might have heard of the terms Internet of Things robotics or interactive art installations and these are all examples of physical Computing at its core it's 1:39 about connecting sensors actuators and microcontrollers to code so that we can make things move light up react and more imagine controlling an LED light with a 1:49 simple hand gesture or the speed of a motor based on the pitch of our voice and you might not be familiar with some of the terms that I just mentioned but 1:59 don't worry I'll be unpacking each of these as we go on how should we think about physical Computing as we get started if you have been following my 2:07 p5js tutorials I think that shifting your mindset to physical Computing is actually quite intuitive I would like to put it into three main buckets inputs 2:19 processing and outputs and I want to connect three verbs to these three buckets detect process and react actually as a human being we actually do 2:31 this on a regular basis imagine walking on the street passing a bakery and then you smell something very nice coming out of there your brain starts to process 2:41 what is inside it might be some freshly made bread and then you start to feel hungry and then you just think that you want to go in and get some of it and 2:50 then what do you do you walk inside you pay for the bread and then you eat it so with this example we use our nose to detect the smell our brain to process 2:59 process the smell while figuring out what to do and our feet to walk inside the store and our mouth to eat that piece of bread these three buckets also 3:09 apply to our interactive p5js sketches take this one for example the program detects when a mouse is pressed the program processes and runs the commands 3:19 that need to be run when the mouse is pressed and then the program spills out a bunch of floating random alphabets on the screen as a result of a pressing 3:28 Mouse inside the world of physical Computing for example we want to control an LED light using a simple hand gesture a light sensor detects the hand as it 3:38 approaches the sensor resulting in a certain brightness value the microcontroller processes and runs the commands that need to be run when the 3:47 sensor value hits a certain condition and then the LED light is turned on or off so you might be wondering what is a microcontroller so let's talk about the 3:59 component in the context of our three buckets inputs usually come in the form of sensors this is how we detect or sense 4:08 what is happening in the environment around us in the second bucket we use a microcontroller to do some processing this is the brain of our physical 4:17 Computing projects based on the name micro means small and controller means to control so it is essentially a small computer that we use to control another 4:27 device the type of a microc control that we're going to use is called an Arduino similar to p5js an Arduino is a beginner friendly microcontroller as it is easy 4:38 to use with a simple coding environment and Hardware that is easy to connect it is also an open- Source software making it accessible for a wide range of 4:47 projects and it also has a large and supportive Community all right as for the last bucket outputs usually come in the form of actuators these are 4:56 components that create physical action it's part of the system that makes something happen in the physical world now that we talk about the physical 5:04 components how about the programming language the programming language that we're going to use is actually C++ but don't worry it is a simplified version 5:15 as this is supposed to be beginner friendly the great thing is that if you already know some p5js the key coding components will feel pretty familiar to 5:23 you the language includes special functions which are setup and loop which act the same exact way as to how setup and draw work in our P5 sketches setup 5:33 is the function that is run once when the ardino starts this is where we initialize things and loop just like draw in p5js runs repeatedly allowing us 5:43 to continuously check inputs and update outputs now that I have gone through the basics of physical Computing I hope that it already gets your brain to think 5:53 about the main possibilities of the type of projects that you can create the world is your oyster honestly and we don't necessarily have to make 6:02 everything all physical either we can also connect some sensors to lp5 sketches and make something visually beautiful on the screen so what is the 6:11 current plan of how you and I should be exploring this here's my current plan we'll make some simple Arenal projects to dip our tools into the world of 6:20 physical Computing we'll also integrate it with p5js to see how we can sense the world around us as an input to create something beautiful on the screen and 6:29 then last but not least we'll also move Beyond code and work with some mechanical components imagine create something as one as an egg step 6:39 sequencer and if you're wondering if that is a thing it is a thing and I have made it many many years ago so leave it in the comments if you want to see it 6:47 also I would love to hear your thoughts what are some of the things that you want to learn about physical Computing what are some of the project ideas and 6:55 any suggestions on things that you would like to see I'm really excited and I hope that you are too and that is it for this video and see you in the next one 7:05 bye [Music]