Wednesday, 8 July 2020

Arduino vs. Raspberry Pi - Which is best

There are a large number of controller boards that you can pick from for your projects. Two of the most popular are the Arduino and the Raspberry Pi. So which one do you pick? On the surface these boards look about the same. They are a couple of circuit boards with some chips and I/O connectors, right? In this episode of AddOhms we're going to take a look at the differences between these boards and how you choose one for your project.


Let's start by looking at the Arduino. If we visit the product page on the Arduino website you're going to see that there's many different boards available. So in this tutorial we're going to focus on

the Arduino Uno, which is based on the ATmega 328.Inside of the 328 is 2K of RAM, 32K of FLASH memory, some timers and hardware that talks serial, I2C and SPI, or also known as "spy."

Outside of the chip the Arduino board contains parts like, voltage regulators, passive components and the I/O connectors. It is a relatively simple design with an even simpler software structure. The code that you write in the IDE is the ONLY code that runs on the chip. There's no interpreter,no operating system, and no firmware. Your C-code is compiled into machine language and then it runs on the Arduino itself This is as bare-bones as you can get! The Raspberry Pi, on the other hand, is actually a single board computer or S-B-C. On the board there is a  32-bit microprocessor and ports

that support: Video, Audio, USB Host, Ethernet, SD cards and even an HDMI port. There's also some GPIO headers that look like Arduino pins and are KIND of like Arduino pins, but we'll talk about how they're different here in a little bit. Overall what does this mean? Well it means that your Raspberry Pi has more in common with your computer, than it does an Arduino. For example, instead of writing code to control the hardware directly you are actually writing programs that run within an operating system. In the case of the Raspberry Pi the operating system is typically Linux. I said the Arduino is a microcontroller and the Pi is microprocessor. So then, what's the difference between those two? They both have a CPU which is what execute the instructions, timers and memory. As well as io pins. But those I/O pins is where the key difference lies. Microcontrollers tend to have a strong I/O capability so that they can drive external hardware directly, While "micro processors" tend to have weak I/O which need transistors to drive most hardware. Micro processors are good at

processing so they're a little bit "brainier" (get it?) than a microcontroller. So for the sake of comparing the Arduino to the Pi, let's look at some raw specifications between the two. The Raspberry Pi has a clock speed that's over 40 times faster than the Arduino and is based on a 32-bit architecture. The Uno's RAM is measured in KILOBYTES, while the PI's is measured in HUNDREDS of Megabytes. Both have general purpose I/O, or GPIO, but the Arduino can drive OR sink up to 40 milliamps, while the PI is really limited to more around 5 milliamps. In terms of power consumption, the PI consumes more power than the Arduino but, always keep in mind what is the project going to have and what other hardware is going to be included. Lastly remember that the Pi usually runs some form of Linux while the Arduino has no operating system.So at first you might look at this and say clearly the PI is better! But we have to really talk about how would you pick one of these for project. It's not all about the specifications! This often leads to the question: which one is best?? But. there isn't a simple answer. It does get a little simpler when you add the phrase, "...for my project." Think about projects with things that get controlled like motors, character LCDs, and sensors. These are going to work really well with a microcontroller like the Arduino. And then projects with things like video or cameras, complex math, and graphic interfaces are going to be better suited for the Raspberry Pi Both boards have their place in the electronics world neither is perfect, and neither is going to be perfect for every single application. However if your application is more about controlling things, the Arduino is probably a better choice. While if you need to process lots of data the PI is your best bet For links and resources related to the Arduino and the Pi, as well as, downloadable versions of this video, visit addohms.com/ep7. To stay in touch you can follow us on Twitter, like us on Facebook, or leave comments along with this video.


Arduino Garden Controller - Automatic Watering and Data Logging

I like fresh herbs I'm not a picky eater otherwise but add in some fresh basil cilantro rosemary or thyme to a meal and it just makes a huge improvement to any recipe so I pay for this stuff at the grocery store and some of it is expensive like two to four bucks for a few stems so I got that thinking this spring hey I've got a backyard on the south side of my house I've got the Internet to read up on how to grow things I can do this myself and save some money and then the engineer and me realized hey have you made the garden automatically water itself that could save some work and if you collected all sorts of different data you could analyze that and get a sense of the health of the garden without any guesswork well here's a tip if you spend a lot of time and money complicating your garden with a bunch of sensors and electronics it ends up being more worth it just to buy fresh herbs from the grocery store my brother bought me an Arduino for Christmas last year saying it was right up my alley I guess he thought I could do with a few more ones and zeros in my life and being a cat owner myself.


