Hello everybody,
I am trying to run this small example code from the PubNub page:
var tessel = require("tessel");
var PubNub = require('pubnub');
var pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo',
});
console.log("hello");
pubnub.subscribe({ channel: "tessel-light", message: function(m) {
tessel.led[1].toggle();
}});
But it seems that I cannot get the basic connection to PubNub, although my Tessel is connected to my local WiFi. The code line console.log("hello") is never reached.
When I run just the code
var PubNub = require('pubnub');
var pubnub = new PubNub({
publishKey : 'demo',
subscribeKey : 'demo',
});
console.log("hello");
in the Node console of my PC, everything seems to be okay. The "hello" message is written in my console.
Does anybody have experience with PubNub? For me it is the very first time, so may be I am doing something wrong.
Thank you in advance for any support.