870 likes | 1.16k Views
LOGO Programming Part 4. LOGO Programming Part 4. What’s on your diskette?. LOGO Programming Part 4. Use the F ile selection on the main menu bar along the top of the LOGO screen. The LOGO Screen. LOGO Programming Part 4.
E N D
LOGOProgrammingPart 4 Industrial Computer Awareness
LOGO Programming Part 4 • What’s • on • your • diskette? Industrial Computer Awareness
LOGO Programming Part 4 • Use the File selection on the main menu bar along the top of the LOGO screen. Industrial Computer Awareness
The LOGO Screen Industrial Computer Awareness
LOGO Programming Part 4 • Use your mouse to click on the File selection and a pull-down menu will appear. Industrial Computer Awareness
LOGO Programming 4 Industrial Computer Awareness
LOGO Programming Part 4 • Use your mouse to click on the Open... selection and a “Load PC LOGO file” dialogue box will appear on the screen. Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 • Use your mouse to click on the down arrow under the Drives selection and another pull-down menu will appear. Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 • Clear your screen and use this process to load each of the programs you created last session. Industrial Computer Awareness
LOGO Programming Part 4 • See what’s • stored • in • RAM Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 • Create a • program to • draw a • hexagon Industrial Computer Awareness
LOGO Programming Part 4 • Initially, • you write the • program the • LONG way. Industrial Computer Awareness
LOGO Programming Part 4 • TO HEXAGON • FD 25 • RT 60 • FD 25 • RT 60 • FD 25 • RT 60 • FD 25 • RT 60 • FD 25 • RT 60 • FD 25 • RT 60 • END Industrial Computer Awareness
LOGO Programming Part 4 • TO HEXAGON • FD 25 RT 60 • FD 25 RT 60 • FD 25 RT 60 • FD 25 RT 60 • FD 25 RT 60 • FD 25 RT 60 • END Industrial Computer Awareness
LOGO Programming Part 4 • There are • six • FD 25 RT 60 • instructions. Industrial Computer Awareness
LOGO Programming Part 4 • You could replace the • FD 25 RT 60 • with a single • word. Industrial Computer Awareness
LOGO Programming Part 4 • Define a repetitive motion • TO REPMOT • FD 25 RT 60 • END Industrial Computer Awareness
LOGO Programming Part 4 • TO HEXAGON • REPMOT • REPMOT • REPMOT • REPMOT • REPMOT • REPMOT • END Industrial Computer Awareness
LOGO Programming Part 4 • What • about • LOOPS? Industrial Computer Awareness
LOGO Programming Part 4 • Creating LOOPS • REPEAT X [Y] • Repeats X times the instructions in Y Industrial Computer Awareness
LOGO Programming Part 4 • Brackets [ ] are used • not • ( ) • { } • < > Industrial Computer Awareness
LOGO Programming Part 4 • Try this! • Type in • REPEAT 360 [RT 1 FD 120 BK 120] • then press Enter Industrial Computer Awareness
LOGO Programming Part 4 • Now type in • CS then press Enter • then type in • REPEAT 3 [FD 50 RT 120] • then press Enter Industrial Computer Awareness
LOGO Programming Part 4 • Now type in: • REPEAT 4 [FD 50 RT 90] Industrial Computer Awareness
LOGO Programming Part 4 • Try • REPEAT 5 [FD 100 RT 144] • Remember to press Enter Industrial Computer Awareness
LOGO Programming Part 4 • Back to the Hexagon • TO HEXAGON • REPEAT 6 [REPMOT] • END Industrial Computer Awareness
LOGO Programming Part 4 • Or, • TO HEXAGON • REPEAT 6 [FD 25 RT 60] • END Industrial Computer Awareness
LOGO Programming Part 4 • PRACTICAL • PROGRAMMING • 3 simple steps Industrial Computer Awareness
LOGO Programming Part 4 STEP 1 • Determine the goals • What do you have to do? Industrial Computer Awareness
LOGO Programming Part 4 • STEP 2 • Determine the steps How are you going to do it? Industrial Computer Awareness
LOGO Programming Part 4 • STEP 3 • Write the program and run it. Refine the program as needed to make it work Industrial Computer Awareness
LOGO Programming Part 4 • 3 Steps • 1. Determine the goals • 2. Determine the steps • 3. Write, run, and refine Industrial Computer Awareness
LOGO Programming Part 4 • Draw three squares. • One 90 units square with left edge 120 units left of origin. One 60 units square with left edge at the origin. One 30 units square with left edge 120 units right of origin. Industrial Computer Awareness
LOGO Programming Part 4 Industrial Computer Awareness
LOGO Programming Part 4 • Steps • 1. Move TURTLE to start point. • 2. Draw large square. • 3. Move TURTLE. • 4. Draw medium square. • 5. Move TURTLE. • 6. Draw small square. • 7. Hide TURTLE. Industrial Computer Awareness
LOGO Programming Part 4 • Step 1 - Move to start point • 1. Lift pen up • 2. Move to start point • 3. Put pen back down Industrial Computer Awareness
LOGO Programming Part 4 • TO FIRSTMOVE • PU LT 90 FD 120 • RT 90 PD • END Industrial Computer Awareness
LOGO Programming Part 4 • TURTLE is now in position to draw the large square. Industrial Computer Awareness
LOGO Programming Part 4 • TO BSQUARE • REPEAT 4 [FD 90 RT 90] • END Industrial Computer Awareness
LOGO Programming Part 4 • Big square is now done. Time to move to do the medium square. Industrial Computer Awareness
LOGO Programming Part 4 • TO SCNDMOVE • PU RT 90 FD 120 • LT 90 PD • END Industrial Computer Awareness
LOGO Programming Part 4 • TURTLE is now in position to draw the medium square. Industrial Computer Awareness
LOGO Programming Part 4 • TO MSQUARE • REPEAT 4 [FD 60 RT 90] • END Industrial Computer Awareness
LOGO Programming Part 4 • The medium square is now done. Time to move to do the small square. Industrial Computer Awareness