I have to admit that it might be nice to have something that does what I tell it to well I went through the tutorials and I honestly had a lot of fun with this thing the gratification that comes from combining a working circuit and a working program is a little bit addicting very much like golf these moments of Eureka occur in between long bouts of failure disappointment and constant hazards but you get something right just frequently enough to keep you from giving up on it altogether and I'm almost as nervous as they come for an electrical hobbyist not to mention as a gardener so if you're treating this as a how-to guide don't sign up for a booth at the farmers market just yet in the interests of keeping this video interesting I'm gonna try and keep most of the technical jargon and minutiae of the project out of the narration and in the description below if you have specific questions that don't get addressed I'd love to answer them in the comments let's jump right into this building I'll go through all the individual parts as if an Arduino isn't complicated enough there are a whole host of shields which are just boards you can put on top of an Arduino that add additional functionality like Mario power-ups I'm using this data logging shield which allows you to save to an SD card now it is completely possible to automatically water a garden without any data login whatsoever but then again none of this is really necessary and I'm starting to realize already that the plants themselves are becoming secondary to the garden data in my mind because if I don't have a heavily instrumented garden I might not be able to see how sunlight illuminance correlates with soil temperature or how soil moisture changes with relative humidity and air temperature or how far out of phase and soil temperature in air temperature are from one another and I certainly wouldn't be able to take all that data and make cool graphs and if I'm being honest now I'm realizing this is truly what's important to me I want to make cool graphs this shield comes 95% assembled but the headers are left off and this is allegedly so you can choose which headers you want but I have an inkling that this is kind of like a mini gauntlet for an electrical hobbyist like Adafruit saying only after you can solder on these headers will you be ready for whatever it is you're planning to do with this board and as someone who uses their $10 soldering iron primarily for burning their initials into the bottom of wooden bowls this was a disaster of a soldering job and I won't show any close-ups of it because I'm embarrassed but I somehow finished it without ruining the board let's talk about sensors I wanted a good mix of data so I chose a suite of several different kinds of sensors first and foremost I wanted a soil moisture sensor because I needed to know when to water the garden now I did a lot of research on soil moisture sensors and I won't bore you with the details because there's a lot of discussion out there so let me save you some trouble in the simplest way I can think of you get what you pay for there's more on this in the description below if you're interested I bought a capacity of soil moisture since from veget Ronix and i couldn't resist getting their soil temperature sensor while I was at it these sensors are quite a bit more expensive than the typical stuff you can find on sparklin or Adafruit but again you really get what you pay for these are well-built well calibrated and very simple to use here I'm testing the soil temperature sensor I also tested the soil moisture sensor in lots of different conditions including dry air potting soil and this cup of water apparently what's in this cup is 98% water by volume which is pretty good honestly as a civil engineer that would have been happy with anywhere between 80 and 120 my sunlight sensor is a cheap and simple photoresistor it's resistance changes based on intensity of light and you can put together a simple circuit which allows the arduino to read this as an input actually made an attempt to calibrate the sensor based on the known brightness of this flashlight i have no idea if it's even close to correct button i have the code reporting this data in lux which is the SI unit for illuminance finally I got the sensor which measures both air temperature and relative humidity this is the only digital sensor I'm using it's really easy to use since all the electronics are on board and the code is already written so I just end up with nicely scaled readings problem with a digital sensor is that my multimeter can't talk to it so if there's any need for troubleshooting I don't really have a lot of options luckily this one worked just fine for the actual watering of the garden I've got a cheapo solenoid valve from Adafruit I built a little circuit with a transistor which allows the Arduino to switch the valve on right now I have the code check the water level once a day in the evening and switch on a soaker hose for a set amount of time if it's below a certain threshold from what I've read it's actually better for the plants and herbs especially to have some cyclical nature to the wetness and dryness of the soil rather than just being constantly well watered this scheme also reduces the duty cycle on the valve and if a sensor goes bad there's a chance of flooding the yard since all these electronics are going to be sitting out in the Sun I'm building a crude version of a Stevenson screen which is really just a louvered box that lets weather instruments be out in the open without exposure to direct sunlight or rain I'm using the plywood dregs of my scrap bin so this is LEED Silver accredited to get the gold I think you have to use pallet wood and have a Pinterest account the enclosure goes together with a tin soffit vent glue and finished nails a nice coat of white latex paint will hopefully help reflect the Sun well it wouldn't be a hobbyist project without at least one big gob of electrical tape and some questionable troubleshooting but I finally got this thing working I've had it running for

