Show Posts
Pages: [1]
1  Topics / Home Automation and Networked Objects / Re: Pachube Enc28j60 on: January 21, 2013, 10:46:52 am
would the cosm libraries be compatible with my ethernet card enc28j60?
2  Topics / Home Automation and Networked Objects / Pachube Enc28j60 on: January 21, 2013, 05:13:38 am
I have the following code:
// Simple demo for feeding some random data to Pachube.
// 2011-07-08 <>

#include <EtherCard.h>

// change these settings to match your own setup
#define FEED    "98772"
#define APIKEY  " " // empty due too online post

// ethernet interface mac address, must be unique on the LAN
byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
// Static IP configuration to use if no DHCP found
// Change these to match your site setup
static byte static_ip[] = { 192,168,1,110};
static byte static_gw[] = { 192,168,1,1};

char website[] PROGMEM = "";

byte Ethernet::buffer[700];
uint32_t timer;
Stash stash;

void setup () {

if (ether.begin(sizeof Ethernet::buffer, mymac,10) == 0)
    printf_P(PSTR( "Failed to access Ethernet controller\n\r"));
  if (!ether.dhcpSetup())
    printf_P(PSTR("DHCP failed, using static configuration\n\r"));
    ether.staticSetup(static_ip, static_gw);
  ether.printIp("IP:  ", ether.myip);
  ether.printIp("GW:  ", ether.gwip); 
  ether.printIp("DNS: ", ether.dnsip); 
  if (!ether.dnsLookup(website))
    printf_P(PSTR("DNS failed\n\r"));

  ether.printIp("SRV: ", ether.hisip);


void loop () {
  if (millis() > timer) {
    timer = millis() + 10000;

    byte sd = stash.create();
    stash.print("0,");   // 5 est le numero du datastream
    // generate the header with payload - note that the stash size is used,
    // and that a "stash descriptor" is passed in as argument using "$H"
    Stash::prepare(PSTR("PUT HTTP/1.0" "\r\n"
                        "Host: $F" "\r\n"
                        "X-PachubeApiKey: $F" "\r\n"
                        "Content-Length: $D" "\r\n"
            website, PSTR(FEED), website, PSTR(APIKEY), stash.size(), sd);
    // send the packet - this also releases all stash buffers once done


It prints out the following on my serialmonitor:
Yet there is no update on my feed from cosm.
 What am I doing wrong? Please if anyone can assist.
3  Using Arduino / Motors, Mechanics, and Power / Powering multiple components and UNO on: January 17, 2013, 05:23:55 am
I would like to know how could I power my UNO, Ethernet Shield, LCD. The Ethernet use 3.3V and LCD 5V.
Can the UNO receive multiple power inputs, thinking dc 5.7V via usb and usb to power adapter and then extra 12V DC from outlet to run the components?
How would I achieve this if possible?

4  Topics / Home Automation and Networked Objects / Re: Relay RF Control on: January 13, 2013, 04:11:04 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?
5  Topics / Home Automation and Networked Objects / Relay RF Control on: January 13, 2013, 03:22:08 am
Hi all,
I am working on a project for basic home automation. I currently have a relay setup into a outlet box and can control whatever is plugged into the outlet via my pc.
My general concern now is that how can I move this wireless.(the connection between the relay and the arduino) Or would I have to have an Arduino unit for each outlet box. This could get expensive.
I currently have:
Arduino UNO
SPDT Relay and circuitry inside the outlet box. (220V power)

I have though of doing the following:
Control the outlet box with RF :

Would this be possible and If so , how would I proceed?
Any alternatives?

Pages: [1]