NAO as a remote control

To use NAO as a remote control, you just have to call the following bound methods with in parameter the remote device name and the remote button name. Check in the NAO web page (Settings) to match the 2 names with the corresponding configuration file. Explanation about this are given in the section Introduction of the chapter Set a remote control (with web page).

/** * Function sendRemoteKey is used as an IR remote control. * @param pRemote : string containing the remote control name * @param pKey : string containing the button name */ void sendRemoteKey(const std::string& pRemote, const std::string& pKey );

Python example to switch ON your TV:

import naoqi from naoqi import ALProxy lirc=ALProxy("ALInfrared","127.0.0.1",9559) lirc.sendRemoteKey("My_TV_name", "KEY_POWER")

After sending a remote key, the following data will be saved in ALMemory:

Event / Data Type ALMemory Description
Data string "Device/SubDeviceList/IR/LIRC/Remote/Remote/Actuator/Value/" Last remote name sent
Data string "Device/SubDeviceList/IR/LIRC/Remote/Key/Actuator/Value/" Last button name sent





Copyright © 2010 Aldebaran-Robotics - All rights reserved