just a few days now and it's actually working really well the garden is happily watered with no intervention from me even though I check on it now more often than before it had the Gard Ueno here's a quick look at some of the data I'm collecting combining microcontrollers and gardening is a really popular idea I think that's because Gardens have very simple inputs and outputs that are easy to wrap your head around soil plus water plus light equals delicious herbs and vegetables I guess people myself included see a notoriously simple and relaxed hobby and can't help but feel compelled to over complicate it and there's a growing market of products out there geared towards quote unquote makers which are really solutions looking for problems or at the very least things which we'd like to try and use but just for the sake of using them and for me at least the Arduino probably falls into that category but just about anyone can connect the dots between garden needs water and I am NOT a responsible humanbeing who is capable of remembering to water a garden every day and realize hey I can use technology to overcome my personal shortcomings and more than that I can bend technology to my will and that will feel good to my ego and my sense of self-worth after all no one's hobby is to buy an irrigation controller off the shelf of a hardware store thanks for watching and let me know what you think


Arduino - All You Need To Know

hey here to learn something new well to keep those knowledge gears greased remember to subscribe and hit the notification button to get notified when a poppin fresh video is ready for your consumption let's talk about Arduino 'he's the gateway drug to microcontrollers that can turn a novice tinkerer into a mad scientist the Arduino is the perfect tool for anyone that wants to get started with electronics but wants a fairly simple learning curve it all starts with this Hey I thought that was a bug sorry it all starts with this a microcontroller and in layman's terms it's basically an electronic brain robot right microcontrollers are micro in that they're small and controllers and that they can control other electronic components you can control leds motors buttons speakers sensors and tons of other electronic components but early in the days of electronics there was quite a learning curve to somehow connect components to microcontroller connect it to your computer and then program commands on to it there were some circuit boards that made the process easier but at the time they were very expensive enter a university team from ivory Italy who wanted to make a cheaper easier wage for people to get started with microcontrollers get below that Dizzy Dean Neil what will you call it arduino bellissimo i could kiss you and so it began arduino started as open-source software for programming microcontrollers but eventually became branded as the microcontroller platform itself the platform being this credit card sized circuit board with a microcontroller stuck on it the circuit board is intended to have everything on it to make it easier to connect things to it and program it which if you were to build the same thing on your own it probably looks something like this you have your USB port which not only plugs into your computer so you can program it but it can also power the thing and then you also have your external power port if you don't want to power through USB you have your power management pens here your analog pins here and your digital input/output pins here wait isn't that nice to you but I have no idea what you're trying to tell me okay grandma here let me simplify it these ports which I'm calling pins allow you to control electronic components such as your LEDs motors fan centers buttons etc so you can connect those components to these pins using wires and whatnot and then program the microcontroller to control those components you could start with something basic like controlling an LED light or you could connect multiple components and make your own Smart Watch that connects through your blue to the phone or something like that so let's take a look at that basic LED example shall we taking a simple LED and a 22 ohm resistor


