Either you do some serious timing on the Arduino or you control it with a normal Raspberry Pi instead and use a Python script.
Either you do some serious timing on the Arduino or you control it with a normal Raspberry Pi instead and use a Python script.