You'll have to disconnect the 7805 from the 27 volt feed circuit and I'd even suggest that you remove the 7805 all together, otherwise you'll have two 5 volt regulators (yours and the arduino) trying to feed a single circuit without blocking diode isolation. This could lead to instability.
Congrats on a neat build.
jack
Feeding it by the 5V pin should bypass the regulator on the Arduino? Because it is on the output side of it, shouldn't it?
Just finished the first of the code for it too
#include <WiServer.h>
#define WIRELESS_MODE_INFRA 1
#define WIRELESS_MODE_ADHOC 2
#include <WString.h> // include the String library
boolean debug = true;
// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[] = {192,168,1,10}; // IP address of WiShield
unsigned char gateway_ip[] = {192,168,1,1}; // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"dd-wrt"}; // max 32 bytes
unsigned char security_type = 3; // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2
// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"xxxxxxxxxxxxxxx"}; // max 64 characters
// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
};
// setup the wireless mode
// infrastructure - connect to AP
// adhoc - connect to another WiFi device
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
unsigned char ssid_len;
unsigned char security_passphrase_len;
// End of wireless configuration parameters ----------------------------------------
int motorPin = 0; // Pin the motor trigger is connected to
void doorMove()
{
digitalWrite(motorPin, HIGH);
delay(100);
digitalWrite(motorPin, LOW);
}
// This is our page serving function that generates web pages
boolean sendMyPage(char* URL)
{
String temp = "";
temp += URL;
for (int i=0; i < 60; i++)
{
temp.append(URL[i]);
}
if (debug) Serial.println(temp);
if(temp.contains("?do="))
{
temp = "";
for (int i=0; i < 60; i++)
{
temp.append(URL[i]);
}
String function = temp.substring(temp.indexOf("=")+1, temp.length()-2);
WiServer.print("Doing: "); WiServer.print(function);
if (function.contains("move"))
{
doorMove();
return true;
}
WiServer.print("Did: "); WiServer.print(function);
}
else if (strcmp(URL, "/") == 0)
{
// Use WiServer's print and println functions to write out the page content
WiServer.print(analogRead(0));
return true;
}
WiServer.print("No function");
return true;
}
void setup()
{
pinMode(motorPin, OUTPUT);
digitalWrite(motorPin, LOW);
// Initialize WiServer and have it use the sendMyPage function to serve pages
WiServer.init(sendMyPage);
}
void loop()
{
// Run WiServer
WiServer.server_task();
}
Instead of > if (function.contains("move"))
I first tried > if (function == "move")
but that is giving me > error: ambiguous overload for 'operator==' in 'function == "move"'
isn't it possible to somehow verify a string like that?