1 / 17

Introduction to Programming

www.MrSheasPage.weebly.com. Introduction to Programming. Action Tab. Medium Motor Large Motor (Individual) Large Motors Steering Large Motors Tank. Brick Screen Display Brick Sounds Brick Button Lights. Move Steering Block.

hung
Download Presentation

Introduction to Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. www.MrSheasPage.weebly.com Introduction to Programming

  2. Action Tab • Medium Motor • Large Motor (Individual) • Large Motors Steering • Large Motors Tank • Brick Screen Display • Brick Sounds • Brick Button Lights

  3. Move Steering Block This program block controls two motors at the same time in sync with each other. • Mode selector (first right) let you control the duration that the motors turn. • Block inputs provides the following functions: • Steering - steer the way a robot moves • Power - speed of the motors (negative = backwards) • Number of rotation/degree/second • Controls the duration of motor movement • Brake at End • True = Break after the duration set is over. • False = Coast at the end • Port selector (right top corner) let you select the ports that motors are connected. Typically Ports B & C The program above makes a robot move forward, with peed level 50%, for one second.

  4. Move Tank Block This program block controls two motors separately at the same time. This is a more accurate way of controlling the motion of your robot. • Mode selector (first right) let you control the duration that the motors turn. • Block inputs provides the following functions: • Power left - controls the power level of left motor • Power right - controls the power level of right motor • Number of rotation/degree/second • Controls the duration of motor movement • Brake at End • True = break after the duration set is over. • False = Coast at the end • Port selector (right top corner) let you select the ports that motors are connected. Typically Ports B & C The program provided makes a robot spin on the spot for 2 second.

  5. Move Tank Basic Motion - Power L R L R L R = = = OPP. OPP. > = L R L R L R This block controls two motors separately at the same time. • Mode selector (first right) let you control the duration that the motors turn. • Block inputs provides the following functions: • Power left - controls the power level of left motor • Power right - controls the power level of right motor • Number of rotation/degree/second • Controls the duration of motor movement • Brake at End • True = break after the duration set is over. • False = Coast at the end The program provided makes a robot spin on the spot for 2 second. • Port selector (right top corner) let you select the ports that motors are connected. The program provided makes a robot spin on the spot for 2 second.

  6. Challenges Attach a marker to your robot and use a large sheet of paper. • Make your robot draw a big circle. • Make your robot draw a triangle. • Make your robot draw a rectangle. • Make some shape (You pick the shape! Draw some shapes with difficult turns!)

  7. Large Motor This block controls two motors separately at the same time. • Mode selector (first right) let you control the duration that the motors turn. • Block inputs provides the following functions: • Power left - controls the power level of left motor • Power right - controls the power level of right motor • Number of rotation/degree/second • Controls the duration of motor movement • Brake at End • True = break after the duration set is over. • False = Coast at the end • Port selector (right top corner) let you select the ports that motors are connected. • Can be changed to select any port. The program provided makes the motor spin for 1 rotation at 50% power.

  8. Medium Motor Block This block controls the medium motor. • Mode selector (first right) let you control the duration that the motors turn. • Block inputs provides the following functions: • Power - controls the power level of the motor • Number of rotation/degree/second • Controls the duration of motor movement • Brake at End • True = break after the duration set is over. • False = Coast at the end • Port selector (right top corner) let you select the ports that motors are connected. Typically Port A The program provided makes the motor spin at 50% power for 1 second.

  9. Brick Button Lights This block controls the lights around the brick buttons. • Mode selector (first right) let you control function of the light • Block inputs allows you to select the color: • Color Selector: 0 = Green, 1 = Orange, or 2 = Red • Turn off or leave turned on after command

  10. Brick Display Screen Displays and image, shapes, or words on the programmable brick’s screen EDIT Add more

  11. Brick Display Screen

  12. Brick Sounds • Produces a sound file, tone, or note from the programmable brick. EDIT Add more

  13. Flow Control • Start Block • Wait – Time • Loop Interrupter . • Switch • Loop

  14. Start Block • The beginning of a programming block sequence. • More than one can be used at a time. • All Start Blocks begin when program is run

  15. Wait Command • Waits for the amount of time specifies in seconds Time is measured from the start of the Wait Block.

  16. Loop Command • Repeats the command or string of commands inside of it. • In unlimited mode, the robot will repeat the commands forever. • Any command blocks to the right of the loop will never be run.

  17. Switch Command • Allows the robot to choose between two cases (True: & False: ) depending on the input from the chosen sensor

More Related