Say Hi to Raspberry Pi!
Raspberry Pi is a zero calorie treat for your brain! It is a tiny computer that can fit in your hand,
but it is surprisingly capable! It is an awesome platform to learn coding on, and it will do just about anything you can imagine.
For our introduction, I hooked it up to an ultrasonic distance sensor, and with a few lines of python, it was taking a picture
of anyone who came within range and saving it in a folder.
Like any computer, the Raspberry Pi is versatile. You don't have to know anything about coding to use it.
However, you can play Minecraft or whatever on your own time! We aim to make it do things just for us.
Lots of people think Python is a good language to learn on, so we'll start there.
Raspberry Pi!
In my opinion, there are lots of good computer
languages, and they all have similarities. My best advice is not to be intimidated by any of it and not to be worried about things
you don't understand. After all, you don't have to know how a car works to drive it, you just have to familiarize yourself with
the controls and the features of that particular car.
In the old days, we used to tough it out, pull out our hair, and build things from scratch. Not any more! There are some magic keywords:
import and include, which allow you to bring a package of tools called a library into your code. All you have to know is the names
of the tools, called functions or methods, and what their needs are, and you can use them!
To use the ultrasonic distance sensor, our very first line of code is:
from gpiozero import DistanceSensor
gpiozero is the name of a library that allows you access all those pins on your Raspberry Pi.
DistanceSensor is in that library.