I can connect the ground side of the LED to a ground pin on the Arduino and then the positive side of the LED to the resistor and then on to a digital pin on the Arduino will go with pin 13 but it could be just about any digital pin now we have to tell the microcontroller what to do so in order to do that let's plug the Arduino into the computer and in a web browser go to the Arduino website to download and install the Arduino software the Arduino software allows us to tell the microcontroller what to do by using coal I know it sounds intimidating but it's simple if you have a good teacher like me so let's jump right in here now after watching the program it automatically generates two sections of code the setup section and the loop section the setup section is where we set up the microcontroller and tell it how we're gonna use things like it spins the loop section is what we tell the microcontroller what we want it to do with the components so to set up our LED pens we type a command called pin mode and then we tell it which pin not including the ground pin the LED is plugged into then we say if we wanted to send output or receive input from it in our case we're gonna be sending output to and that output we're gonna describe in the loop section the information we want to send the LED is to turn on and then to turn back off we can write our output commands to the LED by using the digital write command we tell it what pen to write the output to and our output is gonna be to turn the power signal to high so that the LED lights up we'll use this delay command to keep the LED on for about 1000 milliseconds or one second and then we'll use digital write again to set the power signal to low which will turn the LED off and then we'll delay that command by one second that's it not too bad now we just need to upload this code to our microprocessor so first make sure the program is connected to your Arduino by going to tools and then board and then select the type of Arduino you have then just click the verify button to make sure you don't have any mistakes in your code and then click upload if you did everything correctly the LED should be blinking I know this is basic but it gives you an idea of how you can control bigger more complex components and eventually you can see how this can serve as the brains of your future robot project that's it for this chapter of the film guide that's one more tinkering tool to add to your toolbox want to suggest a guide head on over to tinkernut.com slash ideas to submit your idea if you want more tinkering videos you can click here or please be kind enough to like subscribe or comment if you made it this far here's your reward in Mexico City you can get free Wi-Fi by disposing of your dog poop


You can learn Arduino in 15 minutes

arduino z' i'm gonna talk about what they are what they can do and the basics of how to set one up to do simple things like make an LED dimming circuit control the speed of motors and even make a simple oscilloscope so what is an arduino i'm sure you've heard about these things a million times by now and if you're confused do you have every right to be because the word arduino refers to so many different things keep watching and i'll explain all of them microcontrollers are integrated circuits that are basically tiny computers they can run small simple software programs they're low powered enough that they can be powered by a battery for days but they're fast enough to process data much faster than any human being can think our do we know is a company in Italy that designs and sells circuit boards that make microcontrollers easy to use they call these circuit boards arduinoz' and there are a lot of different types of arduino z' for example you've got simple arduino boards like the arduino uno which is cheap and good enough for most projects you could use an Arduino Uno to control motors lighting cameras or even build a simple robot and then you have more fancy Arduino s with more powerful processors which have Wi-Fi Ethernet and more the company Arduino open sources all of their hardware designs which means that you don't just have to buy from them ,there are countless third-party companies that make their own variants of the Arduino hardware designs they can't call them arduino z' but functionally they're the same thing there are also these things called Arduino shields which are basically circuit boards that plug into your main Arduino circuit board and let you do more stuff for example Adafruit makes shields that let you control motors and servos without having to design motor control circuitry and Sparkfun have shields that let you turn your Arduino into a simple cell phone or an mp3 player ok so that was a quick overview of Arduino the company and Arduino hardware but there's more there's also the Arduino software development environment and this is what makes Arduino good for beginners historically if you wanted to program microcontrollers you'd have to type out a lot of binary and memorize a lot of hard to remember registers and instructions then you'd have to use special programming hardware with custom-made cables to upload your program onto your microcontroller Arduino the company got rid of all of that they created software that works on Windows Mac and Linux which makes uploading your code as simple as connecting a USB cable and clicking a button they created a programming language that lets you configure all of the Arduino Hardware products in this same way and although it's not as simple as learning Python the Arduino software is one of the easiest programming experiences you'll ever have ok so hopefully that clarifies what Arduino means in different contexts now when people say they used an Arduino for their project they're probably talking about the Arduino Uno it's highly unlikely that you'll outgrow on anytime soon so it's the perfect Arduino hardware for this beginners tutorial you can get them from Amazon cheaply and if you have the money I recommend buying one of the many Uno kits out there where you get a lot of different pieces of hardware to play with ok so you've got your Arduino Uno the first thing I want to do is get you familiar with the hardware you'll often hear Arduino skiing called microcontrollers and that's technically incorrect Arduino Tsar circuit boards that have microcontroller chips on them but they also have a lot of other stuff on there too let's take a quick tour this is the microcontroller Arduino Uno is use a series of microcontrollers called atmega AV ours they're made by a company called Atmel you can buy just the bare chips on their own for about a dollar but then you'd have to do a lot of soldering connected to the microcontroller is a crystal resonator this controls how fast the microcontroller is running I have a separate tutorial on resonators and oscillators which you might find useful now in order to upload the software you create to the main microcontroller there's actually another microcontroller this chip is what lets you connect your USB cable to the Arduino board and communicate via USB it lets you upload your programs onto the main microcontroller and once you have your program running this chip is what allows you to send messages back and forth between your computer and your Arduino and this is extremely important for debugging one great thing about Arduino is is that you can power them purely from your USB cable but if you don't want your project always attached to a computer you can just use an external nine volt DC power source with a barrel jack over here the uno has a built-in voltage regulator that will reduce the voltage to five volts and if you ever want to reboo your Arduino program you've got a reset button if you have time it's worth studying the Arduino Uno schematic don't worry if it looks complicated you don't need to understand most of it I'm just trying to get you to understand what the Arduino designers did they took an off-the-shelf microcontroller that requires a lot of extra parts to get working and they put all of those things together in an easy-to-use way and if you choose to learn more about electronics you can create circuit boards like this too okay so that's what's under the hood next let's talk about the pin connectors over here you have the power pins if you want you can connect wires here to other circuitry with 5 volts or 3.3 volts just make sure that whatever you power doesn't draw more than a few milliamps a few LEDs is okay but a large motor would be an Arduino no TX and rx is for sending and receiving serial data you could use this port to send and receive data from a GPS module Bluetooth modules Wi-Fi modules

