Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
331 commits
Select commit Hold shift + click to select a range
b333c62
First change - server.js changes for Hue
Dec 22, 2015
6095375
Changed files for my Philips Hue.
Dec 22, 2015
3e4e4b5
Merge pull request #19 from psomdecerff/beta_hardwareInterfaces
Dec 22, 2015
db70192
cleanup
Dec 22, 2015
dd0e70a
Merge pull request #2 from openhybrid/beta_hardwareInterfaces
Carsten87 Dec 29, 2015
1c7879f
config.json
Dec 29, 2015
faded50
Solved config.json conflict
Dec 29, 2015
c2fd20f
Only execute code when hardware interface is enabled, added some erro…
Dec 30, 2015
1b014b7
Merge pull request #22 from Carsten87/philipsHue
Dec 30, 2015
e56828c
Initial commit mpd client
Dec 30, 2015
43f0a30
Disable philipsHue interface by default
Dec 30, 2015
62f3b85
Merge pull request #23 from Carsten87/philipsHue
Dec 30, 2015
7ea0625
Added I/O point for playing status
Jan 1, 2016
0839cfa
Merged mpd into master branch
Jan 1, 2016
ff6b2be
Debugging
Jan 1, 2016
4b7ec31
remove wrong error loading the data message
Jan 1, 2016
7dab8e3
Added config.json to mpd HW interface
Jan 2, 2016
6f87f7b
Bugfixes
Jan 2, 2016
7b959a0
Merge pull request #3 from openhybrid/beta_hardwareInterfaces
Carsten87 Jan 2, 2016
ad7db22
Added KODI hardware interface
Jan 2, 2016
da269e3
Remove debugging output
Jan 2, 2016
4c738f4
Disable all hardware interfaces by default
Jan 2, 2016
2590714
Code Cleanup
Jan 2, 2016
0258418
moved addIO calls to init function, TODO raspberry pi still missing...
Jan 4, 2016
4f86d3b
Fixed major bug concerning the hardwareInterfaces
Jan 4, 2016
515c1a1
Merge pull request #24 from Carsten87/master
Jan 4, 2016
5fd0d6f
added objectIO.js in to object.js
Jan 5, 2016
5a6a39b
Load socket.io.js synchronous from js
Jan 5, 2016
1417e36
Merge pull request #4 from openhybrid/beta_hardwareInterfaces
Carsten87 Jan 6, 2016
b3400fe
removed </div> which had no <div> counterpart,
Jan 6, 2016
03ecf91
Merge pull request #25 from Carsten87/master
Jan 6, 2016
d3ae449
read() returns undefined if no match
Jan 6, 2016
6a7205e
Fixed arduino reinit
Jan 8, 2016
832cec4
Updated comments
Jan 8, 2016
56e9ec4
Merge branch 'master'
Jan 8, 2016
d05c0f1
Fixed copy and paste error
Jan 8, 2016
28a9411
Bugfix
Jan 8, 2016
01ecf18
Merge pull request #26 from Carsten87/master
Jan 8, 2016
d4dc9c7
Merge pull request #27 from Carsten87/Bugfix_reinit
Carsten87 Jan 9, 2016
6bc69fd
Code formatting
Jan 9, 2016
4f38339
Move init code to init() function
Jan 9, 2016
1a4fcb4
Fixed typo, added mpd and kodi-ws to package.json
Jan 9, 2016
7c379c8
Added some debugging output, Bugfix in mpdClient
Jan 10, 2016
a9eb3e0
Code Cleanup
Jan 10, 2016
60adf47
Added some more error handling. Only add socket.io.js if it could be …
Jan 10, 2016
dc7d8f1
Merge branch 'beta_hardwareInterfaces'
Jan 10, 2016
cba4693
Added some more comments
Jan 10, 2016
79a8c50
Added TODO comment: clear links
Jan 10, 2016
481a48a
Added error handling
Jan 10, 2016
a9ca2cc
Add configuration for logger, Add command line parameter
franckOL Jan 19, 2016
a02d9ac
Refactoring logging, all file in libraries folder, add a configuratio…
franckOL Jan 20, 2016
40e85d6
The changes on hardware are pushe to reality editor, polling not yet …
franckOL Jan 22, 2016
89e15e2
Send index instead of JS Object via serial
Jan 22, 2016
4b3824e
Added some debug comments
Jan 23, 2016
9d8cb79
Enabled philipsHue
Jan 23, 2016
aad20d1
Bugix, reformatting
Jan 23, 2016
4224b76
Fixed the bug and removed debug output
Jan 23, 2016
f70598c
Merge branch 'beta_hardwareInterfaces' of https://github.com/openhybr…
Jan 23, 2016
8d9985f
disabled philipsHue
Jan 23, 2016
c34b170
Merged changes from beta_hardwareInterfaces
Jan 23, 2016
5e7aac3
Code formatting
Jan 23, 2016
9ef6bbd
Added some comments
Jan 23, 2016
ae3de8d
Add some debug comments
Jan 23, 2016
b1d49fe
Enable hue
Jan 23, 2016
1c4766b
Old socketSender format
Jan 23, 2016
2710858
Finished the fix
Jan 23, 2016
2feae6c
Removed debug output
Jan 23, 2016
4b3a43e
Disable philipsHue
Jan 23, 2016
88e82fd
Updated the emptyExample
Jan 30, 2016
cdad023
Bugfix
Feb 2, 2016
0443a60
Merging Bugfix_reinit into beta_hardwareInterfaces
Feb 2, 2016
40f0cc1
Updated comments
Carsten87 Feb 4, 2016
f1ebacd
Reformatting
Feb 6, 2016
6f55108
Revert "Reformatting"
Feb 6, 2016
bdeb2b3
Merge branch 'beta_hardwareInterfaces' of https://github.com/openhybr…
Feb 6, 2016
839c102
Reformatting, changed some comments
Feb 6, 2016
0055f65
subscribeToMatrix3D functions: Reality Editor 1.5.8
Feb 17, 2016
de4fa8d
refine 3D-Transform Subscription + Acceleration Subscription
Feb 18, 2016
23f828e
unconstrained editing
Mar 8, 2016
5f723c1
unconstrained editing
Mar 8, 2016
d0bb075
Merge pull request #28 from franckOL/eventBasedUI
Mar 9, 2016
2449b0b
merge
Mar 10, 2016
a9be757
changed name for subscription to Matrix for the next Reality Editor
Mar 11, 2016
9086d5e
change the name for subscribing to the matrix array
Mar 11, 2016
2b08b23
change matrix format (matrix3dMemory was never used so far)
Mar 11, 2016
79d1967
matrix format change (matrix3dMemory was never used so far)
Mar 11, 2016
2e7a7b2
Back to the old format.
Mar 12, 2016
55a74f0
changing the matrix format back to the old. No improvement after all
Mar 12, 2016
f4b14ed
documentation
Mar 15, 2016
e510f72
documentation, renaming, replaced if(...) console.log with a function
Mar 16, 2016
518d097
added rule
Apr 15, 2016
eb38617
removed object.js from requirement
Apr 18, 2016
16002ef
continuing development on 0.4beta branch
Apr 21, 2016
f441bde
merging what is there to merge
Apr 21, 2016
3e7e0ed
globalMessaging among UI's and som bugfixes
Apr 22, 2016
acaf17c
options to check visibility of the marker within the UI
Apr 22, 2016
9f1db8b
debugging
Apr 24, 2016
c043ef5
UI Feedback + Bugfixes
Apr 25, 2016
71b4a92
updated heartbeat to send version and target checksum
Apr 26, 2016
bab676a
bugfix
Apr 27, 2016
a04df2a
generalized checksum function, crc16>crc32, bugfix
Apr 27, 2016
c040da5
change some naming
Apr 29, 2016
361243f
removed img and replaced with canvas. small footprint
May 1, 2016
cf10bd4
update to latest reality editor
May 3, 2016
00a7bfe
small naming change
May 3, 2016
a3dfe99
restored the simple old web interface + included updates.
May 3, 2016
8c28681
merge v0.4Alpa
May 3, 2016
0936ad7
restored old developer UI + added ajax for info page.
May 3, 2016
c4a3dbb
some updates
May 4, 2016
e4b6577
serial port update
May 4, 2016
25e0c2f
more testing
May 4, 2016
e4588bb
some tests for reality editor subscription
May 4, 2016
b784912
simple auto subscription model for the Reality Editor.
May 4, 2016
2f76b98
removed confusing pos + obj handling
May 5, 2016
94bcd19
debugged arduinoYun, debugged some linking
May 5, 2016
7959c69
removed test for length of object ID name + 12 digit UUID
May 5, 2016
293b3ea
lots of cleanup
May 6, 2016
769b57e
link format change
May 6, 2016
7a531ef
matrix format change, new matrixlistener
May 9, 2016
ba5033c
version update
May 11, 2016
db5abda
ArduinoYun working with new hardwareAPI, server compatible with all n…
May 11, 2016
bdc96ac
updated list of contributors for 1.6
May 12, 2016
101c1db
bugfix
May 14, 2016
d02d6bd
bugfix
May 23, 2016
b42ba0f
version jump
May 26, 2016
40d1e51
Add placeholder to new object name field
hobinjk Jun 20, 2016
0e0f3a6
Inject script tag into all HTML files
hobinjk Jun 20, 2016
9dda262
Merge pull request #30 from hobinjk/master
Jun 22, 2016
f01d677
Merge pull request #31 from hobinjk/inject-in-all-html
Jun 22, 2016
383b2dc
data structure for LogicBlocks
Aug 13, 2016
639fafa
fundamental restructuring
Aug 14, 2016
05e55d8
implementation for Block processing
Aug 14, 2016
9d975c7
more restructuring
Aug 14, 2016
58d8f49
new Structure
Aug 15, 2016
cf68101
adapting new naming
Aug 16, 2016
d5f1522
changes to reflect the new naming
Aug 16, 2016
4077f30
Refactoring of Hardware Interface added readListeners
Aug 16, 2016
6111e0b
simplification for hardware interface
Aug 16, 2016
3b9db44
added node name in to node page. keeping the editor general usable fo…
Aug 19, 2016
8d43b91
Fix appending of index.htm onto html files
hobinjk Aug 29, 2016
23fbea1
Pass 404 errors onwards instead of throwing an exception
hobinjk Aug 29, 2016
5da528f
Implement static links to edit; Improve handling of deeply nested fol…
hobinjk Jun 27, 2016
41d41d5
Add simple monaco-based live-editing
hobinjk Jun 28, 2016
fc47d3d
Load editor files in parallel; Resize iframe based on content
hobinjk Jun 28, 2016
6e86b22
Increase size of editor view
hobinjk Jun 28, 2016
4507ef6
Fix action
hobinjk Aug 5, 2016
cc0bfdf
Add memory upload
hobinjk Aug 5, 2016
0ba43e4
Fix usage of formidable and Archiver
hobinjk Aug 5, 2016
c8d19a1
new reference
Aug 30, 2016
07dc5fe
EV3 hardware module update + Robotic Arm
Sep 23, 2016
4ce2c2a
robot
Sep 28, 2016
92f92f8
new marker + motion control finalized
Sep 30, 2016
7a521e7
logic Blocks are supported now
Nov 21, 2016
5bb412e
latest API for editor
Nov 22, 2016
b143184
push after discussion
Nov 22, 2016
8475af0
bug fix
Nov 22, 2016
84e2df7
local security feature. Only allow access from local network.
Nov 23, 2016
600d698
implemented a netmask for defining network accessibility scope
Nov 23, 2016
4acf7a6
block moving API
Nov 23, 2016
c80e486
updates category and appearance
Nov 23, 2016
1864a14
first working demo for programming
Nov 29, 2016
e6069c8
first working version for logic
Nov 29, 2016
414deb9
working State - Logic Blocks
Dec 3, 2016
8faaf4e
removed log
Dec 3, 2016
72d03cf
edgeblock
Dec 3, 2016
bf27293
bugfix, new feature and format change -> actions
Dec 5, 2016
b79886e
update instant connection
Dec 6, 2016
702da19
advertisement, text->type
Dec 7, 2016
e31b062
settings menu works
Dec 9, 2016
f5e1e1c
update object from Server Only!
Dec 9, 2016
3243a26
working state
Dec 10, 2016
b6de3eb
all functionality should work now. We are ready to build blocks
Dec 13, 2016
78f8cef
latest changes
Dec 19, 2016
1696bab
init
Dec 20, 2016
c42ce97
merge memory and logic crafting
Dec 20, 2016
85e6b31
Rename 'folder' -> 'name'
hobinjk Dec 21, 2016
5b4f878
init
Jan 17, 2017
ae70f19
Merge branch 'v1.8.9'
Jan 19, 2017
644879d
merged wedo2
Jan 19, 2017
f6f8465
updates. Added text field for name changes of nodes
Jan 20, 2017
25ff022
icons, wedo Hardware interface, server fixes
Jan 22, 2017
6935ea8
remove all listeners on disconnect + update wedo2 => 1.5.6
Jan 22, 2017
e3f526a
Merge branch 'v.1.8.6_valentin_wedo'
Jan 22, 2017
f6bd5b1
Merge branch 'master' into v.1.8.6_valentin_wedo
Jan 22, 2017
d386581
added uuid for latest change.
Jan 23, 2017
01301b9
lego objects
Jan 23, 2017
65674b0
Merge branch 'v.1.8.6_valentin_wedo'
Jan 23, 2017
33e8212
Merge branch 'master' into v.1.8.6_valentin_wedo
Jan 23, 2017
2e88c8b
updates for logic node deletion
Jan 24, 2017
fc52633
Merge pull request #4 from vheun/v.1.8.6_valentin_wedo
Jan 24, 2017
f00c6ff
Add support for frames
hobinjk Oct 21, 2016
7a6c8eb
Fix frame implementation
hobinjk Jan 18, 2017
39d612f
Add handler of new nodes
hobinjk Jan 22, 2017
e73f6fd
Guard against undefined link destinations
hobinjk Jan 22, 2017
a44f0c7
Add frame deletion handler
hobinjk Jan 24, 2017
44baaba
Persist frame deletion
hobinjk Jan 24, 2017
2c48e17
Properly json-encode errors
hobinjk Jan 24, 2017
1d441e5
Send reloadObject for frame modification
hobinjk Jan 24, 2017
3b40a5b
Fix frame update
hobinjk Jan 24, 2017
4b96b9c
Send touch event data when editing
hobinjk Jan 24, 2017
177aa3a
Merge pull request #3 from vheun/hobinjk-frame-support-only
Jan 25, 2017
fe9bf28
requesting a node that has been deleted responds with an empty object…
Benolds Jan 25, 2017
8a8131c
Merge pull request #5 from vheun/ben_realtime_crafting
Jan 25, 2017
2250c49
latest changes
Jan 25, 2017
8428dbb
Merge branch 'master' into v.1.8.6_valentin_wedo
Jan 25, 2017
3be9e3a
Add frame bootstrapping
hobinjk Jan 25, 2017
03cc328
Merge branch 'master' into v.1.8.6_valentin_wedo
Jan 25, 2017
1d85ac5
Fix incorrect addNode of frame's nodes
hobinjk Jan 26, 2017
c21b779
Add touch tolerance to object.js
hobinjk Jan 26, 2017
ab8956c
first version of flipflop block. hasn't been tested
Benolds Jan 26, 2017
ef7a9da
fixed flopflop block functionality
Benolds Jan 26, 2017
d0b313a
Merge pull request #6 from vheun/hobinjk-improvements
Jan 26, 2017
0335f08
last changes
Jan 26, 2017
88f852e
Merge pull request #7 from vheun/ben_flipflopblock
Jan 26, 2017
9ff05a1
Merge branch 'master' into v.1.8.6_valentin_wedo
Jan 26, 2017
bc2adf4
uno support
Jan 27, 2017
9eeea36
responds to adding and deleting links from nodes and links
Benolds Feb 10, 2017
a58d5c1
Add pan/tilt camera interface
hobinjk Sep 7, 2016
c3ca5cb
Add motion detection to camera hw interface
hobinjk Oct 19, 2016
af3a9b6
Update camera IP
hobinjk Oct 19, 2016
6dcbfae
Remove unnecessary logging
hobinjk Oct 19, 2016
49e1447
Resume and drain stream to properly handle camera's mail
hobinjk Oct 19, 2016
f528994
Update to new version of hardware interface
hobinjk Feb 14, 2017
90babd8
locking uses user-selected password instead of phoneID
Benolds Feb 16, 2017
309ca84
locks now include a lockType (full or half) with associated permissions
Benolds Feb 17, 2017
e0e89f5
UNO fix and interface listener added
Feb 20, 2017
5fe9df5
Merge pull request #8 from vheun/ben_locking_touchID
Feb 20, 2017
44e183b
Merge pull request #9 from vheun/hobinjk-add-camera
Feb 20, 2017
482df09
Merge pull request #10 from vheun/v.1.8.6_valentin_wedo
Feb 20, 2017
42f9ea6
Add back hacky preset server
hobinjk Feb 21, 2017
3a9e88f
Use CORS
hobinjk Feb 21, 2017
7db5267
search functionality
Feb 25, 2017
018b9c4
Merge pull request #12 from vheun/v.1.8.6_valentin_wedo
Feb 25, 2017
a0c4f61
basic arithmetic blocks (add and multiply)
Benolds Mar 24, 2017
5a26086
blocks to make post request with 1 or 2 values, and a customized IFTT…
Benolds Mar 24, 2017
fc434ba
test saving links
Mar 31, 2017
ba3cc0b
Merge pull request #11 from vheun/hobinjk-add-camera
Apr 3, 2017
035f9ea
Merge pull request #14 from vheun/ben_webservices
Apr 3, 2017
16f6231
Add duplex logic block
hobinjk Apr 3, 2017
c3d1b93
Improve timer hardware interface
hobinjk Apr 3, 2017
d5fa752
Properly delay the setting of values
hobinjk Apr 3, 2017
337d920
Allow scaling up values; Properly default scale to 1x
hobinjk Apr 3, 2017
b6c39b9
Use second switch output as passthrough when switched on
hobinjk Apr 3, 2017
7968d7e
Merge pull request #17 from vheun/hobinjk-logic-block-improvements
Apr 3, 2017
32b8a44
Merge pull request #16 from vheun/hobinjk-timer-improvements
Apr 3, 2017
aa4878b
Merge pull request #15 from vheun/hobinjk-duplex
Apr 3, 2017
baae97b
debug connections among servers
Apr 4, 2017
4163ee8
Reinstate Philips Hue Light Hardware Interface
hobinjk Apr 27, 2017
44cfa39
some updates
May 29, 2017
00118ad
added http endpoint to list all active objects as json output
JoeTalbot Aug 29, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,24 @@ pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# idea editing tools
.idea

