technical writing for robotic coding!. du/products/teaching_robotc_cort...

8
Technical Writing for Robotic Coding! Pseudocode

Upload: barrie-barton

Post on 04-Jan-2016

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

Technical Writing for Robotic Coding!

Pseudocode

Page 3: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

LEGO NXT 2.0 Code

VEX Robot C Programing

PseudocodeShorthand notation for

programming which uses a combination of informal programming structures and verbal descriptions of code.

Page 4: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

What does this mean?• Pseudocoding requires you to know

how to read and write code so you can explain what a code is telling

the robot to do.

Purpose of Pseudocode

• The purpose is to create a reference that will allow you to

quickly fix any issues or alter lines of code.

• These quick references are referred to as Commands.

Page 6: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

Reading and Writing CodeturnLEDOn(GreenLED);-Turn the Green LED light on.turnLEDOff(GreenLED);-Turn the Green LED light off.startMotor(MotorRight,63);-Start Right motor at Half Speed moving forward. *A wait command must follow this command* startMotor(MotorLeft,-63);-Start Left motor at Half Speed moving in reverse. *A wait command must follow this command* wait(2);-Run the previous code for 2 Seconds.stopMotor(MotorRight);-Stop the Right Motor.stopMotor(MotorLeft);-Stop the Left Motor.

Commands

Page 7: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

Reading and Writing Code ContinueduntilTouch(BumpSwitch);-Begin, run or end program when Bump Switch is activated.untilTouch(LimitSwitch);-Begin, run or end program until Limit Switch is activated. startMotor(Claw,50/-50);-Open or close the Claw. stopMotor(Claw);-Stop claw.*A wait command must follow this command* untilLight(2500, LineFollower);-Run program or auto-correct program when sensor reads specific light reading.

Page 8: Technical Writing for Robotic Coding!.   du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals

Your Turn!

Write a Pseudocode for how you would make your favorite sandwich on the back

of your paper!