Wednesday, 14 March 2018

week 3 exercise the impossible box

Video source URL: https://www.youtube.com/watch?v=6xCd55oSgO4

Exercise outline
This exercise is to build the nessesary skills and knowledge to produce a prototype.The impossible box task requires a circuit board with a button and led as a start point. . The idea is to try and turn the light off. When you press the button to turn the light off, it will turn itself back on again after a random amount of time.  There will be an event triggered after 5 presses of the button.

Links:
Code editor https://makecode.microbit.org/

PART 1 of the impossible box

Step 1
Build a circuit board which has one LED and a Button.

Step 2
Test the prototype using the simple solution

What will happen:
The LED which is connected to P1 is turned on by default. When the button, connected to P0, is pressed. The variable time is set to a random number of 0 to 4000 milliseconds. The light is then turned off, then a pause of time is made and the light turns back on.


PART 2 of the impossible box

Rationale
So now we want to create a set of behaviors similar to the original impossible box.
BUT after 5 button presses, we want it to do something different


What will happen:
Again the light will turn off when the button is pressed, and turn on after a random amount of time. But after the 5th button press the LED screen will now display an image. You can add any series of events here, think back to the video. You could add a fake on and off turn, move the platform in a direction using a motor or different set periods of delays ( for 30 seconds instead of the maximum 4 seconds). This method allows you greater flexibility in behaviour as opposed to the simple method.

No comments:

Post a Comment