7. Title and body elements
✨ Next video coming soon!
7. Title and body elements
✨ Next video coming soon!
6. Review: What does each element do?
✨ Next video coming soon!
5. HTML and head elements
✨ Next video coming soon!
4. Review: HTML Basic Concepts
✨ Next video coming soon!
3. Identifying html, elements, and tags
✨ Next video coming soon!
2. Review: How to use the Scrimba Interface
✨ Next video coming soon!
1: Creating your Scrimba account and interacting with its interface
✨ Next video coming soon!
With a variety of video tutorials and an interactive workspace, Scrimba makes learning to code fun.
Learning to code has never been easier. Scrimba also has a responsive discord community, a wealth of YouTube livestreams, a weekly podcast, and frequently offers fun coding challenges.
Give Scrimba a try! Once you do, you’ll never code any other way!
We’ll be frequently posting Scrimba tutorials on the basics of coding which will include:
“The impact of computers has nowhere been more revolutionary than in electrical engineering. The design, analysis, and operation of electrical and electronic systems are now dominated by computers, a transformation that has been motivated by the natural ease of interface between computers and electrical systems, and the promise of spectacular improvements in speed and efficiency.” (Malek) One such person who has championed this movement is MIT graduate and electrical engineer, Limor Fried. Out of her small New York City apartment, Fried started Adafruit in 2005, an open-source hardware company.
As founder and lead engineer, Adafruit offers tools, equipment, and electronics to makers of all ages and skills levels. Through her company, Limor encourages the next generation of engineers by offering tutorials, schematics, and all the materials necessary for people to learn how to code and utilize them in different projects. Ever the hands-on engineer, she still personally selects and tests all of the products herself! Watch the video below about Limor Fried, and explore the Adafruit Industries Youtube Channel to learn more.
Malek, Dr. Manu. Computers and Electrical Engineering: An International Journal, https://www.journals.elsevier.com/computers-and-electrical-engineering. Accessed 12 Oct. 2020.
Developed by Raspberry Pi, Pico is a microcontroller board built on RP2040, a 32-bit dual ARM Cortex-M0+ microcontroller chip.
A self-contained computer, a microcontroller is a single, integrated circuit that can be programmed to perform a certain task. It’s a small processing unit with a bit of memory that can control other hardware. Look around! You probably have microcontrollers around your house that you use every day (television remote control, burglar alarm, thermostat, etc.). What’s the difference between these items and Raspberry Pico? It’s difficult to make any changes to the software that’s running on your everyday household items. However, Raspberry Pico can be easily reprogrammed with a simple USB connection. Designed for physical computing, Pico uses MicroPython to control LEDs, buttons, sensors, motors, as well as other microcontrollers.
Some type of interface is needed to interact with the MicroPython. It’s what’s known as an integrated development environment (IDE). A popular IDE for MicroPython is Thonny, which can be found at thonny.org. Just make sure you download the correct version (Windows, Mac, or Linux).
With your Pico connected to your computer and when Thonny is launched, look at the bottom right-hand side of the Thonny window (called the Python Shell) and you should see the word “Python” followed by a version number. Click there and change it to MicroPython (Raspberry Pi Pico). If you don’t see it in the list, click “Configure interpreter” and under the “Interpreter” tab, choose “MicroPython (Raspberry Pi Pico).”
In Thonny’s Python Shell window, type the following:
print("Hello World!")
Remember: punctuation matters! It must look exactly like this or you will get an error message.
Now hit the return key. You will see the words Hello World! appear in your Shell.
Let’s try another way to write a program!
This time type the same line of code in the script area just above the Shell.
Save the file by clicking on the Save icon.
Choose to save your file directly on “Raspberry Pi Pico”
Save the file as hello.py
To make the program run, you will need to click the white arrow surrounded by a green circle, located in Thonny’s toolbar.
You will now see the words Hello World! appear in the Shell.
General Purpose Input/Output (GPIO) pins allow us to talk to hardware. There are 40 pins on a Pico, where some have a fixed purpose. (More on that later.) Do yourself a favor and keep this pinout diagram handy. It will really make connecting components much easier for any project.
Located next to the microUSB connector, the SMD LED will light up when it’s programmed to do so. It’s connected to GP25. Let’s try it out!
from machine import Pin
import utime
led = machine.Pin(25, machine.Pin.OUT)
while True:
led.value(1)
utime.sleep(1)
led.value(0)
utime.sleep(1)
Breadboards are used to easily connect your microcontroller to various components – no soldering required. Simply insert your Pico, jumper wires, LEDs, resistors, sensors to connect your creations. It’s a great way to practice your physical computing skills because it can be used over and over again for a multitude of projects.
In the left image, the green lines show how the holes are connected to metal strips within the breadboard. The holes along both the top and bottom edges (called power rails) each have positive + and negative – symbols.
Resistors:
When working with physical computing projects, resistors are used to prevent LEDs from drawing too much current. This avoids damage to your LEDs and Pico.
LEDs (Light-emitting diodes):
Your Pico should have pre-soldered header pins. (If not, the header pins will have to be individually soldered to the Pico. This is for the more advanced, which won’t be shown here. Future lessons about soldering techniques will be available.)
Each leg of an LED has job to do:
Male-to-male (M2M) jumper wires:
How to set up a complete circuit
from machine import Pin
import utime
led = machine.Pin(15, machine.Pin.OUT)
while True:
led.value(1)
utime.sleep(1)
led.value(0)
utime.sleep(1)