CPSC310A
Robotics

Activity 7

Driving Multiple LEDs

  1. Is Circuit 4 a serial or parallel circuit?

  2. In Circuit 4, is the global array ledPins on the heap allocated or stack allocated?

  3. How do you generate a random floating point number between 0 and 1?

  4. Create a new function in the Circuit 4 script that randomly flashes the LEDs like the randomLED function, but each LED should have its own random on and off time so it is possible for multiple LEDs to be lit at once.