Mondays and Fridays 08:50 – 12:00
Download and watch videos before the class. (The 'subs' versions have English subtitles burned in.) Complete as many lab experiments as you can before the class.
A collection of useful information and recipes about programming and interfacing microcontrollers using the Arduino IDE.
Application notes covering the communication protocols we use in this course.
Data sheets and other useful information about the active devices that we use in this course.
NOTE The class has an associated development kit. Before the first class, use the kit parts list to verify that your kit has all the parts.
Class content is delivered by video. It will normally not be repeated during classes. You therefore must download and watch each week's videos before attending the class.
You should also download and try to complete each week's lab experiments before attending the class. The deadline for submission of experimental results is the first Monday following the class.
The class periods on Friday will be for answering questions about the course content and for assisting anyone who cannot make progress on the experimental part of the class.
Class summaries are posted below with details of homework assignments, etc.
Course outline. Assessment methods. Office hours, course web site. Project work environment and tools. Lecture format: interrupt and ask questions! Installing the IDE. Writing microcontroller programs.
Slides: | id2-01.pdf |
Videos: | Overview , Installing the IDE , Microcontroller programming |
Experiments: | id2-lab-01.pdf |
Sample answers for week 1 experiments:
01-blink | blinkenlichten |
Challenges:
01-morse-simple | simplest Morse code SOS generator |
01-morse-factored | move repeated actions into reusable functions |
01-morse-pattern | use a pattern like “… — …” to send a message |
01-morse-letters | decode a string like “SOS” into patterns to send |
01-morse-general | same thing extended for the entire Morse code |
01-morse-array | use an array instead of switch (trade data memory for code space) |
Homework
Download and watch all week 1 videos.
Complete week 1 lab experiments.
Download and watch the week 2 videos before next week's class.
Complete as many lab experiments as possible before next week's class.
Configuring and using the serial monitor. Reading analogue input values. Configuring and operating digital output pins. Using analogue input to control digital output. Using the serial plotter to visualise sensor data.
Slides: | id2-02.pdf |
Videos: | Overview , Serial monitor , Analogue input |
Experiments: | id2-lab-02.pdf |
Please complete as many of the experiments as possible before class.
Sample answers for experiments:
02-serial | serial monitor “hello world” |
02-serial-a0 | A0 value to serial monitor |
02-blink-a0 | analogue voltage controls blink rate |
Challenges:
02-serial-volts | report analogue voltage |
02-serial-angle | report potentiometer angle |
02-serial-a0a1 | A0 and A1 values to serial monitor |
sketch_etch.pyde | etch-a-sketch with dots (for Processing 3 ONLY!) |
sketch_line.pyde | etch-a-sketch with connected line segments (for Processing 3 ONLY) |
sketch_etch.pde | etch-a-sketch with dots (for Processing 4) |
sketch_line.pde | etch-a-sketch with connected line segments (for Processing 4) |
Homework
Download and watch the week 3 videos before next week's class.
Complete week 3 lab experiments before next week's class.
Rapid prototyping, historically and now; circuit diagrams. Electricity and Ohm's law. Protecting the microcontroller from overload. Connecting a loudspeaker safely to a digital output; generating square waves; frequency versus cycle time; playing musical notes.
Slides: | id2-03.pdf |
Videos: | Prototyping, Ohm's law , Resistor colour code , Audio output , Experiment set-up |
EN subtitles: | Prototyping, Ohm's law , Resistor colour code , Audio output , Experiment set-up |
Experiments: | id2-lab-03.pdf |
Please complete as many of the experiments as possible before class.
Homework
Download and watch next week's videos before the class.
Complete as many lab experiments as possible before the class.
Diodes and light-emitting diodes, voltage drop, current-limiting resistors. Frequency and time; pulse-width modulation (PWM).
Slides: | id2-04.pdf |
Videos: | Diodes and LEDs, Experiment set-up , Pulse Width Modulation |
EN subtitles: | Diodes and LEDs, Experiment set-up , Pulse Width Modulation |
Experiments: | id2-lab-04.pdf |
Temperature sensing. Increasing analogue resolution.
Slides: | id2-05.pdf |
Videos: | Measuring temperature, Experiment set-up , Analogue range |
EN subtitles: | Measuring temperature, Experiment set-up , Analogue range |
Experiments: | id2-lab-05.pdf |
Electronics review: series and parallel circuits, potential dividers. Light-dependent resistors. Light-dependent voltage dividers. Self-calibrating measurements.
Slides: | id2-06.pdf |
Videos: | Series/parallel circuits, Light-dependent resistors , Experiment set-up |
EN subtitles: | Series/parallel circuits, Light-dependent resistors , Experiment set-up |
Experiments: | id2-lab-06.pdf |
Connecting several LEDs. Representing LED states with a single integer. Decimal and binary number representations. Using each bit of an integer to represent an independent true/false value.
Slides: | id2-07.pdf |
Videos: | Managing multiple outputs, Experiment set-up |
EN subtitles: | Managing multiple outputs, Experiment set-up |
Experiments: | id2-lab-07.pdf |
Using LED arrays. Using all available digital outputs. Accessing the hardware I/O registers directly. Parallel digital output.
Slides: | id2-08.pdf |
Videos: | Using LED arrays, Accessing I/O registers , Experiment set-up |
EN subtitles: | Using LED arrays, Accessing I/O registers , Experiment set-up |
Experiments: | id2-lab-08.pdf , Template for 20-LED programs |
RGB LED arrays and interfacing to them. Controlling 30 LEDs with 13 digital pins. Time-division multiplexing. Interrupts, foreground and background tasks, timer interrupts to implement background tasks.
Slides: | id2-09.pdf |
Videos: | RGB LED arrays, Timer interrupts , Experiment set-up |
EN subtitles: | RGB LED arrays, Timer interrupts , Experiment set-up |
Experiments: | id2-lab-09.pdf , 09-background-display-update.ino (Timer1 example program)) |
Displaying alphanumeric information on seven-segment displays.
Slides: | id2-10.pdf |
Videos: | Seven-segment displays, Experiment set-up |
EN subtitles: | Seven-segment displays, Experiment set-up |
Experiments: | id2-lab-10.pdf |
Digital input. Momentary push-button 'tactile' switches. Pull-up resistors. Switch bounce and debouncing in hardware and software. Capacitors and time constants. Event-based interrupts for concurrency.
Slides: | id2-11.pdf |
Videos: | Digital inputs and buttons, Debouncing , Interrupt-driven input , Experiment set-up |
EN subtitles: | Digital inputs and buttons, Debouncing , Interrupt-driven input , Experiment set-up |
Experiments: | id2-lab-11.pdf |
Serial to parallel conversion. Shift registers.
Slides: | id2-12.pdf |
Videos: | Shift registers, Experiment set-up |
EN subtitles: | Shift registers, Experiment set-up |
Experiments: | id2-lab-12.pdf |
Serial communication. I2C and SPI protocols. Using the MCP3204 analogue to digital converter with SPI.
Slides: | id2-13.pdf |
Videos: | Serial communication, External ADC over SPI , Experiment set-up |
EN subtitles: | Serial communication, External ADC over SPI , Experiment set-up |
Experiments: | id2-lab-13.pdf |
Project suggestions: | id2-14.pdf |
Support files: | sine.h |
The content of this page and all materials linked from it are
Copyright © 2015–2021 by Ian Piumarta.
All rights reserved.
The author hereby grants a perpetual, non-transferable license to Kyoto University of Advanced Science and its directly affiliated high schools to use this material in original or modified form for classrom and/or online teaching.