and more pins 2 to 13 R for digital inputs and outputs normally when people think of binary you think of just spitting out zeros and ones but with most microcontroller pins you can actually activate a third state and use them as a digital input so you can use this pin as an output where it spits out 5 volts for a digital one or zero volts for a digital zero or you can internally configure the Arduino to expect a voltage on the pin and that voltage could be interpreted as a 1 or a 0 it's a system called tri-state logic and it's worth reading up on but Arduino makes it really easy to change between inputs and outputs in software here we have 6 analog input pins and these are used to measure continuous voltages anywhere from 0 volts to 5 volts I'll talk more about this later in the video finally some of the pins have a tilde in front of them and this means that you can use them to output pulse width modulated square waves which I'll also show later in the video okay enough about the hardware most of the work you do with your Arduino will actually be in the software so start out by downloading the Arduino software from Arduino CC during the installation you can expect a lot of prompts like this to show up where you're asked if you want to install various drivers just say yes to

everything once you're done connect the Arduino to your computer with a USB cable next start up the Arduino development environment the first thing that you want to do is make sure that the software tries to connect to the right type of Arduino go to tools boards and we're going to be using an Arduino Uno next we have to make sure that the Arduino environment can actually connect and communicate with your Arduino go to tools ports and select the comm or serial port where your Arduino is connected if there isn't an Arduino listed here you may have a problem with your drivers or you can try plugging your Arduino into a different USB port the Arduino software has a ton of fantastic easy-to-follow demo programs and studying these is the best place to start learning how to code Arduino calls them sketches which is just a fancy name for a program that you upload to your Arduino let's start with an example where we measure voltages that are being fed into the Arduino go to file examples basics and log read serial all the Arduino examples contain instructions on how to set up the hardware this one is telling us attach the center pin of a potentiometer to pin a zero and the outside pins to +5 volts and ground 


