Electronics Bash

Electronics Bash: Livestream Electronics Classes

If you're interested in the technology behind these streams, I wrote up the state of my setup following the first 22 classes.

Episode 31 - Using Analog Dials

Analog dials just look so darn classy, right? But with the world moving ever more toward digital control, is there any point in continuing to have them on our workbench projects? And even if we did, could we even control them via our digital controllers?

Of course, and yes we can. We'll look at:

  • The basics of how an analog meter works.
  • Determining what type of meter you have/you're looking for without blowing it up
  • Driving a meter via analog or digital control, including Arduino
  • Creating a new legend or faceplate for your meter

This episode was be streamed live on YouTube on Sunday, October 24 2021.

The thumbnail image for this weeks class, as it appeared on YouTube.

Introduction to Raspberry Pi

The Raspberry Pi single board computer launched a revolution in the availability of low-cost computers for hobby projects, education, and experimentation. For less than $40, the amount of processing power, interconectivity, and flexibility a user gets out of these boards is staggering. We'll be looking at what the Raspberry Pi is, what it can do, and - since the original 20 episodes of Electronics Bash focused on the Arduino - how the two systems compare to each other.

Episode 30 - Regular Expressions

Doncha hate it when you do a bunch of calculations, download a bunch of data, or generate a ton of useful python objects, only for them to vanish when your program ends? Wouldn't it be nice if there was a way to preserve data on some kind of physical media in-between program runs, so you could save and reuse data? Or even make use of data that other people had created before? If only...

Is reading and writing data from files the ~sexiest~ thing you can do with code? No. Is it one of the most useful? Oh yeah. We'll look at:

  • Reading and writing plain text in files
  • Reading and writing structured data using JSON
  • Reading and writing raw python objects using Pickle
  • Strategies to avoid re-generating data when not necessary
  • How to avoid using too much web data my caching locally

Code and Circuit Diagrams here!

This episode was streamed live on YouTube on Sunday, January 3 2020.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 29 - Problem Solving Live

No, I don't intend to light my code on fire... but then I didn't mean to set my circuit board on fire last week, and we saw how that turned out.

The holidays are here, and with them, the annual Advent of Code challenge! This festive yuletide tradition presents a language-agnostic coding challenge for each of the first 25 days in December. This week, we'll use the first five challenges as an excuse to talk about problem solving, list comprehension, and iterables in Python. Then we'll try and solve the Day 6 challenge in real time! Fingers crossed!

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, December 6 2020.  The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 28 - 'Saving' the Day

Doncha hate it when you do a bunch of calculations, download a bunch of data, or generate a ton of useful python objects, only for them to vanish when your program ends? Wouldn't it be nice if there was a way to preserve data on some kind of physical media in-between program runs, so you could save and reuse data? Or even make use of data that other people had created before? If only...

Is reading and writing data from files the ~sexiest~ thing you can do with code? No. Is it one of the most useful? Oh yeah. We'll look at:

  • Reading and writing plain text in files
  • Reading and writing structured data using JSON
  • Reading and writing raw python objects using Pickle
  • Strategies to avoid re-generating data when not necessary
  • How to avoid using too much web data my caching locally

Code and Circuit Diagrams here!

This episode was streamed live on November 22, 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 27 - Graphical User Interfaces

Sick and tired of typing? Bored of button mashing? Tucked out by using the terminal? What if you could interact with your programs using a graphical user interface you designed yourself? No more of that boring old typing-everything-out style of interaction. Now, we've got mice!

This week, we'll look at using TK/TKinter to build simple graphical interfaces to underlying Python programs.

  • Topics Include:
    • The structure of a TKinter GUI program
    • Various TKinter widgets
    • Layering a TKinter program over your existing code

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, November 8 2020. The full episode is archived on YouTube.

 

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 26 - Pumpkin Pi

Jinkies! What's that over there? It looks like a Raspberry Pi... but headless! Let's get out of here!

No worries gang, it's just our regular old Raspberry Pi python programs in a mask. This week, we'll built a spooky Halloween prop, incorporating some of the skills we've learned so far. We'll drive a couple of servo motors, some LEDs for the eyes, playback sound, and link it all to the internet so we can tell when the sun goes down and things should get spooky.

  • Topics Include:
    • Sound Playback
    • Sunset/Sunrise API
    • The polling loop
    • Multitasking

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, October 24 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 25 - Object Oriented Programming

What is an object? Is it just a list of numbers, strings, and data? Not at all - each thing has its own unique behavior, identity, its core, its platonic ideal of "thing"-ness. And we can represent the true nature of each thing by using Object Oriented Programming approaches.

