I don't know if it's a stupid question but I need some help.
I am trying to follow this tutorial and I want to connect my arduino to PubNub. In the tutorial it says that I have to 'open PubNub.h and switch the comments for the Ethernet and WiFi lines' with some code provided there. But, when I open the file PubNub.h the only thing in there is this:

/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */
#include "PubNubDefs.h"

class PubNub PubNub;

I'm quite new to this so I don't know much. I hope someone can help. Thank you in advance!


It appears the tutorial is now outdated and the PubNum library does not need the changes described in the tutorial.

The PubNub library has an example titled PubNubWifi101 which shows the client type being set with a #define before including the PubNub headers:

#include <WiFi101.h>
#define PubNub_BASE_CLIENT WiFiClient
#include <PubNub.h>

I don't have a MKR1000 to test with, but I was able to compile the example from the tutorial by adding that single #define after the #include <WiFi101.h>.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.