Has anybody found a good solution to get sensor values to the main function (or any other function).
I would like to return sensorData to use it where bot.ultrasonicSensorRead was called and I haven‘t found any solution.
Can anyone help?
I have been using the PI to talk to my orion, Here is my test code for the ultrasonic:
tst program to talk to makeblock
from megapi import *
distance = 123
distance = v
bot = MegaPi()
print (“start test”)
bot.ultrasonicSensorRead(3,onRead) print (distance) idist = int(distance) if idist < 12: print("time to turn")
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.