1

I want to upload the real time data of ultrasonic sensor attached to my Arduino Uno and I have been using esp8266 module for the WiFi connection.

I want to upload to PubNub but I don't know how to start writing the code for PubNub and where do I have to write the code.

I have the code working on my Arduino using the ultrasonic sensor in C++ language, printing the readings on the serial monitor. However, the code will be definitely changed in order to upload the sensor readings to PubNub.

On PubNub the most used SDK is JavaScript and I'm not very familiar to it. For C++ the most used SDK is Posix but it seems way more difficult more than JavaScript. So how I have to translate the code from C++ to JavaScript to get it published on PubNub?

Sorry, I am completely new to this stuff therefore I don't know much about it.

1

The PubNub website has a link to an Arduino library:

https://github.com/pubnub/arduino

Although it doesn't have specific support for the ESP8266 per se, it does support the Arduino Ethernet Shield, Arduino Wifi Shield and Arduino Wifi101 Shield, so I would imagine it wouldn't be hard to adapt the code.

Be aware that for the Arduino Uno, the SRAM will be fairly limited, where as the ESP8266 contains 96 KB of DRAM.

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.