Show Posts
Pages: [1]
1  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Wifi official shield unstable connection on: January 13, 2013, 07:25:30 pm
I am also having same connection issues. Works great one minute then switch to different wifi device and everything freezes up.  Using stand-alone linksys wifi router (not connected to internet) laptop and samsung phone for testing. Using a 2 relay control setup. Code works fine and connection to router seems stable but freeze-up issues all the time. Same as others, restarts and resets ( in no particular order) sometimes gets it working again...  smiley-confuse
2  Using Arduino / Project Guidance / Re: wind turbine NOOB on: December 30, 2012, 08:38:25 pm
Ill be experimenting with this concept. I have a wx station that died, ice fell from roof and struck rx / tx unit and broke it. I still have wind speed / direction unit on roof with cables leading down from it.

Id like to hook it up for now and rx values and play with it a bit, but in the end i want to make a setup that will orient a small wind turbine into the wind based on 1 minute averages from wind direction sensor. (or 2 -3 min avg... whatever makes sense) ...

Also want the windspeed to add values to the equation so that if the wind gets too strong, it will orient the turbine out of the wind as to slow it down. Or if there is no windspeed it could orient to a home position. The 360 positioning could get interesting, but i think it can be figured out...

Solar tracker is on the list as well, reading from TLE files generated from tracking software like www.stoff.pl 

3  Using Arduino / Networking, Protocols, and Devices / Re: Standard Web remote to control 2 relays on: November 19, 2012, 08:31:31 pm
Thanks so much for the help on this Paul.

I am able to switch 2 seperate relays now with 2 buttons showing.

Now i have a temperature sensor on its way, i just need to figure out how to tack that code onto the end so it will display under my buttons smiley-wink

Cheers for now!
4  Using Arduino / Networking, Protocols, and Devices / Re: Sudden unreliability with my network-enabled Arduino project on: November 18, 2012, 08:30:54 pm
Florescent lights do emit a RF signal that could possibly be harmful. Does your networking cable run near these lights? I am a amateur radio operator and i know that the ballast in those lights can cause audible noise on certain frequencies.... but will also create unwanted "noise" in data cables.
5  Using Arduino / Networking, Protocols, and Devices / Re: Standard Web remote to control 2 relays on: November 16, 2012, 08:41:50 pm
Quote
Apparently, you aren't listening.

no, i just dont understand. I'm in too deep for my experience level... Ill research what everything means and give it another shot. 

Thanks
6  Using Arduino / Networking, Protocols, and Devices / Re: Standard Web remote to control 2 relays on: November 16, 2012, 07:25:58 pm
I cant seem to get it to work. I can get second button to show up but cant get them to work seperately... any chance you could post adjusted code and explain the added lines? Not sure where to add the 4 blocks as you Quoted...  I seem to learn by doing and making mistakes, but my mistakes are not getting me anywhere!!  If i see it i can better understand how it works....

This is what i have...  i left the button style info as it made the buttons extremely small on my smartphone...

Quote
// Control 2 seperate relays via wifi

#include "etherShield.h"
#include "ETHER_28J60.h"
#include "avr/wdt.h"

int relay1 = 6;
int relay2 = 7;
int Led_1 = 4;
int Led_2 = 5;
int relayStatus;

static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; // this just needs to be unique for your network,
static uint8_t ip[4] = {10, 100, 2, 45}; // IP address for the webserver
static uint16_t port = 80; // Use port 80 - the standard for HTTP
ETHER_28J60 e;


void setup()

wdt_disable();

e.setup(mac, ip, port);
pinMode(relay1, OUTPUT);
pinMode(relay2, OUTPUT);
pinMode(Led_1, OUTPUT);
pinMode(Led_2, OUTPUT);

digitalWrite(relay1, LOW);
digitalWrite(relay2, LOW);
digitalWrite(Led_1, LOW);
digitalWrite(Led_2, HIGH);

wdt_enable(WDTO_2S);
}

