Skip to content

Instantly share code, notes, and snippets.

@bennuttall
Created September 28, 2016 12:26
Show Gist options
  • Select an option

  • Save bennuttall/e2144cdcba32f2bccfc6c22158e7c8f7 to your computer and use it in GitHub Desktop.

Select an option

Save bennuttall/e2144cdcba32f2bccfc6c22158e7c8f7 to your computer and use it in GitHub Desktop.
from gpiozero import MCP3008
import os
class MusicPot(MCP3008):
def send_to_pd(self):
os.system("echo '{} {};' | pdsend 3000;".format(
self._channel, self.value)
)
pots = [MusicPot(c) for c in range(8)]
while True:
for pot in pots:
pot.send_to_pd()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment