Answered You can hire a professional tutor to get the answer.
The CodeProcessor._listen function will be called every 20ms with a new array of pixels which could correspond to part of a tap or part of a gap...
The CodeProcessor._listen function will be called every 20ms with a new array of pixels
which could correspond to part of a tap or part of a gap (according to the brightness of the
square ). While you won't know how long a tap or gap lasts initially (as it can 3 be different for
each message) you can assume that it won't change while the message is being sent.
Write code that is able to determine whether the current square corresponds to a tap or a
minigap and use the timestamp given with each array of pixels to determine how long a tap
corresponds to. You may need to do some investigation to decide what classifies as a tap or
a minigap.
[Javascript]