void loop()
{
char* params;
if (params = e.serviceRequest())
{
e.print("<h1><a href='/?led=off'>DANNY'S WIFI REMOTE</a></h1>");
if (strcmp(params, "?led=on") == 0)
{
digitalWrite(relay1, HIGH);
digitalWrite(relay2, HIGH);
digitalWrite(Led_1, HIGH);
digitalWrite(Led_2, LOW);
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY1 ON</button></a>");
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY2 ON</button></a>");
}
if (strcmp(params, "?led=off") == 0)
{
digitalWrite(relay1, LOW);
digitalWrite(relay2, LOW);
digitalWrite(Led_1, LOW);
digitalWrite(Led_2, HIGH);
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY1 OFF</button></a>");
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY2 OFF</button></a>");
}
else
{
relayStatus = digitalRead(relay1);
relayStatus = digitalRead(relay2);
if (relayStatus == LOW)
{
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY1 OFF</button></a>");
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY2 OFF</button></a>");
}
else
{
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY1 ON</button></a>");
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY2 ON</button></a>");


e.respond();
}
wdt_reset();
}

7  Using Arduino / Networking, Protocols, and Devices / Re: Camera + WiFi on: November 15, 2012, 03:17:35 pm
http://www.google.ca/mobile/goggles/#text

8  Using Arduino / Networking, Protocols, and Devices / Re: Standard Web remote to control 2 relays on: November 14, 2012, 03:50:59 pm
I have 2, 5v relays to control I have one of them working now, with the current code, on pin 6. I was going to hook the 2nd relay to pin 7 I figured i needed another int outputPin  line that =7. (only want to use pin 7 to keep wires tidy, can use another if need be)

And sorry I meant the button name, It could just be called "Relay 2 IS ON".... ect... 

And yes i'd like to replace outputPin  with Relay1  or Relay2 .... just so it referrs to exactly what it's controlling...
So i'd assume i could write this:

int relay1 = 6;
int relay2 = 7;

As far as the rest of the code, i just unsure on how to have it display the second button and in turn activate the second relay.

Thanks for the help! New at this but eager to learn!

9  Using Arduino / Networking, Protocols, and Devices / Standard Web remote to control 2 relays on: November 13, 2012, 07:33:04 pm
Hi, new here. been trying to rewrite code to control 2 relays via web remote but not having much luck. Want second outputPin =7 and can rename 2nd relay to whatever...  Code now is as follows:

// Web server for switching 2 relays

#include "etherShield.h"
#include "ETHER_28J60.h"
#include "avr/wdt.h"

int outputPin = 6;
int Led_1 = 4;
int Led_2 = 5;
int relayStatus;

static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24}; // this just needs to be unique for your network,
static uint8_t ip[4] = {10, 100, 2, 45}; // IP address for the webserver
static uint16_t port = 80; // Use port 80 - the standard for HTTP
ETHER_28J60 e;

void setup()
{
wdt_disable();

e.setup(mac, ip, port);
pinMode(outputPin, OUTPUT);
pinMode(Led_1, OUTPUT);
pinMode(Led_2, OUTPUT);

digitalWrite(outputPin, LOW);
digitalWrite(Led_1, LOW);
digitalWrite(Led_2, HIGH);

wdt_enable(WDTO_2S);
}

void loop()
{
char* params;
if (params = e.serviceRequest())
{
e.print("<h1><a href='/?led=off'>Web Remote</a></h1>");
if (strcmp(params, "?led=on") == 0)
{
digitalWrite(outputPin, HIGH);
digitalWrite(Led_1, HIGH);
digitalWrite(Led_2, LOW);
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY1 IS ON</button></a>");
}
else if (strcmp(params, "?led=off") == 0)
{
digitalWrite(outputPin, LOW);
digitalWrite(Led_1, LOW);
digitalWrite(Led_2, HIGH);
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY1 IS OFF</button></a>");
}
else
{
relayStatus = digitalRead(outputPin);
if (relayStatus == LOW)
{
e.print("<a href='?led=on'><button style='border: 10px solid #000;font-size:800%; border-left: 20px solid #000' type='button'>RELAY1 IS OFF</button></a>");
}
else
{
e.print("<a href='?led=off'><button style='border: 10px solid #ff0000;font-size:800%; border-left: 20px solid #ff0000' type='button'>RELAY1 IS ON</button></a>");
}
//e.print("<h1><a href='/?led=off'>secondary line of text after buttons</a></h1>");
}
e.respond();
}
wdt_reset();
}
Pages: [1]