Skip to content

spatialpixel/procession-espnow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProcessionESPNOW

This is a simple Arduino library for interacting with Spatial Pixel's "Procession" app via the ESP-NOW protocol supported by ESP32 boards (e.g. Arduino Nano ESP32).

What is Procession?

Procession is a spatial computing web app that enables designers and creatives to prototype interactive experiences with natural language programming techniques.

How It Works

This library simplifies connecting an Arduino Nano ESP32 (or similar ESP-NOW-enabled model) to a Procession browser client with the ESP-NOW protocol.

This typically requires at least two ESP32 boards:

  1. one to act as a "Mediator", whose purpose is to forward ESP-NOW messages to and from Procession, and
  2. at least one "Talker", an individual ESP32 device with sensors, etc.

This enables Procession to program and interact with many devices wirelessly without the need for Bluetooth, WiFi access, or direct USB cable connections (except the Mediator).

This library only works with ESP-enabled Arduino boards supporting ESP-NOW.

Setting up a Mediator

You'll first need to use an Arduino board as a "Mediator" that is connected via USB to the computer you're running Procession on.

First, get the MAC address of your board. Record this for the Talkers below.

Mediators really just forward messages back and forth between Talkers and a Procession instance. The included example procession-simple-mediator.ino should suffice. Feel free to modify it.

Setting up a Talker

Include the Talker header and create an instance with the MAC address of the Procession Mediator.

#include "ProcessionTalker.h"

ProcessionTalker procession(F("DC:DA:0C:20:FA:88"));

Start WiFi and ESP-NOW. This library has some helper functions for that already included, but you can write your own as well.

void setup() {
  // some code
  initWifi();
  initESPNow();
  // more code
}

Start the Talker instance after WiFi and ESP-NOW are initialized:

void setup() {
  // some code
  initWifi();
  initESPNow();
  procession.connect();
  // more code
}

Send messages to Procession in any event handler or loop():

procession.send('button', 'down');

Then Procession, you can prompt with a special incantation to listen to this value and respond to it:

Subscribe to the topic "button" and when it changes to "down" play a chime sound.

About

An Arduino library to enable Procession to control Arduino-enabled hardware via ESP-NOW

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages