A thing that moves when it detects sound.

So I watched a video where some guy made an Arduino project where when the alarm on his phone went off, it would move away and force him to chase it.

The video: This Robot Will Force You To Wake Up - YouTube

He didn't share his code at the end of the video and I would like some code that would create the same result that is shown in his video.

Thank you.

Have you already got the robot and is it able to follow a line correctly? That's where you need to start. There are thousands of projects out there which will to do that for you.

After that all you need is a sound detector to start it moving. Of course it won't just react to the phone alarm, any loud enough noise will start it. That part can be as simple as a while statement - while (no sound detected) do nothing. Then when sound is detected it will start moving.

Steve

slipstick:
Have you already got the robot and is it able to follow a line correctly? That's where you need to start. There are thousands of projects out there which will to do that for you.

After that all you need is a sound detector to start it moving. Of course it won't just react to the phone alarm, any loud enough noise will start it. That part can be as simple as a while statement - while (no sound detected) do nothing. Then when sound is detected it will start moving.

Steve

I just wanted the code, thought the project was cool and I also don't know how to program in C.

Here’s your opportunity to learn! Arduino makes it as easy as possible and there is a ton of information available on the individual components of this project. We’re always here on the forum to help you learn.