Show Posts
Pages: [1] 2 3
1  Topics / Home Automation and Networked Objects / Re: Web based Temperature Logging on: April 15, 2014, 08:22:42 am
Here is how I did it:
https://github.com/lasselukkari/ArduinoWoT/blob/master/examples/WeatherStation/WeatherStation.ino

The result looks like this:
https://www.cs.helsinki.fi/u/ljlukkar/weatherstation/
2  Topics / Home Automation and Networked Objects / Apple TV web interface on: April 14, 2014, 02:30:38 am
Here is something I built during the weekend. I saw this post last Friday on Hackaday and remembered a project idea that I had been thinking about previously. Apple Remote Arduino shield has been featured in Hackaday also in 2009.

Searching anything with the original Apple TV IR-remote is a pain in the ass. You are forced to navigate your way in a grid of letters where the letters are organized alphabetically instead of forming a qwerty keyboard. I barely remember the correct order of the alphabets. Also many of the menu views would work better with swipe gestures instead of the four navigation buttons.




More details can be found from here:
https://www.cs.helsinki.fi/u/ljlukkar/appletv/

Source code on GitHub
3  Topics / Home Automation and Networked Objects / Re: arduino - android communication on: April 04, 2014, 06:18:47 am
I do it like this:
https://www.cs.helsinki.fi/u/ljlukkar/wot/

It's a webserver running on arduino but you get to choose the connection method from serial (bluetooth), ethernet and wifi and they all can be used with an Android phone.
4  Topics / Home Automation and Networked Objects / Re: Arduino HTTP REST API over BlueTooth with Android on: March 31, 2014, 10:06:00 am
Due to popular demand (none really) I made another example. A remote controller for the Blink server demonstrated in the first example.

Together with the first example they can be used for example like this

The source code for the Blink remote client is even simpler than the Blink server
Code:
#include <aJSON.h>
#include <ClientInterface.h>
#include <SerialClientAdapter.h>
#include <aJsonStore.h>
#include <HTTPStore.h>

// EthernetClient client;
// EthernetClientAdapter ethernetClientAdapter(client);
// byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// byte blinkServer[] = { 192, 168, 0, 11 };
// HTTPStore httpStorage(&ethernetClientAdapter);

SerialClientAdapter serialClientAdapter(&Serial);
HTTPStore httpStorage(&serialClientAdapter);
aJsonObject* ledModel  = aJson.parse("{\"id\":\"led\", \"on\":true}");

int buttonPin = 2;
bool lastState = 0;

void setup() {
  //Ethernet.begin(mac);
  //httpStorage.setServer(server, 80);
  Serial.begin(9600);
  pinMode(buttonPin, INPUT);
}

void loop(){
  bool buttonState = digitalRead(buttonPin);
  if (buttonState == HIGH && buttonState != lastState) {
    bool oldState = aJson.getObjectItem(ledModel, "on")->type;
    aJson.getObjectItem(ledModel, "on")->type = !oldState;
    httpStorage.saveModel("led", ledModel);
  }
  lastState = buttonState;
}

Everything needed for the setup including the HTML user interface is done with around 100 lines of C++ and JavaScript in total.
5  Topics / Home Automation and Networked Objects / Arduino HTTP REST API over BlueTooth with Android on: March 28, 2014, 02:40:03 am
Hello everyone!

I have been playing around with Arduino to build REST backends to support HTML user interfaces.

For the web server part I have been using the Webduino library. Webduino only works with Wiznet ethernet cards so I decided to abstract the transport stack behind an interface. This way it's possible to use for example serial connections and the CC3000 wifi chip with the library. The ability to use serial has many use cases. For example a serial to bluetooth adapter makes it possible to use the webserver over bluetooth with your Android mobile device and you can use XBees to make networks of servers and clients that communicate wiht each other wirelessly. The devices can also use multiple transport stacks simultaneously all with the same webserver code.

I have written some documentation that can be found from here:
https://www.cs.helsinki.fi/u/ljlukkar/wot/

Source code and some examples are here:
https://github.com/lasselukkari/ArduinoWoT

