Created
September 28, 2016 12:26
-
-
Save bennuttall/e2144cdcba32f2bccfc6c22158e7c8f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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