TactivergeLite

Lite / Intelligent Robotic Systems / Week 2

Week 2: Object-oriented programming

Term 1: Engineering Computation

This week you will

Lessons

  1. One blueprint, many sensors · about 40 min
    A robot has six identical range sensors, each with its own offset and its own readings. Do you write six sets of variables, or one blueprint?
  2. Objects that guard their own limits · about 35 min
    A motor is rated to 3,000 rpm. Fifteen different parts of the code set its speed. How do you make sure none of them ever asks for 3,500?
  3. Object or function? Choosing the clearer design · about 30 min
    Converting degrees to radians, modelling a robot arm with three motors, parsing one line of a CSV file: which of these deserves a class?
← Week 1Week 3 →