Audio Sensing - 2

Using Max to sense audio and communicate with Arduino to control speed of a stepper motor:

In this example we use the same Max MSP patch as last week. Again, we are using it as a way to sense audio, smooth it and boost it with real time controls. The app then communicates with Arduino via serial, but this time we are using it to control the speed of a stepper motor via the Adafruit motor shield V2 and the 'AccelStepper' library. The Arduino sketch uses a couple of extra libraries you will need, so make sure you read the notes at the top. 

The Max patch

The Arduino sketch