Created
August 30, 2013 12:15
-
-
Save bmihelac/6389270 to your computer and use it in GitHub Desktop.
IrToy playing
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
$ python -m serial.tools.list_ports | |
/dev/ttyACM0 |
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
pip install PyIrToy PySerial |
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
import serial | |
import irtoy | |
sd = serial.Serial('/dev/ttyACM1') | |
toy = irtoy.IrToy(sd) | |
irCode = toy.receive() | |
toy.transmit(irCode) | |
sd.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment