Game Controller Lesson Three.

Slides:



Advertisements
Similar presentations
May 12-15, 2011 (red) May 6-11, 2011 (light red) Permanent Water (blue)
Advertisements

After Receiving this error code, Follow these steps to correct the problem… Click for next slide.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
SIMON Presented By: Amanda Buczkowski James Jenkins Fadi Hanna.
ECE 002 Robots and Sensors Group 14. Objectives Research sensors and their usefulness to analyze data Research sensors and their usefulness to analyze.
Oregon Robotics Tournament and Outreach Program RCX Basics.
Creating your own Handheld Games Console
Starter What is BBC micro:bit?
Bbc microbit Lesson 3 – Temperature hot medium.
Stage 1 Before you start to script the game you need to create the assets. Stage 1 will help you to create your background image, score zones, paddles.
Selection Learning Objective: to be able to design algorithms that use selection.
TESTBED ACADEMY Final Exam.
Objective of the lesson
BBC Microbit.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
BBC Microbit.
BBC Microbit.
micro:bit for primary schools – mb4ps.co.uk
BBC Microbit.
BBC Microbit.
Learning to Code with the MicroBit
BBC Microbit.
Objective of the lesson
BBC Microbit.
BBC Microbit.
Game Controller Introduction.
Selection Learning Objective: to be able to design algorithms that use selection.
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
BBC Microbit.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
BBC Microbit.
JACKS OPEN JACKS OPEN INSTRUCTIONS
Global Challenge Flashing Wheels Lesson 3.
Game Controller Lesson Two.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
BBC Microbit.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
BBC Microbit.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Global Challenge A bag for Julienne Lesson 3.
Game Controller Lesson Four.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Global Challenge Flashing Wheels Lesson 3.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Oregon Robotics Tournament and Outreach Program
Global Challenge A bag for Julienne Lesson 3.
Global Challenge Flashing Wheels Lesson 3.
1 If a Delegate wishes to request to take the floor, please press the black button located to the right of the microphone ONLY ONCE. A red light will.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Game Controller Lesson Five.
HOW TO PLAY PLAY.
Global Challenge Flashing Wheels Lesson 3.
HOW TO PLAY PLAY.
Presentation transcript:

Game Controller Lesson Three

Buttons Button How it’s connected Joypad Up P8 Joypad Down P14 Joypad Left P12 Joypad Right P13 Fire SW 1 P15 Fire SW 2 P16

Lights 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

Turn Light 1 Red

1 Move Right Algorithm Algorithm When the right button is pressed: move the light to the right Set CurrentPosition = 0 When the right button is pressed: Change the CurrentPosition by ? 1

Algorithms When the up button is pressed: Change the CurrentPosition by ? Set the CurrentPosition light red Show the lights When the left button is pressed: Change the CurrentPosition by ? Set the CurrentPosition light red Show the lights When the right button is pressed: Change the CurrentPosition by ? Set the CurrentPosition light red Show the lights When the down button is pressed: Change the CurrentPosition by ? the CurrentPosition light red Show the lights

Algorithms When the up button is pressed: Change the CurrentPosition by -8 Set the CurrentPosition light red Show the lights When the left button is pressed: Change the CurrentPosition by -1 Set the CurrentPosition light red Show the lights When the right button is pressed: Change the CurrentPosition by 1 Set the CurrentPosition light red Show the lights When the down button is pressed: Change the CurrentPosition by 8 the CurrentPosition light red Show the lights

New Algorithm When the right button is pressed Clear the CurrentPosition light Change the CurrentPosition by 1 Set the CurrentPosition light red Show the lights

Move Right

Latest Algorithm When the right button is pressed IF CurrentPosition + 1 is less than 63 THEN Clear the CurrentPosition light Change the CurrentPosition by 1 Set the CurrentPosition light red Show the lights END IF

Buzzzz When the right button is pressed IF CurrentPosition + 1 is greater than 63 THEN Clear the CurrentPosition light Change the CurrentPosition by 1 Set the CurrentPosition light red Show the lights ELSE Turn the motor on Pause for 1 second Turn the motor off END IF

Code

Code

Challenge Algorithm When the red light reaches the Ball Set CurrentPosition to 0 Turn the CurrentPosition light red Set score to 0 Display the score on the micro:bit Set Ball to 10 Turn the Ball light blue Forever: When the red light reaches the Ball Change the score by 1 Set Ball to a random number between 0 and 63 Show the light