Skip to content

Dr. Bronner's All In One IxE tutorial

Nik Martelaro edited this page Feb 9, 2016 · 9 revisions

Welcome to the Interaction Engine tutorial!

This tutorial will show you how to setup and build your own interaction engine using the Raspberry Pi, Arduino, and node.js. Specifically, you will learn:

  • How to to build devices with sensors and actuators (the "things" in IoT) using Arduino
  • How to write programs on a Raspberry Pi giving you a way to access these "things" over a network (the "internet" in IoT)
  • How to connect these devices to a local network and a way to access them from the devices you're familiar with (laptop, phone, etc.)

Before we go further we want to bring up everyone's Raspberry Pi, test that everyone's Raspberry Pi can get on the workshop network, and test that everyone can connect to their Raspberry Pi from their laptops.

Bringing up your Raspberry Pi based interaction engine

  1. Do not pull on the microSD card!
  2. Press the card in to release
  3. Make note of the number on the card. This is your rPi's ID
  4. Press the microSD card in to insert. Make sure it's clicked in.
  5. Make sure WiFi dongle is plugged in
  6. Apply power
  7. Look for red power light and occasional flashing of green activity light on rPi, and blue flashing light on WiFi dongle
  8. This is a full computer. Do not pull out power plug (USB) without gracefully shutting down first

Connecting to your Raspberry Pi from your laptop on the Workshop Network

Connect your laptop to the workshop network

The network details are:

SSID: ChairBot_5G
Password: chairbot@CDR

Connect to your rPi using Putty [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html] if using Windows or ssh if using MacOSX. Use the number that was on the microSD card, e.g.:

You might be asked whether the SSH key is correct. Say yes.

The password is ixe

** Note that you will see nothing when you type the password - not even asterisks!! **

You should see something like this:

nik@DN51sl4c:~$ ssh [email protected]
[email protected]'s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Interaction Engine for RPi v0.0.1

Hello, you!

Welcome to the Interaction Engine, a Linux system to help you
prototype interactive and connected hardware.

See the built in examples to start your project today!
Last login: Sat Feb  6 03:36:17 2016 from niks-mbp-2
novice@ixe15 ~ $

If you have problems with any of these steps raise your hand and we will assist you.

Run the "Hello You" example