# osx directory files
.DS_Store

# ignore personal objects in the object folder.
# objects/*

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
node_modules
301 changes: 299 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,299 @@
# object
Hybrid Object code
Overview
========

This page of notes outlines how to use a Mac OS X system to prepare an Arduino Yún linux image that turns
the Arduino into a HybridObject.


How to install on an Arduino Yún
================================

1. Plug the SD card into the Arduino Yún and power it on

2. On your computer, connect to the Arduino's WiFi network, named similar to "Arduino Yun-XXXXXXXX."
Using a web browser, navigate to *http://arduino.local* and enter password *arduino* when prompted.

3. Give the board a name and enter the WiFi settings for your network.

4. Expand the Yún's available space by moving the root filesystem to the SD card.
See [How to expand the Yún disk space](https://www.arduino.cc/en/Tutorial/ExpandingYunDiskSpace).
When using a 4 GB SD card, choose 1000 MB for the size of the data partition.

After expansion is complete:

5. Upload any other sketch to remove the update sketch.

6. On your Mac OS X computer install [osxfuse](https://osxfuse.github.io/). This provides `sshfs`
capability which we'll use later to conveniently mount a folder on the Yún to your computer.

7. Connect to the Yún via: `ssh root@objectname.local`

Example for getting to the right folder:

````
root@so1:~# cd ..
root@so1:/# cd mnt/sda1/
````


8. Update the software on the Yún and install the sftp server and node packages:

````
opkg update
opkg install openssh-sftp-server node node-socket.io node-socket.io-client node-serialport
````

9. Create a folder with the name "mountpoint"

````
mkdir ~/mountpoint
````

10. Mount the arduino's filesystem to your local mountpoint:

````
sshfs root@objectname.local:/mnt/sda1/arduino ~/mountpoint
````

(To unmount: `umount ~/mountpoint`)

11. Work in the mounted folder and run your programms via the terminal.

12. To allow logins over the serial port on the Hybrid Object, uncomment in `/etc/inittab`:

````
#ttyATH0::askfirst:/bin/ash --login
````

13. Setup a swap file as described below in section **SWAP**.

14. copy the arduino code to the sda1 SD card.

15. Install the dependences:

````
npm install
````


reboot


Rename Host
===========

````
uci set system.@system[0].hostname=obj
uci commit system
````


Clone Yún to SD card
====================

````
umount /overlay
dd if=/dev/mtd7ro of=/mnt/sda1/hybrid-squashfs-sysupgrade.bin
````

If you plan to disconnect power and remove the SD card, run these additional commands:

````
sync
halt
````


Setup a TFTP server on your Mac
===============================

Start the TFTP service on your Mac:

````
sudo launchctl load -F /System/Library/LaunchDaemons/tftp.plist
sudo launchctl start com.apple.tftpd
````

Download the [Arduino Yún base images zip file from Arduino.cc](http://arduino.cc/download_handler.php?f=/openwrtyun/1/YunImage_v1.5.3.zip)
and extract the three files (uboot, kernel, rootfs) from the archive.

Move the unpacked base images files into the `/private/tftpboot/` folder.


Reflashing U-Boot
-----------------

````
setenv serverip 192.168.1.1;
setenv ipaddr 192.168.1.146;

tftp 0x80060000 openwrt-ar71xx-generic-linino-u-boot.bin;
erase 0x9f000000 +0x40000;
cp.b $fileaddr 0x9f000000 $filesize;

tftp 0x80060000 openwrt-ar71xx-generic-yun-16M-kernel.bin;
erase 0x9fEa0000 +0x140000;
cp.b $fileaddr 0x9fea0000 $filesize;

tftp 0x80060000 openwrt-ar71xx-generic-yun-16M-rootfs-squashfs.bin;
erase 0x9f050000 +0xE50000;
cp.b $fileaddr 0x9f050000 $filesize;

bootm 0x9fea0000
````

For more information refer to [Reflashing the OpenWrt-Yún image on the Yún](https://www.arduino.cc/en/Tutorial/YunUBootReflash).


Make node app run on startup
-----------------------------

TODO: <need to be filled with content>
Evaluate https://github.com/chovy/node-startup


SWAP
====
<!-- Cribbed from http://www.element14.com/community/groups/arduino/blog/2014/12/19/part-x3-arduino-yun-extending-the-ram -->
A swap file is a special kind of file that can be used as *virtual memory* by a computer's operating system.
This allows the computer's operating system to push infrequently used items from RAM to the hard disk
so that new items can use the newly freed space in the actual RAM.

#### Verifying Free Memory

Connect to Yún using ssh (i.e. by running "ssh root@youryun.local” from terminal). Then run `free -m`.
This shows your current memory memory usage in **m**egabytes, including free memory. For example:

````
total used free shared buffers
Mem: 61116 43556 17560 0 9612
-/+ buffers: 33944 27172
Swap: 0 0 0
````

Note that the swap space shows **0**, indicating that there is no swap configured and available.
After confirming the lack of swap, you can setup a file to use for swap space.

#### Step 1: Create an empty file to act as a swap file

While connected to the Yún through the ssh terminal, run the following command to create a
512 MB swap file named yunswapfile in folder "/swap" filled with zeroes:

dd if=/dev/zero of=/swap/yunswapfile bs=1M count=512

This should run for a bit and provide output like this:

````
512+0 records in
512+0 records out
````

#### Step 2: Designate the file as a swap file

The step above just created an empty file. To make sure it can be used as a swap file, run this from the shell:

mkswap /swap/yunswapfile

You should get output like this:

````
Setting up swapspace version 1, size = 524284 KiB
no label, UUID=e3e63fad-e6f7-4d4e-a32a-a326bbe48e8c
````

#### Step 3: Load the swap file for verifying

To verify that the swap file is good, try to load it by running this:

swapon /swap/yunswapfile

This will not provide any output if everything is cool. So verify by checking free memory.

free -m

This shows:

````
total used free shared buffers
Mem: 61116 28644 32472 0 4888
-/+ buffers: 23756 37360
Swap: 524284 0 524284
````

Viola!!! Notice that swap space is now available for use by the RAM. We're not done yet, we must instruct
the system to use this file for swap on boot, as show in step 4.

#### Step 4: Load the swap file as part of boot sequence

If you stop with Step 3, next time when you restart your Yún (linux part... either through power off/on or
the Linux reset button near the LEDs) the swap file will not have been loaded. So to make sure that it gets
loaded every time, you need to set the swap file as part of boot sequence.

**Warning:** The steps are fairly simple, but if the steps are not executed fully you might leave an inconsistent
boot config and the Linux part of the Yún may not load properly. Don't worry, since this is Arduino you can reset
the whole thing easily and try again. So please execute the following cleanly after understanding them.

These commands are meant to be run as **root** on your Yún. Lines beginning with `#` are interpreted as comments
by the shell and are not interpreted, so they won't hurt anything if included via copy/paste:

````
#1. Add swap config entry to fstab
uci add fstab swap

#2. Set device config entry to swap. Make sure you provide your full swap file name
uci set fstab.@swap[0].device=/swap/yunswapfile

#3. Enable swap
uci set fstab.@swap[0].enabled=1

#4. Set file system type as "swap"
uci set fstab.@swap[0].fstype=swap

#5. set swap options to default
uci set fstab.@swap[0].options=default

#6. set fsck to 0
uci set fstab.@swap[0].enabled_fsck=0

#7. Commit the config changes. If you don't run commit, the config changes will not be saved.
uci commit
````

That's it. Restart the Linux part of Yún (reset button near LEDs). After reboot, if you run
`free -m` you should see the swap file loaded. You have successfully expanded the RAM on your
Arduino Yún's Linux side.


How to install on a Raspberry Pi
================================

1. Use [NOOBS](https://www.raspberrypi.org/downloads/noobs/) to install the base Raspian image.

2. Update the system software.
````
sudo apt-get update
sudo apt-get upgrade -y
````

3. Remove the default nodejs instance and replace it with v0.12 or higher.
````
sudo apt-get remove nodejs
curl -sLS https://apt.adafruit.com/add | sudo bash
sudo apt-get install -y node
````

4. Get the latest OpenHybrid Object code and download dependencies.
````
git clone https://github.com/openhybrid/object.git
cd object
npm install
````

5. Run the OpenHybrid Object code.
````
node server.js
````

A this point, you should be able to navigate to port 8080 on your device and find the Object dashboard.


Loading