Reputation: 53
hi I have a pepper from Softbank
and I can't figure out how to send a string from pepper behavior to a HTML page. dos anybody now wat API or what method pepper can send a string to a HTML page that is showing on pepper tablet.
HTML is in pepper behavior and is running on the tablet of pepper behavior need send just a string of info and HTML page on pepper need to catch it
function yourMethod(data) {
var a = angular.fromJson(data);
var weekday = new Array(7);
console.log(str(data));
console.log('test1');
window.addEventListener("message", yourMethod, false);
Upvotes: 0
Views: 583
Reputation: 88
Within the naoqi sdk you can find a "qimessaging.js" file(/var/www/libs/qimessaging/1.0/qimessaging.js) that helps you connect a webpage (running on the tablet) to the head of pepper.
You use these functionalities by adding the following line to the head of your html script:
<script src="/libs/qimessaging/1.0/qimessaging.js"></script>
You can also find a complete tutorial here: http://protolab.aldebaran.com:9000/protolab/tutorials/tree/master/ConnectionHtmlChoregraphe
Upvotes: 2