ok let's do that a 1k or a 10k potentiometer will work great for this we're going to be using it as a voltage divider to create a voltage anywhere from 0 to 5 volts make sure you've watched my voltage divider tutorial if you don't understand how that works every Arduino program will have two main areas the set up and the loop the set up area is where you configure your Arduino to do certain things for the duration of your program it could be information on which pins are inputs which are outputs but in this case we're telling it to send serial data to our computer at 9600 bits per second which is a pretty standard data rate for these situations the loop is the area of code that repeats over and over again for as long as the Arduino has power to it this line will measure the voltage on pin a zero and store the value of it in a temporary place in memory that we're calling sensor value sensor value is an int or integer meaning it's a whole number once we've copied the analog voltage reading to sensor value the command serial dot print line will transmit that value from Arduino through the USB cable to our computer and we can view it click upload it'll compile the sketch and upload it to your Arduino now hit the reset button now go to tools serial monitor you should see a bunch of numbers flying by as you vary the potentiometer from 0 to 5 volts you should see a number on screen from 0 to 1023 this is because internally the Arduino represents the analog voltages it measures with a 10 bit number which can be from 0 to 1023 the number scales linearly with the voltage so 2.5 volts would be halfway down at 512 you can use these formulas to convert from analog tic values to real-world voltages and vice-versa now close the serial monitor and go to tools serial plotter now you can get a graph of the voltage your potentiometer is creating over time it's basically a very simple low bandwidth oscilloscope you let's try another experiment where we build a simple led dimmer go to file examples and log and log in out serial the instructions for the potentiometer are the same as before it also says to connect an LED from digital pin 9 to ground note that it is implied that you will put a resistor in series with the LED the pins on an Arduino can't supply much current any more than about 20 milliamps and you risk permanently destroying that pin I have detailed tutorials on LEDs and resistor values but for now let's just use a 1k resistor attached to ground the other side goes to the cathode of an LED and the LEDs anode goes to pin 9 we've already talked about what an int is but this constant means that the label analog out pin will always translate to the number 9 throughout the rest of the program for example here saying analog write 9 , output value wouldn't be very clear like what the hell is the 9 for instead we're declaring analog out pin to be a place in the Arduino zs—memory that always stores the fixed constant number 9 so when we write other pieces of code we don't have to memorize which pin numbers we're using for different things it's not a big deal right now but this becomes more important when we have programs that use a lot of different pins sensor value and output value are non constant integer numbers which means they can change value during the operation of the program the term for this in programming is a variable on the arduino platform an int variable can hold a number anywhere between minus 32,768 and plus 32,767 the setup is the same as before and once again we're using the analog read function to measure the voltage on a certain pin which turns out to be pin a 0 we store that value in sensor value now we know that the Arduino internally represents analog voltages with numbers from 0 to 1023 but the analog write function only accepts values from 0 to 255 so we use the map function here to linearly scale sensor value down - values between 0 and 255 then the analog right function takes the number

stored in output value and uses it tocontrol the voltage on analog output pin which is in fact pin number 9 the serial printing stuff is similar to what we had before and at the end of each loop the delay function will make the Arduino pause the execution of all code for a specific number of milliseconds once again we click upload hit reset on the Arduino and now we have a system that can control the brightness of an LED with a potentiometer now you're probably thinking so what you can do that without the Arduino well let's probe the output of pin 9 with an oscilloscope to see what's really happening here we've got a pulse width modulated square wave we can control it with a potentiometer and it's very precise now instead of an LED let's control something else let's take this part of the circuit from my classic pulse width modulation tutorial and now we'll be able to control a motor digitally instead of a sometimes glitchy 5-5-5 circuit so you might be thinking that it's weird that an Arduino function called analog right is in fact controlling a pulse width modulated square wave well the idea is that you would use an RC low-pass filter to convert that square wave into a continuous analog voltage and I have separate tutorials on how to do this once you've looked at a few examples and understand how they work you can delete pieces of code and modify existing pieces of code to create whatever you want here I've gotten rid of the potentiometer control and serial stuff and I created a loop that turns a motor off for one second turns the motor on at 50 percent speed for one second and then goes full speed for one second so you can see how by reading voltages from sensors and writing code to control motors and servos and Arduino can easily become the brains of a simple robot in fact you can get kits to build arduino based robots for as little as seventy four dollars so those were just two easy examples of what you can do with an Arduino but you can do so much more and there are tutorials all over the internet for them thank you for watching and if you found this video useful please check out my sponsor auible audible is a company owned by Amazon and basically they have a huge selection of audio books that you can buy and listen to on the way to work or when you're at the gym they've got a promotion right now where you can get a free audio book if you sign up for their free 30-day trial by visiting audible.com slash a fro tech mots once you're there you can log in with your existing Amazon account you need to give them a credit card number but you can cancel your free trial at any time and you still get to keep the free audiobook I personally like ryan holiday he's got this amazing book called trust me I'm lying confessions of a media manipulator he's got these crazy stories about how anyone can pose as a fake expert and get quoted in news articles once you pick out your free audiobook you download the audible app on your phone or tablet and you can access your audiobooks from anywhere if that sounds interesting to you click on the link in the video description section or visit audible.com slash after tech mods to start your free trial


Saturday, 27 June 2020

Arduino vs Raspberry Pi! Apa perbedaannya?

