2015년 9월 24일 목요일

Near & Far

1. Near & Far



Near & Far  is a DIY tool + App that enables any ideas you thought depending on your location.

You have to assemble the Arduino directly, then add your desired functionality.

Please proceed as described below, it will be
"if you are near the arduino, screen of the computer is turned on
and if you are far the arduino,  screen of the computer is turned off."

This feature will operate through the Arduino and Node.js. This feature is in addition to any ideas you can implement directly through the Arduino.


https://www.arduino.cc

Arduino Hompage


Not difficult. Look at a time challenge.

2. How to assemble Arduino

1) Arduino UNO purchase

The first thing you will need to purchase the Arduino UNO.
If you search Google, you wil be able to purchse the Arduino UNO easily.
   
   
<Arduino Uno>

2) Bluetooth module purchase

Purchase a Bluetooth module for Arduino UNO.
You can buy a Bluetooth Low Energy (BLE) Shield for arduino FZ1033.
If you search Amazon or Ali express,  you will be able to purchase this module easily.

<Bluetooth Low Energy (BLE) Shield >

3) WiFi module purchase

Purchase a WiFi module for Arduino UNO.
Please buy the CC3000 WiFi Shield for Arduino UNO 2560 R3.
If you search Amazon or Ali express,  you will be able to purchase this module easily.

<CC3000 WiFi Shield >

4) Assembly

Please assemble the modules Arduino Uno + Bluetooth + WiFi module as shown in the picture.
Bluetooth module will be changed by connecting RX 2 and TX4 jumper pin.

<Bluetooth Jumper pin change>


<Arduino and Bluetooth assembly>


<WiFi assembled to Bluetooth>

Once the assembly is completed, so you can simply connect Arduino Uno with a USB cable to the PC.

5) Install Arduino Development Tools

Please install the Arduino development tools from the following link.


Please install the appropriate version for your PC(Windows or Mac).
I will describe the Windows based. (Mac is the same.)

<Start the installation with the default settings>


<Installation Completed>
   

6) Run sketch

   
Download following sketches (Arduino source) and Extract the legal position.
In the Arduino development tools and run in the following procedure.


   
<Arduino development tools Preferences>


 <Select decompressed folder>


<Sketches Open>


<Arduino port selection>


<Sketches executed>
   
<Serial Monitor selection>

<Sketches completed execution>

3. How to install Node.js

1) Node.js Installation

Download and Install Node.js on the following link.


Please install the version for your PC OS.
I'll give you explain to Windows based. (Mac is the same.)

 <Install Node.js by the default settings>


 <Installation completed>

2) Downloads server source

Download the following links.(Near & Far source server for Node.js)



Compressed the downloaded zip file to a suitable location. Open a command window and Navigate to the location.

<Go to that location through the command Window>

3) Starts server

In the command window, typing the following command will run the server.

node near_far.js

Remember server address and port.

<node.js Run>


<Run Results - IP: Port>

4. How to use app

1) App installation

Download the app from the following link.

2) Arduino / Node.js start confirmation

If Arduino and Node.js is normally executed, you will see the screen shots.

<Arduino Serial Monitor>


<Node.js console>

3) How to use the app

After running the app, the Arduino settings is started by touching Arduino logo.

<Arduino Connecting Screen>


If the connection is succeed, you will have to enter the following information.

<Arduino Setting Screen>

- Arduino Alias: You can enter the name to distinguish the Arduino.

- WiFi SSID: Enter the AP SSID to connect to the Internet.

- Security type: Select security type for the SSID entered above.

- Password: Enter the password for the SSID entered above.

- Node.js server address: Enter the "IP address:port" of the previously installed Node.js server.

- Check Interval: Enter the interval to check my position.(minimum : 60 seconds)

Once the setup is complete, Arduino and app will be determine the location of your phone by using BLE and iBeacon functionality.

<Setting completed Screen>
        
- Arduino status: Query current states of Arduino.
          
- Arduino Delete: Delete current registered Arduino.

5. The scenario that you can use

You can modify any source code of Arduino and Node.js to implements other ideas.

for example..

- Turn on/off your appliances by checking your location.

- Post any message to SNS by checking your location.