jordin

I'm learning electronics!

January 01, 2022

I'm a software engineer by day, but I've always wanted to learn more about electronics. I finally pulled the trigger by ordering myself an Arduino super starter kit from Amazon for Christmas. (\$38 is hard to beat!)

As I've started following along with tutorials and tinkering with small experiments, I've realized that programming as a hobby has an inherent advantage over anything that takes place in the physical world: I can save all of the programming projects I ever create and revisit them at my leisure.

With electronics, none of my early builds will last forever; I'll always take them apart when I'm finished, recycling the components they're composed of to be used again in subsequent experiments. Looking back at my journey is one of my favorite aspects of learning, so I started thinking about how I might be able to document my learning process.

It was then that I remembered..

  1. I created a basic blog with Gatsby.js around a year ago
  2. The repository for that blog still existed in my GitHub account (one of my ~40 abandoned side projects 😭)
  3. The repo was still linked on the free tier of my Netlify account

I decided there was no real excuse for me not to document my process for fun, so here we are!

Prior to ordering anything, I started watching basic YouTube tutorials. Each time an electrical component was mentioned, I added it to my cart on Amazon - I was pleasantly surprised to discover that everything is so cheap. (I'm probably going to eat my words later!)

After initially creating an order that contained a bunch of separate items, I discovered that there existed starter kits that would do a better job than I ever could of aggregating all of the separate components I'd need for my initial projects. I canceled my original order and grabbed a starter kit instead (linked higher up in this post).

My first blinking an LED, the "Hello World" of electronics My first blinking an LED, the "Hello World" of electronics

The kit I purchased came with a DVD containing a PDF (you read that right 🤢) explaining basic exercises to do with the materials included. I made it through three of them before realizing they probably weren't worth my time; the tutorials were clearly translated from another language and contained nowhere near the level of depth I was hoping for. I tossed the DVD in the trash (literally) and went to Reddit in search of something more helpful.

🗑️ 🗑️

Reddit totally delivered! After a few minutes of reading in a few different electronics-related subreddits, I stumbled across an amazing YouTube series that jumps right into learning electronics + Arduino.

The creator is an incredible explainer (former teacher/professor?) and does a great job at balancing keeping things high level vs. doing a deep dive into how things work. Here is my completion of the "homework" from Paul's 2nd video: making 3 different colored LEDs blink a different number of times in sequence.

The result:

The code:

#define RED 13
#define GREEN 12
#define BLUE 11

#define INTERVAL 200

void setup() {
  pinMode(RED, OUTPUT);
  pinMode(GREEN, OUTPUT);
  pinMode(BLUE, OUTPUT);
}

void loop() {
  blinkLight(RED, INTERVAL, 5);
  blinkLight(GREEN, INTERVAL, 10);
  blinkLight(BLUE, INTERVAL, 15);
}

void blinkLight(int pin, int interval, int iterations) {
  for (int i = 0; i < iterations; i++) {
    digitalWrite(pin, HIGH);
    delay(interval);
    digitalWrite(pin, LOW);
    delay(interval);
  }
}

Hopefully I can eventually include schematics as well once my circuits are complex enough to warrant having them.

I'm only at the end of day 2 since having received my kit and started on my journey, but I'm super optimistic about what is to come! Stay tuned!


Next I built an LED binary counter