Doing two things at once?


#1

I’ve seen the video where Codey Rocky drives along and reads colours as it drives. While it drives it turns the colours into tones.
How do I get Codey Rocky to drive and read the colour sensor at the same time?

I know how to do each of these things one at a time, but can’t see an example code of how to do them at the same time. Is it just one fast loop like this?


#2

The time will cause delay.
You may try code like this:


#3

Ok, but how do I get Cody to read the sensor and respond at the same time as driving?
As per this example with the colours and music: https://youtu.be/oyd00nBS4_8?t=109


#4

You may try to refer to below code to program by yourself:


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.