MAKECourse
  • Home
  • About
  • Course Materials
    • Software
    • Course Kits
    • TA hours
  • Videos
    • Intro to Programming Videos
    • Advanced Topics >
      • DAC and ADC Tutorial
      • SD Card Data Logging
      • DC Motor Control
  • Schedule
    • Syllabus
  • Student Projects
    • Awesome Prizes
    • Fall 2020 Projects
    • Fall 2016 Awesome Prize Winners
    • Fall 2016 Projects
    • Spring 2016 Awesome Prize Winners
    • Spring 2016 Projects
    • Fall 2015 Awesome Prize Winners
    • Fall 2015 Projects
    • Spring 2015 Awesome Prize Winners
    • Spring 2015 Projects
    • Fall 2014 Projects
    • Spring 2014 Projects

Lesson Plan: Week 11

In Week 11 we will do the following (please, click on the Segment links below to access the course materials):
Segment 1:
  • Learn to use external pin based interrupts
  • Use such an interrupt for reading out the Arduino Kit touch pad.
Segment 2:
  • Learn to use comparator interrupts to create interrupt events based on analog voltage signals and thresholds.
  • Use a comparator interrupt to detect a sound event (i.e. a clap or similar) with the microphone.


Homework 10: Program a simple version of the game 'pong' on the 8x8 display

Goal: Learn to program a dynamic process at the example of the classic computer game Pong. 

Set-up: Connect the the 8x8 display to the Arduino (this is the same set-up as for Homework 9). Then add a potentiometer to one of the two remaining analog pins.

Programming: Start out with your Homework 9 sketch. Add code for a 3 pixel wide 'paddle' on one side that can be moved left/right or up/down with a potentiometer. Program code that detects when the ball hits the paddle and reflects it back from the paddle.
If you are really into it, add the LCD display and show a score, adding a point for the Arduino when the ball gets behind the paddle and one for the player when the ball is bounced back from the paddle.

Helpful info:
External Interrupts: Watch our video about using external interrupts. 
Pong computer game: See here for a demo of the original game. The original single-player game is more complex than what you will do for this homework since the computer controls a second paddle.

To get credit: Come to class on the due date and present your working set-up to one of the TAs or Instructors.
[Home] [Course Materials] [Syllabus] [Student Projects] [Contact]
Powered by Create your own unique website with customizable templates.