Skip to content

areaofeffect/intelligent-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 

Repository files navigation

#      _   ___ ___   _      ___  ___   ___ ___ ___ ___ ___ _____ 
#     /_\ | _ | __| /_\    / _ \| __| | __| __| __| __/ __|_   _|
#    / _ \|   | _| / _ \  | (_) | _|  | _|| _|| _|| _| (__  | |  
#   /_/ \_|_|_|___/_/ \_\  \___/|_|   |___|_| |_| |___\___| |_|  
#
#    I N T E L L I G E N T    O B J E C T S    W O R K S H O P
#

###.. -. - . .-.. .-.. .. --. . -. - / --- -... .--- . -.-. - ... ###### This workshop is about the relationship between humans, machines and their ways of communication. What is beyond the internet of things? What makes things intelligent?
#Build Guide * Connected devices involve a lot of moving pieces and can quickly become complex. On the technical level; they consist of micro-controllers, power, coding, servers, servos and more. We will focus on understanding the concepts behind these topics and design for interactivity, electronics, basic networking and messaging.
  • We'll be building out a simple network of nodes and establishing a custom messaging protocol between them.

##Hardware

  • Buttons, represents human input. Overrides. Lets say you have an intelligent system, but it's malfunctioning. The human element is always there.
  • Analog Sensors, represents sensing, environmental input. Uncontrollable; we must design our system in a way to account for variability.
  • Network & Protocol, communication between nodes on a network. Humans are also cosidered a node.
  • The languages we choose. What protocols can humans and machines both understand?

####Led Setup

  • 1 LED
  • 220ohm Resistor
  • Wires

Led Yo!


####A Button!! * 1 LED * 10k Resistor * Wires

Button



##Software ###Installating MQTT on OSX

1. Install MQTT
pip install paho-mqtt
2. Run as a virtual environment.
virtualenv paho-mqtt
3. Active and install.
source paho-mqtt/bin/activate
brew install mosquitto
4. Send a message!
mosquitto_sub -h xx.xx.xxx.xxx -t topic

###Installing MQTT on Raspberry Pi

#####Do a bunch of commands.

wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-wheezy.list
sudo apt-cache search mosquitto
sudo apt-get install mosquitto python-mosquitto mosquitto-clients

#####Open port 1883

sudo iptables -A INPUT -p tcp -m tcp --dport 1883 -j ACCEPT
Use MQTT in a python script
sudo apt-get install python-pip
sudo pip install paho-mqtt

##Messages Examples #####Testing via command line

mosquitto_sub -d -t hello/world
mosquitto_pub -d -t hello/world -m "Hello World"
mosquitto_sub -h YOUR_HOST_IP_ADDRESS -d -t hello/world

###breaking it down.... This example subscribes to the channel 'topic'.
mosquitto_sub -d -t topic

This one subscribes to the channel 'AoE' and publishes the message "Testing 123"

mosquitto_pub -h xx.xx.xxx.xxx -t AoE -m "Testing 123"

This one subscribes to the channel 'NewLab' and publishes the message "Hi Bruno"

mosquitto_pub -h xx.xx.xxx.xxx -t topic -m "Hi Bruno"

Releases

No releases published

Packages

No packages published

Languages