Interactive Environments: Day 1

Interactive Environments: Day 1

Interactive Environments: Day 1

Interactive Environments: Day 1

Grab the code here: https://bit.ly/2yfl7cf

    Topics for This Week:

  • Re-Introduction to the esp32
  • Building a touch interface
  • Introduction to MQTT
  • Wireless touch interface

The ESP32

ESP32 Pinout

Install This Driver

Here

Install for you platform

Here

Building out a basic touch interface

    Steps:

  • Cut 6 pieces of copper tape
  • Arrange them on paper and stick
  • Solder one side of a jumper wire to each piece of tape

Connect some touch Pins to 14,32,15,33,27,12

    Steps:

  • Upload TouchRead_Serial
  • Open the serial port to and set the baud to 115200
  • Test touching the copper pads

We will come back to this in a bit





Open a terminal

sudo npm install mqtt -g

Open a terminal

npm install mosca pino -g

mosca -v | pino

Open a second terminal

mqtt sub -t '/hello' -h 'localhost'

Open a third terminal

mqtt pub -t '/hello' -h 'localhost' -m 'hi from me'

Open a third terminal

mqtt pub -t '/hello' -h 'localhost' -m 'My message'



Client which publish and subscribe

MQTT.JS

Server which brokers messages from the clients

Mosca

In Arduino install the PubSubClient Library

Upload ESP32TouchInterruptMQTT.ino

Set the Wifi to Gray Area Incubator and grandstand

Set the MQTT server to your IP address

cd to mqtt_ws and open in text editor

in the terminal npm install && node index.js

Open localhost:3000

Combining with Maptastic.js https://github.com/glowbox/maptasticjs

close that last program by hitting CTRL+C twice

cd to mqtt_ws_maptastic and open in text editor

in the terminal npm install && node index.js

Open localhost:3000

close that last program by hitting CTRL+C twice

cd to mqtt_ws_maptastic_video and open in text editor

in the terminal npm install && node index.js

Open localhost:3000

Conductive paint

https://www.bareconductive.com/

Awake

MQTT.JS