Too abstract? Yeah maybe. Come join us for this week's lesson, I promise things will make more sense.

Topics Include:

  • Python classes
  • Using existing classes
  • Creating our own classes and instances
  • Using classes to organize behavior
  • Making a simple game with PyGame and OOP

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, October 11 2020.  The full episode is archived on YouTube.

 

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 24 - Visual Displays

Some get into programming computers to look at data on a chart, but let's be real - we want to make shiny things in lots of pretty colors! Today we're looking at how to use a fundamental graphics library to make visual displays in Python on the Raspberry Pi.

Topics Include:

  • The PyGame library
  • Drawing to the Screen
  • Primitive objects (lines, rectangles, circles)
  • Including images
  • The perpetual loop

Code and Circuit Diagrams here!

This episode was live on Sunday, September 27 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 23 - Raspberry Pi and the Internet

One computer isn't cool. You know what's cool? A billion computers. And a few million other computers to connect them together. This week, we'll continue delving into programming on the Raspberry Pi with Python, and how we can connect to the internet to receive data, scrape websites, and influence our programs with online data.

Topics Include:

  • Getting web data with the Requests library
  • Parsing HTML using Beautiful Soup
  • Python Dictionaries and Sets
  • API's - what are they and how can we use them?

Code and Circuit Diagrams here!

This episode was live on Sunday, September 13 2020. be The full episode is archived on YouTube.

 

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 22 - GPIO: Inputs and Outputs

So the Raspberry Pi is just a computer, right? A nice cheap computer, but just a computer... except this computer makes it really easy to tap into low-level GPIO interface lines to respond to buttons and switches and show its state on outputs like LEDs and speakers.

This week, we'll continue delving into programming on the Raspberry Pi with Python to make things blink, flash, and respond.

Topics Include:

  • -GPIO Core Concepts:
    • Voltages
    • Currents
  • Flashing, blinking, and dimming external LEDs
  • Responding to button and switch inputs
  • Python tidbits like:
    • importing other modules
    • user-defined functions
    • The time, gpiozero, sys, and random modules

Code and Circuit Diagrams here!

This episode was streamed live on August 30, 2020.  The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 21 - Python and Pi

There are many ways of getting your Raspberry Pi to do things on its own - different languages, different scripts, different schedulers. Let's introduce a simple but powerful language - Python - that will form the core of our interactivity on our devices.

Topics Include:

  • What is Python?
  • Programming in Python on the Pi
  • Basic program structure and commands
  • Interpreted vs. Compiled Languages

Code and Circuit Diagrams here!

This episode was live on Sunday, August 16 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 20 - What is Raspberry Pi?

The Raspberry Pi is the most popular single board computer, and has opened up an enormous landscape of the kinds of projects that are accessible to hobbyists, robotics, educators, and tinkerers. But what exactly is a Raspberry Pi? And where do you get started with one? That's where we'll dive in this week, at the very beginning.

Topics Include:

  • What is a Raspberry Pi?
  • What is it useful for?
  • How is it different from Arduino?
  • Where to start?

Code and Circuit Diagrams here!

This episode was live on Sunday, August 8 2020. The  full stream is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Introduction to Arduino

Over the 10+ years I've been working with Arduinos, the most common questions I've gotten are: what is it, what can it do, and how do I get started? In this series of livestreams, we'll start from the very basics of what an Arduino is and what it's useful for, and work through useful inputs, outputs, and programming structures. Newcommers should find plenty of information to get them started and inspired, and hopefully long-time users learn something new.

Episode 19 - Fantastic Parts and Where to Find Them

How do you find just the right part for your electronics project? What even is the right part? And where can you find it? This week, we'll be exploring a to of electronics suppliers, from those who focus on hobbyist materials to professional electronics vendors,. We'll look at the various product lines, Arduino variants, sensor families, and so on that they bring to the market, so you can find the best parts for you.

Topics Include:

  • Hobbyist Suppliers
  • Overseas Internet Suppliers
  • Warehouse Suppliers
  • Professional Hardware Suppliers
  • Professional Parts Suppliers

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, July 26th 2020.  The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 18 - Timers

The ATmega328 in a typical Arduino has three powerful Timers that allow us to schedule events, manipulate time, and keep ourselves on track. In fact, we've been using them all along in things like AnalogWrite and Delay. This week, we'll unlock the power of Timers and Timer Interrupts.

Topics Include:

  • Timers in the ATmega328
  • Timer Interrupts and Configuration
  • Timers and built-in Functions (AnalogWrite, Tone, Millis, Delay, Servo)
  • Using timers to build new code

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, July 19 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 17 - Control Registers

