Created
March 30, 2015 22:26
-
-
Save skelliam/5690bfdacc593cb8d268 to your computer and use it in GitHub Desktop.
Python script to test vw.py
This file contains 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 time | |
import pigpio | |
import vw | |
RX= 13 | |
BPS=2000 | |
pi = pigpio.pi() # Connect to local Pi. | |
rx = vw.rx(pi, RX, BPS) # Specify Pi, rx gpio, and baud. | |
msg = 0 | |
start = time.time() | |
while 1: | |
msg += 1 | |
while rx.ready(): | |
print (" ".join(hex(c) for c in rx.get())) | |
rx.cancel() | |
pi.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment