Pre-class Assignment

Complete the participation activities in sections 4.1 and 4.2 (you do not need to do the blue challenge activities). Start working on lab 1 (help is available during lab Weds.)

Announcements

Learning Objectives and Outcomes

In this lecture you will:

By the end of this lecture you should be able to:

Lecture Content

Example codes

#include "mbed.h"

DigitalIn row1(ARDUINO_UNO_D2,PullUp);
DigitalIn row2(ARDUINO_UNO_D3,PullUp);
DigitalIn row3(ARDUINO_UNO_D4,PullUp);
DigitalIn row4(ARDUINO_UNO_D5,PullUp);

DigitalOut col1(ARDUINO_UNO_D6);

int main() {
		col1 = 1;

    // wait indefinitely for keypress
    while (1){
        col1 = 0;
        if (!row1){
            printf("1");
        }
        else if (!row2){
            printf("4");
        }
        else if (!row3){
            printf("7");
        }
        else if (!row4){
            printf("*");
        }
		}
}