Arduino - processing: serial data to toggle mp3 file in minim

For starters, you probably should fix those import statements to be:

import processing.serial.*;
import ddf.minim.*;

It may have nothing to do with your problem, but neither processing.serial or ddf.minim are things you can import, they’re just package names.

So it’s printing out the values correctly that your Arduino board is sending? Have you tried throwing in a few println statements to see whether it’s getting into the if blocks? Do you have a playable file called ‘groove.mp3’?

P.S.
You can also the ‘</>’ button in the post editor to have code shown properly, or place the code in between two lines of triple backticks ( ``` ).

1 Like