Skip to content

code examples for EMAR391 009 Smart Environments SP22

Notifications You must be signed in to change notification settings

roberttwomey/smartenv-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smartenv-code

code examples for EMAR391 009 Smart Environments SP22

Software:

  • p5 using p5.js on the web to interact via mqtt messaging
  • PureData mqtt messaging with puredata

Hardware:

  • BLE Sensor Tags event-triggered acceleration, door opening, temperature and humidity
  • IoT Gateway relaying BLE and other sensor signals
  • Particle Photon wireless IoT board to do sensors and actuators over wifi
  • Respeaker circular and linear mic arrays (4-6 mics). can also play audio with an attached speaker.
  • e-Ink electronic ink displays as "quiet" outputs.
  • NFC tags Near Field Communication as passive sensor readings.
  • Raspberry Pi media playback controlled by MQTT.
  • Coral Board edge inference (mobilenet, yolo, face detection, etc.)
  • Robots xArm7 co-robotic arm for posing and replaying action.

MQTT Platforms:

  • We are exploring shiftr.io as our mqtt broker. We can use the eclipse mqtt server instead. You can view a live visualization of their public broker here: https://www.shiftr.io/try/.

Google Coral Board

AI inference at the edge. Computer vision and speech recognition.

Raspberry Pi

Can do a lot. We will primarily use it as an output device (audio, video, etc.)

IoT gateway

Reading BLE esensor tags and streaming data to MQTT broker or other cloud system. Minew G1 IoT Gateway

BLE Sensor Tags

RPI as IoT Gatweay

Reads BLE advertising packets to parse accelerometer (and other) data. Transmit these to a mqtt broker (shiftr.io). Runs as a service on the Raspbery Pi.

  • see files here ble/

Message Broker

We are exploring shiftr.io as our mqtt broker. You can view a live visualization of their public broker here: https://www.shiftr.io/try/

p5

These examples explore sending (publishing), receiving (subscribing) and doing other things with the mqtt messages. They require you to be in a room with the G1 gateway in order to function and transmit data to the cloud.

Simple Message Publishing

image

This sketch lets you type in an address ("topic"), and send a message. It is great for testing things out:

mqttPublisher sketch (code)

E8 Sensor Tags

Use the G1 Iot gateway to read tags. Work with accelerometer data.

Figure out which side of the tag is facing up:

Move a teapot:

Use the tag to trigger events:

S1 Temperature/Humidity

S4 Door Sensors

Leftovers

Tests

Old Sketches (v1) These do not use the G1 gateway, and do not send messages as JSON:

About

code examples for EMAR391 009 Smart Environments SP22

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published