I would like to control a NAO robot with a remote control by using C#. There is only an example in Python on the Aldebaran website. Unfortunately, I haven't learnt Python. Could anyone help me convert this Python example into C#? The following links may be helpful to you. https://community.aldebaran-robotics.com/doc/1-14/naoqi/sensors/alinfrared-tuto.html#alinfrared-tuto https://community.aldebaran-robotics.com/doc/1-14/naoqi/sensors/alinfrared-api.html
# -*- encoding: UTF-8 -*-
"""
Receive and display remote buttons event:
"""
import naoqi
import time
# create python module
class myModule(naoqi.ALModule):
def pythondatachanged(self, strVarName, value, strMessage):
"""callback when data change"""
print "Data changed on", strVarName, ": ", value, " ", strMessage
# call method
try:
lircProxy = naoqi.ALProxy("ALInfrared")
lircProxy.initReception(repeatThreshold = 10)
pythonModule = myModule("pythonModule")
memProxy = naoqi.ALProxy("ALMemory")
memProxy.subscribeToEvent("InfraRedRemoteKeyReceived", "pythonModule",
"pythondatachanged")
except Exception, e:
print "error"
print e
exit(1)
time.sleep(10)
exit(0)