2:3

Sorting Yard

Sort trains with your program. Read a sensor to tell what kind of train is coming, then throw the points to send it the right way.

Easy – Hard3 levels1 device
Play this mission

No hardware, no sign-up: press Play and every mission runs on 3D simulated devices.

Passenger and freight trains come out of a tunnel in a mixed-up order. Freight wagons are taller, so only they reach the cargo sensor mounted up high. Your program reads it and throws the points before the train gets there: passengers to town, freight into the yard. Throw the points while a train is on them and it comes off the rails!

What you'll learn

  • If-then: read a sensor and pick the right way
  • Timing: decide and throw the points before the train arrives
  • Counting by kind: two counters, one for each kind of train

Levels

  1. Left or right?: freight goes right, passengers go left
  2. Passengers only: passenger trains stop 3 seconds at the platform, freight runs straight through, with the signal
  3. Count them apart: faster trains, and each kind counted on its own counter

More missions

Rush Hour

Run a traffic gate with blocks. Open it for each car, close it once the car is through, then add traffic lights and a car counter.

  1. Let them through
  2. Traffic lights
  3. Count them
Easy – Medium3 levels1 device
Play this mission

Crossroads

Run two gates at a crossing from one program. Let one road go at a time, with no crashes.

  1. Take turns
  2. Two traffic lights
  3. Busy junction
Medium – Hard3 levels2 devices
Play this mission

Next Station

Run a train station from your program. Stop each train long enough for its passengers, then send it on its way.

  1. All aboard
  2. Station signal
  3. Express!
Easy – Hard3 levels1 device
Play this mission

Rocket Landing

Launch a rocket booster to space, then fly it back down and land it standing up, like SpaceX. Your program reads the speed detector and works the engine itself.

  1. To space and back
  2. Droneship
  3. Low fuel
Easy – Hard3 levels1 device
Play this mission