The Raspberry Pi is a full computer, and it is possible to run it with a graphical IDE. However, in the way that we will be using it, we will primarily be communicating with it via the command line interface. Underneath it's GUI, your computer also uses a command line interface. Let's start by reviewing a few basic UNIX commands that we will be using throughout this tutorial on our own familiar laptops.

  1. Open a terminal. (If you have a Windows look at a neighbor. In a few minutes you'll have a chance to do this on your Raspberry Pi.)

  2. Examine the command prompt

  3. 'ls' - List the contents of your current directory

  4. 'cd' - Change directories

  5. 'cat' - Print a file

  6. 'pwd' - Print Working Directory

  7. 'sudo' - Act as a Super User

  8. Other Unix commands

    Here is a Unix cheatsheet that shows other basic commands worth knowing about.

Let's run the "Hello You" example to see how the webpage served from the IxE interacts with hardware connected to the IxE and visa versa.

###1. Build Arduino circuit on breadboard.

In this example, we will have a button connected to an Arduino attached to the IxE via a USB cable change the background color of our webpage. Then we can use a button on the webpage to turn an LED on the Arduino on and off.

For this example, we will need this circuit, with the button connected to pin 5 and the LED connected to pin 10.

image

2. Find Arduino sketch file

With the circuit built, we will need to program the Arduino. You can do this with your laptop and Arduino IDE if you want. But for now, we would like to show you a tool for compiling and uploading code from the command line called ArduinoMK. This is useful for doing over the air updates to your code and means you don't have to unplug or uninstall your Arduino each time you want to change the firmware. This is really nice when you have it embedded into a project.

For now, we will just upload prebuilt code.

In the home directory there is a sketchbook directory that is are Arduino sketchbook. Let's change directories and list the contents.

novice@ixe05 ~ $ cd sketchbook/
novice@ixe05 ~/sketchbook $ ls
Arduino.mk  blink  helloYouSketch  libraries  potSense

Inside are directories for examples. Let's upload blink first to show you how ArduinoMK works.

Change directories to blink and list the contents.

novice@ixe05 ~/sketchbook/blink $ ls
blink.ino  build-micro  makefile

Inside you will see blink.ino and makefile. ArduinoMK uses make to compile and upload our projects. The blink.ino is the Arduino sketch we want to upload. The makefile has setting info to tell ArduinoMK what type of Arduino to compile for and what port the Arduino is on.

3. Check port of Arduino board.

To see what port the Arduino is on we can us ls /dev/tty* (* is a wildcard, giving us al listings with anything after the *). In this case, the Arduino Micro we use is usually at /dev/ttyACM* where * will be a number and most of the time is 0.

novice@ixe05 ~/sketchbook/blink $ ls /dev/ttyACM*
/dev/ttyACM0

This tells us that we have a port at /dev/ttyACM0, which is our Arduino. We will need to remember this later.

4. Check makefile.

For now, lets just check our makefile to make sure to settings are correct.

novice@ixe05 ~/sketchbook/blink $ cat makefile
BOARD_TAG = micro
ARDUINO_PORT = /dev/ttyACM0
ARDUINO_LIBS =
ARDUINO_DIR = /usr/share/arduino
include ../Arduino.mk

Here we can see that board type is micro and the port is set correctly to /dev/ttyACM0. We are now ready to compile an upload our code.

5. Compile Arduino Code

To compile code, use the command make.

novice@ixe05 ~/sketchbook/blink $ make
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = LINUX
- [COMPUTED]           ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
- [USER]               ARDUINO_DIR = /usr/share/arduino
- [AUTODETECTED]       ARDUINO_VERSION = 105
- [AUTODETECTED]       ARDUINO_PREFERENCES_PATH = /home/pi/.arduino/preferences.txt
- [AUTODETECTED]       ARDUINO_SKETCHBOOK = /home/pi/sketchbook (from arduino preferences file)
- [BUNDLED]            AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
- [COMPUTED]           ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
- [DEFAULT]            ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
- [COMPUTED]           ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino/variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = /usr/share/arduino/hardware/arduino/boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /home/pi/sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = micro
- [COMPUTED]           OBJDIR = build-micro (from BOARD_TAG)
- [ASSUMED]            MONITOR_BAUDRATE = 9600
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD = -std=gnu99
- [COMPUTED]           DEVICE_PATH = /dev/ttyACM0 (from MONITOR_PORT)
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/bootloaders (from ARDUINO_DIR)
-------------------------
mkdir -p build-micro

This compiles the code and will give errors if there are some. This is actualy all the same output you would get if you used your Arduino IDE in verbose mode and looked at all the output in the bottom window.

6. Flash the Arduino hardware with the compiled Arduino Blink sketch

Now, lets upload the code using make upload.

novice@ixe05 ~/sketchbook/blink $ make upload
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = LINUX
- [COMPUTED]           ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
- [USER]               ARDUINO_DIR = /usr/share/arduino
- [AUTODETECTED]       ARDUINO_VERSION = 105
- [AUTODETECTED]       ARDUINO_PREFERENCES_PATH = /home/pi/.arduino/preferences.txt
- [AUTODETECTED]       ARDUINO_SKETCHBOOK = /home/pi/sketchbook (from arduino preferences file)
- [BUNDLED]            AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
- [COMPUTED]           ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
- [DEFAULT]            ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
- [COMPUTED]           ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino/variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = /usr/share/arduino/hardware/arduino/boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /home/pi/sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = micro
- [COMPUTED]           OBJDIR = build-micro (from BOARD_TAG)
- [ASSUMED]            MONITOR_BAUDRATE = 9600
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD = -std=gnu99
- [COMPUTED]           DEVICE_PATH = /dev/ttyACM0 (from MONITOR_PORT)
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/bootloaders (from ARDUINO_DIR)
-------------------------
mkdir -p build-micro
make reset
make[1]: Entering directory '/home/pi/sketchbook/blink'
/usr/bin/ard-reset-arduino --caterina  /dev/ttyACM0
make[1]: Leaving directory '/home/pi/sketchbook/blink'
make do_upload
make[1]: Entering directory '/home/pi/sketchbook/blink'
/usr/share/arduino/hardware/tools/avr/../avrdude -q -V -D -p atmega32u4 -C /usr/share/arduino/hardware/tools/avr/../avrdude.conf -c avr109 -b 57600 -P /dev/ttyACM0 \
		-U flash:w:build-micro/blink.hex:i

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9587
avrdude: reading input file "build-micro/blink.hex"
avrdude: writing flash (4776 bytes):
avrdude: 4776 bytes of flash written

avrdude: safemode: Fuses OK (E:FB, H:D8, L:DE)

avrdude done.  Thank you.

make[1]: Leaving directory '/home/pi/sketchbook/blink'

If everything works, you should see the above output and your Arduino to should flash while programming and then start to blink the LED once per second.

7. Flash the Arduino hardware with the compiled Arduino helloYou sketch

Now that we know the Arduino is working and we can upload code (which also means our USB communication is working!) lets upload the helloYou sketch.

novice@ixe05 ~/sketchbook/blink $ cd ..
novice@ixe05 ~/sketchbook $ cd helloYouSketch/
novice@ixe05 ~/sketchbook/helloYouSketch $ ls
build-micro  helloYouSketch.ino  makefile
novice@ixe05 ~/sketchbook/helloYouSketch $ make upload
-------------------------
Arduino.mk Configuration:
- [AUTODETECTED]       CURRENT_OS = LINUX
- [COMPUTED]           ARDMK_DIR = /usr/share/arduino (relative to Common.mk)
- [USER]               ARDUINO_DIR = /usr/share/arduino
- [AUTODETECTED]       ARDUINO_VERSION = 105
- [AUTODETECTED]       ARDUINO_PREFERENCES_PATH = /home/pi/.arduino/preferences.txt
- [AUTODETECTED]       ARDUINO_SKETCHBOOK = /home/pi/sketchbook (from arduino preferences file)
- [BUNDLED]            AVR_TOOLS_DIR = /usr/share/arduino/hardware/tools/avr (in Arduino distribution)
- [COMPUTED]           ARDUINO_LIB_PATH = /usr/share/arduino/libraries (from ARDUINO_DIR)
- [DEFAULT]            ARDUINO_CORE_PATH = /usr/share/arduino/hardware/arduino/cores/arduino
- [COMPUTED]           ARDUINO_VAR_PATH = /usr/share/arduino/hardware/arduino/variants (from ARDUINO_DIR)
- [COMPUTED]           BOARDS_TXT = /usr/share/arduino/hardware/arduino/boards.txt (from ARDUINO_DIR)
- [DEFAULT]            USER_LIB_PATH = /home/pi/sketchbook/libraries (in user sketchbook)
- [DEFAULT]            PRE_BUILD_HOOK = pre-build-hook.sh
- [USER]               BOARD_TAG = micro
- [COMPUTED]           OBJDIR = build-micro (from BOARD_TAG)
- [DETECTED]           MONITOR_BAUDRATE = 9600  (in sketch)
- [DEFAULT]            OPTIMIZATION_LEVEL = s
- [DEFAULT]            MCU_FLAG_NAME = mmcu
- [DEFAULT]            CFLAGS_STD = -std=gnu99
- [COMPUTED]           DEVICE_PATH = /dev/ttyACM0 (from MONITOR_PORT)
- [AUTODETECTED]       Size utility: AVR-aware for enhanced output
- [COMPUTED]           BOOTLOADER_PARENT = /usr/share/arduino/hardware/arduino/bootloaders (from ARDUINO_DIR)
-------------------------
mkdir -p build-micro
make reset
make[1]: Entering directory '/home/pi/sketchbook/helloYouSketch'
/usr/bin/ard-reset-arduino --caterina  /dev/ttyACM0
make[1]: Leaving directory '/home/pi/sketchbook/helloYouSketch'
make do_upload
make[1]: Entering directory '/home/pi/sketchbook/helloYouSketch'
/usr/share/arduino/hardware/tools/avr/../avrdude -q -V -D -p atmega32u4 -C /usr/share/arduino/hardware/tools/avr/../avrdude.conf -c avr109 -b 57600 -P /dev/ttyACM0 \
		-U flash:w:build-micro/helloYouSketch.hex:i

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9587
avrdude: reading input file "build-micro/helloYouSketch.hex"
avrdude: writing flash (5092 bytes):
avrdude: 5092 bytes of flash written

avrdude: safemode: Fuses OK (E:FB, H:D8, L:DE)

avrdude done.  Thank you.

make[1]: Leaving directory '/home/pi/sketchbook/helloYouSketch'

Now that the Arduino code is uploaded, you should see your LED is off (because it isn't running the Blink sketch anymore). Now, let's connect it to the webserver and our webpage.

Running the webserver with node.js

For this project we are using node.js to create a webserver. Node.js is basically how you run javascript on the server, or server-side javascript. There is a wide community building lot of great open source add on for node.js that make it really easy to do lots of interactive things. For now we will run the webserver and see how our projects works.

First we will navigate to the helloYou directory that hosts our project.

novice@ixe05 ~/sketchbook/helloYouSketch $ cd
novice@ixe05 ~ $ cd helloYou/
novice@ixe05 ~/helloYou $ ls
helloYouSketch.ino  package.json  public  README.md  server.js
novice@ixe05 ~/helloYou $

Then we will run the webserver using to command node server.js /dev/ttyACM0.

novice@ixe05 ~/helloYou $ node server.js /dev/ttyACM0
listening on *:8000

If everything is working, you should see a message in the terminal that the webserver is listening on port 8000.

Now, you can go to you web browser and type your '[hostname]:8000' in the address bar.

For me, the address is "ixe05.local:8000"

Now you should see a webpage that looks like this and changes from black to white when you press the button connected through the Arduino. You should also be able to click the LED on and off buttons on the webpage to turn the LED on and off!

At this point, you have hardware controlling the webpage, and the webpage controlling hardware!

image

You should also be able to see the messages in the terminal, like this:

novice@ixe05 ~/helloYou $ node server.js /dev/ttyACM0
listening on *:8000
a user connected
a user connected
data: light
data: dark
data: light
data: dark
data: light
data: dark
data: light
data: dark
data: light
data: dark
ledOFF
ledON
ledOFF
ledON
ledOFF
ledON

To shut down the server, type control + C in the terminal.

ledOFF
ledON
^C
novice@ixe05 ~/helloYou $

Understanding Hello You

System Overview

We can look at a visual explanation of how the system is working in the diagram below.

helloYouSketch.ino (The Arduino code)

The Arduino code written in C++. It may be written or edited on the IxE itself, but it is compiled, uploaded and run on the Arduino board.

server.js (The RPi code)

The server.js code is written in javascript. It is run on the IxE using node.js.

index.html and client.js (The browser code)

Index.html is written in html, but with javascript embedded. The client.js code acts as a library for the functions called in index.html, and is written in javascript. These files are served from the IxE when node.js is running server.js. Both run on the web browser.

Annotated code tours

These links show in more depth what is going on in each component of the IxE.

The IxE filesystem

1. Overview

Here's an overview of the file structure within the RPi where we're working.

novice@ixe04 ~ $ tree -L 3
.
├── helloYou
│   ├── helloYouSketch.ino
│   ├── node_modules
│   │   ├── express
│   │   ├── node-pre-gyp
│   │   ├── serialport
│   │   └── socket.io
│   ├── package.json
│   ├── public
│   │   ├── client.js
│   │   └── index.html
│   ├── README.md
│   └── server.js
└── sketchbook
    ├── Arduino.mk -> /usr/share/arduino/Arduino.mk
    ├── blink
    │   ├── blink.ino
    │   ├── build-micro
    │   └── makefile
    ├── helloYouSketch
    │   ├── build-micro
    │   ├── helloYouSketch.ino
    │   └── makefile
    └── libraries
        └── readme.txt

13 directories, 12 files
novice@ixe05 ~ $

2. Home directory

Let's look at what is in the home directory

novice@ixe05 ~ $ ls
helloYou  node_tests  sketchbook

3. helloYou pokearound

Let's look at what is in our main example code directory.

novice@ixe04 ~ $ cd helloYou/
novice@ixe04 ~/helloYou $ ls
helloYouSketch.ino  node_modules  package.json  public  README.md  server.js
novice@ixe04 ~/helloYou $

The heart of the IxE is in server.js, so let's look at that, quickly for now.

novice@ixe04 ~/helloYou $ cat server.js
var express = require('express'); // web server application
var http = require('http');				// http basics
var app = express();							// instantiate express server
var server = http.Server(app);		// connects http library to server
var io = require('socket.io')(server);	// connect websocket library to server
var serialport = require('serialport');	// serial library
var serverPort = 8000;

// use express to create the simple webapp
app.use(express.static('public'));		// find pages in public directory

// check to make sure that the user calls the serial port for the arduino when
// running the server
if(!process.argv[2]) {
    console.error('Usage: node '+process.argv[1]+' SERIAL_PORT');
    process.exit(1);
}

// start the serial port connection and read on newlines
var serial = new serialport.SerialPort(process.argv[2], {
    parser: serialport.parsers.readline('\r\n')
});

// this is the websocket event handler and say if someone connects
// as long as someone is connected, listen for messages
io.on('connect', function(socket) {
    console.log('a user connected');

    // if you get the 'ledON' msg, send an 'H' to the arduino
    socket.on('ledON', function() {
        console.log('ledON');
        serial.write('H');
    });

    // if you get the 'ledOFF' msg, send an 'L' to the arduino
    socket.on('ledOFF', function() {
        console.log('ledOFF');
        serial.write('L');
    });

    // if you get the 'disconnect' message, say the user disconnected
    socket.on('disconnect', function() {
        console.log('user disconnected');
    });
});

// this is the serial port event handler.
// read the serial data coming from arduino - you must use 'data' as the first argument
// and send it off to the client using a socket message
serial.on('data', function(data) {
    console.log('data:', data);
    io.emit('server-msg', data);
});

// start the server and say what port it is on
server.listen(serverPort, function() {
    console.log('listening on *:%s', serverPort);
});
novice@ixe04 ~/helloYou $

Let's peek at the client files.

novice@ixe04 ~/helloYou $ cd public
novice@ixe04 ~/helloYou/public $ ls
client.js  index.html
novice@ixe04 ~/helloYou/public $ cat index.html
<!doctype html>
<html>
    <head>
        <meta charset="utf8"/>
        <title>Interaction Engine - Hello You!</title>
        <script src="/socket.io/socket.io.js"></script>
    </head>
    <body>
        <body bgcolor="#000">
        <button onclick="ledON()">LED ON</button>
        <script src="client.js"></script>

        <button onclick="ledOFF()">LED OFF</button>
        <script src="client.js"></script>
    </body>
</html>
novice@ixe04 ~/helloYou/public $ cat client.js
var socket = io();

// send out LedOn message over socket
function ledON() {
    socket.emit('ledON');
}

// send out ledOFF message over socket
function ledOFF() {
    socket.emit('ledOFF');
}

// read the data from the message that the server sent and change the
// background of the webpage based on the data in the message
socket.on('server-msg', function(msg) {
    console.log('msg:', msg);
    switch(msg) {
        case 'light':
            document.body.style.backgroundColor = 'white';
            console.log('white')
            break;
        case 'dark':
            document.body.style.backgroundColor = 'black';
            console.log('black');
            break;
    }
});
novice@ixe04 ~/helloYou/public $

Let's go back out to the home directory and look at our Arduino sketchbook.

novice@ixe04 ~/helloYou/public $ cd
novice@ixe04 ~ $ cd sketchbook
novice@ixe04 ~/sketchbook $ ls
Arduino.mk  blink  helloYouSketch  libraries  newProject  potSense
novice@ixe04 ~/sketchbook $ cd helloYouSketch/
novice@ixe04 ~/sketchbook/helloYouSketch $ ls
build-micro  helloYouSketch.ino  makefile
novice@ixe04 ~/sketchbook/helloYouSketch $

Taking off the training wheels

Now that you have played around with the novice account, you are ready to start exploring the whole IxE distribution! There is another user pi that you can log into that has all the standard directories of the Raspbian distro as well as other examples that we have prepared.

To sign out of novice you can exit the ssh session:

novice@ixe05 ~ $ exit
logout
Connection to ixe05.local closed.
nik@DN51sl4c:~$

Now log back in using the pi user with the password: raspberry.

nik@DN51sl4c:~$ ssh [email protected]
[email protected]'s password:

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

Interaction Engine for RPi v0.0.1

Hello, you!

Welcome to the Interaction Engine, a Linux system to help you
prototype interactive and connected hardware.

See the built in examples to start your project today!
Last login: Sat Feb  6 03:42:47 2016
pi@ixe05 ~ $

We can see that this user has many more directories available:

pi@ixe05 ~ $ ls
Desktop    IxE_HTMLParts        Music             Public        Templates
Documents  ixe_project_creator  node_modules      python_games  Videos
Downloads  IxE_RGB              Pictures          read.me
helloYou   IxE_TempSensor       processingJSTest  sketchbook

In here we can see helloYou and our sketchbook just like in novice. Remember though these are different users files, so they are not linked!

There are some more examples like and RGB LED controller and a temperature sensor that uses a potentiometer as a stand in. Check some of them out and try running them!

Creating your own projects

There is also a small program that can create new project built off the helloYou example called ix_project_creator. This allows you to create a fresh project with all the base files you need for your own interaction designs. Here is how to use it:

Run the ixe_project_creator using the ./ (Note: You need to give your new project a name!):

pi@ixe05 ~ $ ./ixe_project_creator
Usage: ./ixe-project-creator NewProjectName
pi@ixe05 ~ $ ./ixe_project_creator newProject

pi@ixe05 ~ $ ls
Desktop    IxE_HTMLParts        Music         processingJSTest  sketchbook
Documents  ixe_project_creator  newProject    Public            Templates
Downloads  IxE_RGB              node_modules  python_games      Videos
helloYou   IxE_TempSensor       Pictures      read.me

pi@ixe05 ~/newProject $ ls
helloYouSketch.ino  node_modules  package.json  public  README.md  server.js

Using this, you will always be able to have a clean set of starter code with bi-directional communication already set up. This should help get you started building you interaction design much faster than copying other by hand or starting from scratch.

IxE Workshop

For Novices

  1. Unix command review

  2. Hello You Introduction

  3. Log on to your IxE

  4. IxE overview

  5. Run the Hello You example

  6. Understanding Hello You

  7. Logging Out & Shutting Down

Post Novice
0. Logging in as Pi

  1. Preview the larger IxE image
  2. [Project Ideas](Project Ideas)

Also [Related Links](Related Links)

Clone this wiki locally