An Arduino interface to Pusher (
C++ Objective-C C Arduino
Latest commit cd21cd6 Jan 12, 2014 @krohling Merge pull request #11 from jsmiguel/patch-1
Update add the lastest Pusher protocol.
Failed to load latest commit information.
HashMap Fix a nasty bug by using the latest HashMap from the original author. Jan 29, 2012
examples/RobotExample Removed Serial debug lines, modified RobotExample.ino to use dynamic … Jan 31, 2012
PusherClient.cpp Update add the lastest Pusher protocol. Jan 11, 2014
PusherClient.h Updated README for v1.0 Jan 31, 2012
WebSocketClient.h Migrated to Arduino 1.0, moved strings into Program Memory, Removed W… Jan 20, 2012

Arduino Pusher Client, a Pusher client developed for use on Arduino devices

Blog: World Domination Using Arduinos And Websockets

Pusher is a Push Notification service that uses Websockets for relaying messages back and forth between clients. This allows real time messaging between a diverse range of applications running on Web browsers, mobile devices and now Arduinos. It is my hope that allowing devices to easily send information about themselves as well as respond to messages received from applications and other devices will result in some interesting applications.

Installation instructions

Once you've cloned this repo locally, copy the ArduinoPusherClient directory into your Arduino Sketchbook directory under Libraries then restart the Arduino IDE so that it notices the new library. Now, under File\Examples you should see ArduinoPusherClient. To use the library in your app, select Sketch\Import Library\ArduinoPusherClient.


Included with this library is an example, called RobotExample, that uses Pusher events to drive two Servos. This example connects to a channel named "robot_channel" and binds to 5 events: forward, backward, turn_left, turn_right, and stop. When the events are received the appropriate method gets called and adjusts the angle of the servo motors, driving the robot.

How To Use This Library

Connecting to Pusher

PusherClient client;

if(client.connect("your-api-key-here")) {
else {
  //Uh oh.

void loop() {
  client.monitor();  //Must have a call to monitor() inside loop()


//Subscribing to a Public Channel

//Subscribing to a Private Channel
client.subscribe("private-my-channel", "my-auth-token");  

//Subscribing to a Presence Channel
client.subscribe("presence-my-channel", "my-auth-token", "my-user-id"); 

//Unsubscribing to a Channel

Triggering Events

client.triggerEvent("my-event", "some data about my-event");

Binding to Events

client.bind("my-event", handleMyEvent);

void handleMyEvent(String data) {
   //Do stuff here

Binding to all Events


void handleAllEvents(String data) {
   //Do stuff here


Arduino Pusher Client uses the HashMap library developed by Alexander Brevig.