Finch Security

Targeted Concept(s): 
Conditionals
Supported Language(s): 
Java

Program Name: FinchSecurity.java
Objective: Using the if-else and looping.

Use the Finch as its own security system. Place the Finch in front of a door. Using the object sensors while the door is shut just blink a red led but if the door is open (obstacle gone) then the Finch will go crazy with light, sounds and movements.

Commands:
Put this under Finch Init: boolean[] sense = new boolean[2];
Finch Sense: sense = myFinch.getObstacleSensors();
If the door is opened: if(!(sense[0] || sense[1])) {
Break out of infinite loop: break;
If/else if/else: if(condition) {
actions
} else {
actions
}
While Loop: while(condition) {
actions
}

Comments

beverly diamonds

beverly diamonds complaints Hi. First of all, it has been a great initiative. I’m impressed with the assignments. I absolutely had no idea about the finch security. I just went through some of the features. I’m really impressed. How exactly are you planning to manage?

It was funny watching it go

It was funny watching it go crazy

Elementary Programming

Thanks for sharing an accessible (very do-able) assignment/program for my elementary students:)