I currently don't have much time for this project but I'm happy to answer any questions.
6  Topics / Home Automation and Networked Objects / Re: Arduino control via Bluetooth on: October 19, 2013, 10:05:17 am
In the slave code you don't declare the pin mode.
7  Topics / Home Automation and Networked Objects / Re: Arduino Uno Record and Playback 433.92mhz signals via web interface on: June 17, 2013, 07:59:20 am
I did something similar:
https://github.com/lasselukkari/Arduino-RC-Timer-Switch

It's just a POC and I'm not planning to develop it any further.
8  Topics / Home Automation and Networked Objects / Re: Control Ethernet Shield with PHP? on: May 23, 2013, 01:20:06 am
I don't want to go to that page I just want to send that command.  How are people doing this?
http://api.jquery.com/jQuery.get/
9  Topics / Home Automation and Networked Objects / Re: Arduino Mega JSON REST interfaces (for HTML GUIs) on: January 26, 2013, 05:45:26 am
Hi llukkari,

Have you tried to do this project with the css and javascript files embedded on the arduino somehow?  Do you have any suggestions on how that might be done?

Thanks,
Tom


You could probably use the sd card. In my hydrobot project, http://www.cs.helsinki.fi/u/ljlukkar/hydrobot/,  I was able to use quite large csv files. I can't see any reason why it wouldn't work for other files as well.

You should try to set the http Cache-Control header so that the browser caches the responce and doesn't request it again.

Backbone.js, the MV* framework I have used in all the examples, is one of the most light weight out of them all.
10  Topics / Home Automation and Networked Objects / Re: Relay RF Control on: January 13, 2013, 04:25:30 am
thanks for the response.
I take from your reply that it would be possible for me to control the relay using the RF linkkit.

So i can control my relay without wiring directly to the UNO using this method?

The radio controllable switches I used are so cheap that I wouldn't bother to build the receiving end by myself. And atleast here Finland the legistlation is so that this has been the only legal way I know to control the mains AC with out being a qualified electrician.

If you want to use your own relays you could probably use the VirtualWire library instead.
 
11  Topics / Home Automation and Networked Objects / Re: Relay RF Control on: January 13, 2013, 03:49:46 am
Have you seen this library: http://code.google.com/p/rc-switch/ ?

I was playing around with it during the holidays and wrote this example:
https://github.com/lasselukkari/Arduino-RC-Timer-Switch (mega only)
12  Using Arduino / Networking, Protocols, and Devices / Re: Changes to external ip on: January 10, 2013, 06:42:53 pm
Put this php script to a server on Internet with know ip:

Code:
<?php
print ('<'.$_SERVER['REMOTE_ADDR'].'>');
?>


And use something like this script to read the ip from there: http://bildr.org/2011/06/arduino-ethernet-client/

Now you just need to compare the new and old ip values.

Is this what you are looking for?
13  Topics / Home Automation and Networked Objects / Re: LAN server without refreshing on: January 10, 2013, 12:39:31 pm
I'm not sure but has the String been fixed yet?

http://code.google.com/p/arduino/issues/detail?id=857

Could it be that?
14  Topics / Home Automation and Networked Objects / Re: How to control LED using Arduino as a webclient? on: January 10, 2013, 12:08:28 pm
From what I've read polling causes an increase of the use of bandwidth which could affect other users, and it's not in real time so, it is still an option but not the best.

You are polling the server with a 8 bit 16 MHz machine. Even if you would have hundreds of them looping as fast as they can the web server will not be your bottleneck. If it is, drop the HTTP or even the TCP because the headers are most of the messaging.
15  Topics / Home Automation and Networked Objects / Re: Cheap and small RF Rx/Tx on: January 10, 2013, 09:45:30 am
There is a library called "VirtualWire" that adds framing around your message so that it can detect interference.  This can be used to prevent damaged messages from causing unexpected behavior on the receiver.

Documentation for VirtualWire can be found here: http://www.open.com.au/mikem/arduino/VirtualWire.pdf

This migth help also: http://code.google.com/p/rc-switch/. You could use the same protocol and use those kinds of remotes to controll it along with your arduino.
Pages: [1] 2 3