Home / Companies / PubNub / Blog / August 2015

August 2015 Summaries

7 posts from PubNub

Filter
Month: Year:
Post Summaries Back to Blog
WebRTC (Web Real-time Communications) is an API that enables peer-to-peer video, audio, and data communication directly within web browsers without the need for additional plugins or frameworks. This tutorial demonstrates how to create a basic video chat application using WebRTC, requiring just about 20 lines of JavaScript code. The application allows users to enter a username and initiate calls between browsers. Testing the application locally might require setting up a simple server to circumvent Cross-Origin Resource Sharing (CORS) issues. The guide outlines the necessary HTML and JavaScript components, including the use of libraries such as jQuery and PubNub to facilitate WebRTC operations and signaling, which is critical for coordinating communication between users. Additionally, the tutorial discusses how to prepare the application to receive calls and the importance of obtaining publish and subscribe keys from PubNub. Users are encouraged to further enhance their application by adding features like call management, thumbnail streams, and group chatting, and to consider browser compatibility when utilizing WebRTC.
Aug 25, 2015 1,974 words in the original blog post.
The tutorial expands on a basic WebRTC video chat application by introducing group chat functionality and additional features such as making and ending calls, thumbnail streams for self-viewing, muting calls, pausing video, and handling group chats. It utilizes a wrapper class with the PubNub WebRTC SDK and SDK Wrapper libraries to simplify placing calls and managing user interactions. The guide includes detailed steps for setting up HTML and JavaScript components, handling incoming calls with publish and subscribe keys, and implementing call-related functions like login, makeCall, end, mute, and pause. To test the application locally, it advises setting up a simple server using Python to avoid CORS errors. Customization is encouraged, offering options like appending images when a user mutes their mic or changing video elements when streaming is paused.
Aug 25, 2015 2,510 words in the original blog post.
PubNub has developed a project that allows users to control physical objects from anywhere on Earth by mirroring hand movements using a combination of Leap Motion, Raspberry Pi, micro-servos, and PubNub Data Streams. The project uses Leap Motion to capture hand movements, which are then transmitted via PubNub to a Raspberry Pi that drives servos, simulating the hand's motions in real time. This setup can be applied to any internet-connected device, offering possibilities for real-time data collection and device configuration. The tutorial details assembling the components, including the use of the Leap Motion Java SDK, PubNub Java SDK, and configuring the Raspberry Pi for controlling servos through a PWM driver. The project, recognized at the IoTEvolution Battle of the Platforms, demonstrates a practical application of the Internet of Things, and the code is available on PubNub's open-source GitHub repository for further exploration.
Aug 19, 2015 2,735 words in the original blog post.
This tutorial, the second in a series, guides developers through building a connected car application using the Automatic API and PubNub. It focuses on receiving real-time vehicle data messages and displaying them on a map using the Mapbox API. The tutorial emphasizes the importance of setting up a custom application on Heroku to authorize the use of Automatic's credentials, a process explained in the preceding tutorial. Key changes to the Node.js code include the addition of script-loading capabilities and the use of CoffeeScript, which is transpiled to JavaScript, as well as the expansion of Jade views to simplify the app's structure. The tutorial explains how to initialize PubNub to handle messages from the Automatic Dashboard and provides instructions for simulating events to test the real-time mapping functionality. Ultimately, the tutorial demonstrates how to create a live-event receiver app, showcasing the potential for connected car applications and encouraging exploration of additional features available through PubNub and Internet of Things demos.
Aug 18, 2015 1,298 words in the original blog post.
Automatic is an innovative device that connects to a car's Onboard Diagnostics (OBD-II) port, providing real-time data on vehicle events through a mobile app. Costing approximately $99, it communicates with smartphones using Bluetooth LE and can report various vehicle parameters like engine status, hard braking, and overspeeding. The blog post outlines how developers can harness this data using a Heroku app to collect events and transmit them in real-time with PubNub, setting up webhooks for event notifications. It further guides developers on using OAuth2 for authorizing app permissions and deploying applications on Heroku, while also suggesting the potential for expanding the use of Automatic's data in future applications. The article sets the stage for a subsequent part that will explore displaying real-time vehicle data using the Mapbox API.
Aug 17, 2015 2,327 words in the original blog post.
The tutorial outlines the process of building a Raspberry Pi-powered smart house using LEGO, with a focus on controlling LEDs remotely via a web UI. After covering the setup of temperature and humidity sensors and real-time data streaming in Part One, this second part delves into using Pulse Width Modulation (PWM) to adjust LED brightness and create a flickering effect to emulate a fireplace. It explains how to programmatically control LED brightness by adjusting the duty cycle and describes the creation of a simple web interface using JavaScript, PubNub, and HTML5 range inputs to remotely manage LED states. The tutorial emphasizes the use of software PWM for LED control without additional hardware and provides instructions for integrating the web UI with Raspberry Pi to achieve real-time LED adjustments. The complete source code is available on GitHub, allowing users to explore and customize their smart house projects further.
Aug 04, 2015 2,466 words in the original blog post.
A comprehensive guide is presented on constructing a Raspberry Pi-powered smart home model using LEGO, focusing specifically on integrating temperature and humidity sensors with real-time monitoring capabilities. The setup involves connecting a DHT22 sensor to a Raspberry Pi Model B+ and using Adafruit's DHT library to read temperature and humidity data. This data is then streamed to a web UI via PubNub, an Internet of Things (IoT) communication platform, allowing users to visualize sensor readings in real time. The guide covers the installation of necessary software components, such as Python and PubNub, and provides a step-by-step walkthrough of setting up the circuit and programming the Raspberry Pi to communicate sensor data. This setup enables bi-directional communication between the Raspberry Pi and a web browser, facilitating real-time data updates without network restrictions. The project repository is available for further exploration, and a follow-up installment will detail remote control functionalities for other smart home components like LEDs.
Aug 04, 2015 2,035 words in the original blog post.