Shooting Range – Coding

Important – To make this project, you need a laser pointer (usually used for presentation and playing with cats) which is not included in the CODEBOX Starter kit.

The shooting range is a very simple and funny game which trains your manual precision skills. You aim at the light sensor with a laser pointer, if you hit it you get a point, the robot beeps, blinks and it`s arm turns in a new random position.

Connecting electronic modules

  • Light sensor → INPUT3.
  • Button → INPUT1.
  • Servo motor → OUTPUT1.
  • LED → OUTPUT3.
  • Power → USB cable → computer.

The code