Hello,here to learn something new well to keep those knowledge gears greased remember to subscribe and hit the notification button to get notified when a pop and fresh video is ready for your consumption. In the history of nerd debates you have classics like Windows vs Mac, Edison vs Tesla, AMD vs. Intel and now Arduino vs Raspberry Pi .


Which one is superior which one should you get let's find out why is it that these two frenemies are always being compared to one another probably because they're about the same size you can control electronic components with them and they're both very popular amongst the tinkering community but they couldn't be more different it's like comparing a calculator to a laptop here's why let's look at the Arduino this is the device you want if all you want to do is control electronic components and nothing else you can add motors light sensors and even wireless and Bluetooth modules to it making it the perfect platform for building robots the heart of the Arduino is this little chip right here this is known as a microcontroller microcontrollers are chips that were created by Texas Instruments the same people that made it big on developing calculators so comparing this to a calculator really isn't that far off these microcontrollers have basically everything they need to store run and execute programs right within the chip itself and they don't require much power to run you'll often see them powered by 9-volt batteries our dueƱos come in all different shapes and sizes so no matter what size project you have there's most likely an Arduino out there for it they also have options for easily attaching pre-made peripherals called shields these sit on top of the Arduino like so and you can use them to easily add Bluetooth cellular Ethernet motor controls LCDs and tons of other components even though microcontrollers are mostly self-contained you still have to connect it to a computer in order to program it but once you've uploaded your code to the microcontroller could then disconnect it from the computer and let it run as a standalone device the code it uses a similar to the c-sharp programming language but there are a few third-party options out there for programming it using Python or blockly but this arduino software that it's running is the primary way to program the microcontroller alright raspberry pi come on down it's your time in the hot seat okay unlike the Arduino and it's do-it-all microcontroller the Raspberry Pi sports a microprocessor which requires assistance from separate chips to be able to store run and execute code so if you're familiar with the motherboard of the computer the microprocessor is the processor the heart of the computer and then you have the RAM your graphics controller Ethernet controller and your hard drive and all these other separate components that are required for the computer to run so if you shrink all that down to a single board you've got yourself a Raspberry Pi so being an entire computer itself you can see why it's difficult to compare it to an Arduino the PI has built-in USB graphics wireless Bluetooth and audio and it runs the Linux operating system so you can literally use it like you use any other computer but because of that it also requires more power than the Arduino to run and the added layers of chips and software not only make it a lot more complex than the Arduino but also make it more complex to operate so why then does it get compared so much to the Arduino it's because of these these are known as general purpose input output pins and like the Arduino they can be used to control other electronic components while they aren't as extensive as the pins enlarge we know they can still be used to do a lot of the same things like controlling lights motors sensors and LCDs to program these GPIO pins instead of connecting it to a separate computer like you would have to do with an Arduino you can program them directly from the PI since it is itself a computer Python is the primary programming language for programming these pins but then you can also use some of the more popular that are out there similar to the Arduino shields the PI's have something called hats that sit on top of the GPIO pins and allow you to easily add pre-made components PI's have three different sizes to choose from as well so that you can get the right one that fits your project size enough with the details already just tell me which one I should buy well since they're completely different tools it depends on what type of project you're doing you wouldn't want to buy an entire computer just to solve a math problem and you wouldn't want to buy a calculator to watch youtube videos if all you want to do is work with sensors and robotics than buying a Raspberry Pi would be overkill an hour do we know would be a better choice for that however if you wanted to add elements of a computer to your robotics or sensory projects like adding a webcam USB storage or making it a webserver then a Raspberry Pi might be better look at it this way if you wanted to build a Bluetooth controlled toy car and use an Arduino if you wanted to build a Bluetooth controlled toy car with a webcam that livestreams to twitch get a Raspberry Pi here's my recommendation if you're a beginner just getting started tinkering I recommend going with Arduino it's designed for beginners and it's simple to use once you're comfortable with that you can move on to the Raspberry Pi and add that level of operating system and software difficulty that's it for this chapter of the fill'd guide that's one more tinkering tool to add to your toolbox want to suggest a guide head on over to demphasize.com slash ideas to submit your idea if you want more tinkering videos you can click here or please be kind enough to like subscribe or comment if you made it this far here's your reward the very first domain name ever registered was w WM bollocks comm and it was registered on March 15 1985