Third week homework

This week, i really enjoy the homework. I tried several ways to write code to write the same effect. Although,  it isn’t work all the time. So interesting~

home 3:

int buttonpin =9;
int buttonpin1 =10;
int ledpin =12;
int buttonState = 0;
int buttonState2 = 0;

void setup() {
pinMode(ledpin, OUTPUT);

void loop() {
buttonState = digitalRead(buttonpin);
buttonState2 = digitalRead(buttonpin1);
if (buttonState == LOW){
}else if(buttonState2 == LOW){

One thought on “Third week homework”

  1. Nice job on the code, Leng! Next time please be sure to upload your videos to a sharing site first, then embed them here in the blog. Please do not upload video files directly to the blog, as the files are too big. Thank you! =D

Comments are closed.

%d bloggers like this: