Created
December 30, 2018 13:40
-
-
Save iani/fc9dc39655978fb9fede52144dd9657d to your computer and use it in GitHub Desktop.
concatenate input data arrays from sensor for sending on OSC
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
| while True: | |
| print("sending to osc at address:") | |
| print(clientIP) | |
| # osc.send('/controls/frobnicator', 42, 3.1419, "spamm") | |
| # time.sleep(1.0) | |
| # # print("will send accelerometer next:") | |
| # # time.sleep(1.0) | |
| # USE + TO CONCATENATE DATA!!!!!!!!!!! | |
| # alldata = sensor.accelerometer + sensor.magnetometer + sensor.gyroscope | |
| # SEND ALL DATA LIKE THIS: | |
| # osc.send('/alldata1' *alldata); | |
| osc.send('/acceleration1', *sensor.accelerometer) | |
| osc.send('/magnetometer1', *sensor.magnetometer) | |
| osc.send('/gyroscope1', *sensor.gyroscope) | |
| osc.send('/temperature1', sensor.temperature) | |
| time.sleep(0.01) # patch also works without sleep at all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment