Presentation is loading. Please wait.

Presentation is loading. Please wait.

PLTW CALIFORNIA STATE CONFERENCE FEBRUARY 19, 2015 COLIN SMITH CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA Advanced RobotC Programming.

Similar presentations


Presentation on theme: "PLTW CALIFORNIA STATE CONFERENCE FEBRUARY 19, 2015 COLIN SMITH CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA Advanced RobotC Programming."— Presentation transcript:

1 PLTW CALIFORNIA STATE CONFERENCE FEBRUARY 19, 2015 COLIN SMITH COLIN_SMITH@KHSD.K12.CA.US CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA Advanced RobotC Programming Topics

2 Multi-Tasking Limitations of Linear programming Users must be careful with what control structures are being used. Adding tasks to control different motors/sensors Sensors can be shared, motors shouldn't

3 Implementing Multitasking Works like function declaration Task can be started or stopped within main() using the StartTask or StopTask functions.

4 continued Finally, the task must be defined

5 Use of Multi-tasking Allows multiple actions to occur ‘simultaneously’ Materials sorter Emergency shutoff StopAllTasks function

6 Proportional Control Use variables for iterative control of motor speeds Sensors are required for continuous input A target value is set and is used to control the speed of the motor(s)

7 Error Inside a loop, the ‘distance’ to the target is used to determine the speed of the motor. This distance to target is often referred to as the error

8 Proportionality Instead of a 1:1 ratio between the error and the motor speed, there is often a proportionality constant used to ‘tune’ the response of the motor.

9 Tuning the Proportionality constant

10 Code – traditional motor control

11 Proportional Lift

12 Additional Resources www.vexforum.com www.robotc.net/education/training/vex/ www.robotc.net/forums/ www.robotc.net/support/webhelpfiles/ www.youtube.com


Download ppt "PLTW CALIFORNIA STATE CONFERENCE FEBRUARY 19, 2015 COLIN SMITH CENTENNIAL HIGH SCHOOL BAKERSFIELD, CA Advanced RobotC Programming."

Similar presentations


Ads by Google