home‎ > ‎

ArduActivate (en)


With this App you'll be able to activate your Arduino using your iPhone GPS.

First of all you need:

- 1 iPhone (iOS >= 4.2.x)
- 1 Arduino Uno (The arduino software version 0022, not tested with newer version!!!)
- 1 Ethernet Shield (I use the one with the chipset Wiznet W5100)
- The TinyWebServer code, download from the attachment below

Now follow these instructions:

1) use the Arduino application and open the code that is under:
/TinyWebServer/examples/BlinkLed/BlinkLed.pde. Change the ip number to match that inside your network. Read the README.txt file inside this folder to help you test the application.

Modify the function named "blink_led_handler" appending the following code just befose the closing brachets:

 Serial << F("OPEN GATE\n");

After this function, create a new one, called "dosomething" as following:

void doSomething()
  digitalWrite(7, HIGH); 
  digitalWrite(7, LOW);
This triggers the pin N. 7 for three seconds to high.
Save the sketch ad upload to Arduino.

2) Download the ArduActivate App from iTunes and start the application. You must have enabled the localization feature for this to work.

3) Click on the "Active" button so you can easily set the base location, so you don't have to manually set the Latitude and Longitude of your base location. To set the base, cliche the "set default base" button. 

4) Now you can exit and go into Settings, and open the ArduActivate settings. You should see something similar to this image:

ArduActivate Settings

5) You must set your public ip/host that can be reached from the internet. 
In the Arduino Url read signal, set (without the "http://" part):
In the Arduino Url Switch set, (without the "http://" part):

6) Set your firewall to forward the port 80 (http) to the internal ip address of your ethernet shield (the same you set up in step 1). Test from a common browser that the "/ledstatus" address is working, it should return a "0" or a "1".

7) Test the application using the "Force Open" button, it should activate your output pin of your Arduino, flashing your led.

I've made this application with one specific use in mind. When I'm outside with my motorbike I want that when I return back home, the gate opens automatically without the worry to stop the motorbike, search for the remote and wait for the gate to open.

Now you can better understand how to set the trigger. In my case I set it to about 200m, so when I come near the house the gate is already open for me.

If you activate the ArduActivate while you're still inside the circle (the circle center is your base latitude and longitude, and the radiur is the trigger in meters), it won't start cause it waits that you have passed the "trigger range" and so it activates the "return mode".

Now you have all up and working, but you're just switching a led on and off... how can you use your remote?
I used a Mosfet as a switch linked to the pin of the blinkled example.

- 1) Short-circuit the button of your remote

2) Connect the power terminals of the remote using a Mosfet power kit controlled by the output pin of the "blinkled example" of Arduino (the white wire)

From the image below you can see the Mosfet power kit connection. The two Mosfet connection (+ red and - black) on top go to the circuit positive and negative terminals as visible in the image above. The lower Mosfet connection are: the Gate connection (white), connected to the pin 7 of Arduino; the - (black) goes to Arduino GND pin, the + (red) goes to the positive terminal of the battery. The negative side of the battery goes to another Arduino GND.

That's all. Now the remote stays at home, and I use my iPhone to open the gate.

Video of ArduActivate in action:

ArduActivate in action

ArduActivate background feature video:

ArduActivate Background feature

One last question...:

Pagine secondarie (1): Arduactivate (ita)
Matteo Sacco,
12 set 2011, 08:58