The code we write for an Arduino is ultimately meant to get certain bits and bytes into the microprocessor so that it does what we want. This week, we'll continue to peek behind the curtain and see how standard Arduino code represents modifications to various places in the microprocessor's memory, and how we can directly access those places to gain faster, tighter, more precise control of the Arduino.

Topics Include:

  • The Three Types of Memory
  • What is a register?
  • Register Access
  • Bitwise Math
  • Introduction to Timers?

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, July 12th 2020.  The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 16 - Hardware Interrupts

Writing interactive code without interrupts can be like waiting for a letter to come - you have to keep checking the mailbox to see if any new info has arrived. Interrupts are like an alarm on your mailbox that draws your attention so you don't need to keep checking. They're powerful, useful, and a little finicky - they'll be our subject this week.

Topics Include:

  • Interrupts
  • ISRs
  • The 'volatile' quantifier
  • Timers

Code and Circuit Diagrams here!

This episode was live on Monday, July 6th 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 15 - Long Distance Communication

We've got a couple ways to pass signals between Arduinos sitting next to each other on the workbench now, or even 50' away via a wireless dongle. But what if you need to get signals from 1000' away or more?

That's where a robust wired system based on RS485 can help. As a physical protocol, RS485 won't get you there alone - you'll need a communications protocol built on top of it to actually pass data. This week, we'll look at DMX, the most common control protocol in the entertainment lighting field, how it relates to DMX , and how you can use both to pass messages long distances.

Topics Include:

  • RS485 fundamentals
  • The OSI Model
  • DMX (Digital Multiplex)
  • Network Topologies
  • Singalling and Addressing schemes
  • Transmission lines, impedance, and ternimation

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, June 28 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 14 - Wireless Signals

Why wires? Not not... not wires? This week, we'll look at ways of passing simple wireless information between two or more Arduinos.

Topics include:

  • Radio and Wireless fundamentals
  • ASK/OOK Radio Signals
  • The Radiohead library that sends wireless information
  • *Pointers

Code and Circuit Diagrams here!

This episode was streamed live on Sunday, June 21 2020. iThe full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 13 - Creating a Printed Circuit Board

Hand soldering a prototype is all well and good. Heck, making two or three of a thing isn't too bad. But what if you need ten widgets, all wired together the same way? Or a hundred? Or you're using parts too small to be wired to perfboard? These are situations where an inexpensive Printed Circuit Board (PCB) comes in handy.

PCBs are easier to design, order, and use than ever! In this session we'll look at:

  • Schematic Capture (getting your circuit design into the computer)
  • Circuit board layout
  • Creating custom parts and part footprints from a datasheet
  • Ordering a circuit board from an online board house

Code and Circuit Diagrams here!

This episode was live on Sunday, June 14th 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 12 - Soldering

Getting one thing to stick to itself? Not so hard. Getting two bits of metal to stick together in a way that conducts electricity? Just a little bit harder. So this week, let's do it together. Let's look at soldering.

Topics include:

  • Hand soldering skills
  • Types and mixes of solder
  • Soldering iron and tip species
  • Soldering thru-hole and surface-mount parts
  • Soldering safety
  • Hot air and soldering rework
  • Desoldering with hot air, solder braid, and solder suckers

Code and Circuit Diagrams here!

This episode was live on Sunday, June 7th 2020.e The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 11 - Making it Permanent

So you've made a cool thing with an Arduino Uno that works fine on the workbench. But when you try to install it somewhere for long term use - wires start falling out, components come out of the breadboard, it's a big ole mess. There must be a better way to make Arduino projects more permanent. We'll look at several topics in this vein, including:

  • Working with sodler-able perfboard/protoboard
  • Transferring the Microprocessor itself from the Arduino to a breadboard/protoboard
  • Programming microprocessors without the Arduino itself
  • Working with smaller/cheaper microprocessors (ATMEGA, ATTINY) to cut down pricing on large-scale projects

Code and Circuit Diagrams here!

This was live on Sunday, May 31st, 2020.  The full episode is archived on YouTube..

 

 

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 10 - Write Better Code

The joy of the Arduino is that you can get the thing running while writing really bad code. Heck, you can make it do really interesting things while writing really bad code. But what if... and hear me out... the code.... was good?

This week's stream will focus on coding strategies and common coding patterns, including:

  • Arrays are Your Friend
  • Delta Time avoids delay()
  • Switching Program MODES

Code and Circuit Diagrams here!

This episode was live on May 24th, 2020. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 9 - Batteries

