Intro CS Assignments
Assignments by week:
Fall Term:
Winter Term:
Spring Term:
Tuesday, February 5
Description
Introduction to Parts
Homework
  • Read about Using the Menu System on the leJOS site. Feel free to change the cosmetic settings on your brick (volume, name, and so on).
  • Visit and bookmark both the leJOS EV3 API documentation (if that link doesn't work, use this online version instead) and the Java 8 API documentation.

  • If you're curious, here is the code we used in class today:

    import lejos.hardware.ev3.EV3;
    import lejos.hardware.ev3.LocalEV3;
    import lejos.hardware.lcd.TextLCD;
    import lejos.hardware.Button;
    
    public class BrickInfo {
      public static void main(String[] args) {
        EV3 brick = LocalEV3.get();
    
        String name = brick.getName(); // direct access
    
        int mV = brick.getPower().getVoltageMilliVolt(); // chained access
    
        TextLCD text = brick.getTextLCD(); // intermediate
        text.clear();
        text.drawString(name, 0, 0);
        text.drawInt(mV, 4, 0, 1);
    
        Button.waitForAnyPress();
      }
    }
      

    You should feel free to take that code and make modifications to it!

Thursday, February 7
Description
SlowBot
Homework
  • Your project during next class will be to build the slowest robot possible. You'll all run a standard program that rotates the motors through a set number of rotations. You'll change the speed of your robot through careful construction. This is an engineering challenge, and so you must not intentionally cripple your robot. There are some rules you must follow:

    • Your robot must have wheels (not square blocks)
    • The wheels must be attached to the drive train (you can't disconnect the wheels so the robot doesn't move)
    • The drive train should not slip, stutter, or otherwise be inconsistent in the delivery of power to the wheels
    • Your robot must move in a straight line in a single direction (no driving in circles)
    • Your robot must move (no suspending the wheels off the ground)

    The types, size, and arrangement of components in your robot will affect its speed. Those are the items you should focus on.

  • Read the Wikipedia article on mechanical advantage.
Friday, February 8
Description
SlowBot Build
Homework