Home‎ > ‎

Unit 07

In this unit we will begin learning how to create new means for controlling computer programs. You will learn how to use pushbuttons to control Processing. Push buttons are one type of switch. There are many types of switches available. However, your kits only include momentary push buttons. Watch the video below on switches prior to proceeding.

Colin's Lab - Switches


First you'll need to locate your push buttons in your kit. They are on a cardboard ribbon. Clean off the cardboard tape and find some scissors. DO NOT use your mom's good sewing scissors! You'll notice the ends of the leads look a little funky. Just trim off the funky ends and then they should work in your breadboard nicely.
  1. Push Button Tutorial - Basic introduction to adding a pushbutton in Processing and controlling something in the program.
    • Assignment 7.1 - Take your code from Assignment 4.4 and modify it. Change the mouse click into a button push.
  2. Alternating Action - This is a more advanced way of using a pushbutton that has some definite advantages, but also disadvantages.
    • Assignment 7.2 - In your blog, explain how this is different from the previous push button code. You should include why you'd want to use one method or the other. Bonus points for writing a quick pair of programs to illustrate your point and include a Jing video with voice over explaining the difference.
  3. Assignment 7.3 - Wire up two pushbuttons and use them to move a box up and down the screen. You can use either the simple or alternating action pushbutton.
  4. Assignment 7.4 - Create an "Interesting" pushbutton and do something cool with it. You must include pictures (and/or video) of your button in action.