Being plugged into the wall is great and all, but wouldn't it be nice if your project could come with you? This week's stream will focus on batteries - using them with Arduino, what types have what ramifications for your project, and what do you need to watch out for. We'll focus on:

  • Basics of using batteries with Arduino
  • Different types of batteries and battery chemistries
  • Using voltage regulators
  • Using voltage dividers

Code and Circuit Diagrams here!

This episode was live on Sunday, May 10th. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

 

Episode 8 - Remote Control with Infrared

Are you still actually physically touching your Arduino creations to control them? Walking across the room to adjust them like a caveman? Harness the power of infrared remote controls to control your circuits from a distance - and how to turn things around and control your TV from your Arduino.

This week's stream will continue our look at Arduino, the most popular microcontroller on the planet. We'll focus on using infrared communications, both to control the Arduino from a remote and using the Arduino as a remote to control other things (computers, TV's, LED Candles, etc.)

Topics Include

  • Using the IRLib library to decode infrared messages from a remote
  • Responding to remote messages to do things within your Arduino sketch
  • Using IRLib to send messages to other IR-controlled things

Code and Circuit Diagrams here!

This was live on Sunday, May 10th. The full episode is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 7 - Text Displays and Multicolor LEDs

What if your Arduino project could talk back to you, without having to hook it up to a serial console your computer? Or maybe you want to use a little multicolor LED to tell you the status of how you're Arduino's doing - or a lot of LEDs to make a psychedelic light show. This week, we're adding dot-matrix text displays and RGB/Bi-color LEDs to our Arduino toolbox, focusing on:

  • Using the LiquidCrystal library to drive LCD displays
  • Strategies for working with text and cursors
  • Controlling multicolor LEDs
  • Tips for working with color and color values

Code and Circuit Diagrams here!

This episode was live on Sunday, May 3rd. The full recording is archived on YoutTube.

 

 

The thumbnail image for this weeks class, as it appeared on YouTube.

Episode 6 - Putting it Together

After a couple of very hardware-centric weeks, this week's focus will be on programming. Specifically, how do we take this individual skills we've built up - reading a button or switch, lighting up an LED or turning a motor - and string them together into our very first game?

Topics Include

  • "Returning" from methods
  • Pseudocode and code planning
  • Code encapsulation and breaking down high level concepts
  • A little more hardware, including:
    • Shift Registers and their function in driving lots of outputs
    • ShiftOut() for sending data to shift-registers

Code and Circuit Diagrams here!

This episode was live on YouTube on Sunday, April 26.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

 

Episode 5 - Transistors and FETs

Feeling a little limited by the 5 Volts and 20 milliAmps that the Arduino can provide? In this Sunday's stream, we'll incorporate transistors and FETs into our toolbox, to allow for driving higher power loads. We'll look at topics like:

  • What are bipolar transistors?
  • What are FETs?
  • How to select the right transistor or FET for your product?
  • Using transistors and FETs to drive high power/high voltage loads, including:
    • LED tape
    • Lamps
    • Motors

Codeand Circuit Diagrams here!

This episode was live on Sunday, April 19 2020. The full stream is archived on YouTube

The thumbnail image for this weeks class, as it appeared on YouTube.

 

 

Episode 4 - Electricity Fundamentals

This week we're going back to basics, diving into fundamental concepts like:

  • Voltage
  • Resistance
  • Current
  • Power
  • How electricity do

Code and Circuit Diagrams here!

This episode was live on YouTube on Sunday, April 12.  The full stream is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

 

Episode 3 - Servos and Steppers

This week's stream focused on motion control, including:

  • Stepper motor control
  • Serial control
  • The DO...WHILE loop
  • randomness and the random() function

Code and Circuit Diagrams here!

This episode was live on YouTube on Sunday, April 5.  The full stream is archived on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

Episode 2 - Flashes Beep and Boops

Picking up where we left off last time, this stream covered

  • Analog Output
  • The Serial console, input and output
  • The basics of Casting variables (String(), Int)
  • Analog Input
  • Potentiometers
  • The map() function
  • Buzzers and the tone() function

This episode was live on Sunday, March 29 2020. The full recording is available on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.

 

 

Episode 1 - Introductions and Basic I/O

In the first episode of this streaming adventure, we covered:

  • What is Arduino? What can it do?
  • Software installation
  • Fundamentals of Arduino code (setup, loop)
  • Digital Input and Output
  • Introduction to Variables
  • Conditionals (if... then... else)
  • FOR loops
  • millis() and the basics of time

This episode was streamed live on March 22, 2020. The full recording is available on YouTube.

The thumbnail image for this weeks class, as it appeared on YouTube.