Using Arduino with Sporth
Today I had some initial success getting an Arduino to talk to Sporth over serial.
One of the courses I am enrolled in at Stanford this quarter is MUSIC 250a: Physical Interaction Design for Music, taught by the wonderful Sasha Leitman. It is a course whose curriculum revolves around Arduino and Max/MSP. While Arduino has open source software that allows it to be run on Linux, Max/MSP is neither open source or able to run on Linux. It was this complication that was enough motivation to build some alternative tooling using Sporth and C.
How does one read serial?
On Linux, reading from peripherals is typically a straightforwad thing, since everything is a just file on Linux. With serial, a few complications arise: baud rate is something that needs to be specified. So how does one do that?
I have built a github repository for my arduino sporth plugin so far. Eventually it will become a flexible serial messaging system for Sporth. For now, the code is a little sporadic, as I am using it on-the-fly to complete assignments for class.
I have posted some not-too-serious videos on twitter:
A simple button (Rihanna cover)
And here's a Rihanna cover. pic.twitter.com/1rfCeE13uu— Paul Batchelor (@yesthisispaul) October 7, 2016