Hello,
i found this progra, from Marvin Stuart.
After Compile i get always following Issue- message: I installed all libaries, also i installed the webduino as webduino and not as webduino-master. (both is not working). Can somebode help me?
C:\Users\kuntze\Documents\Arduino\Licht\Licht\Licht.ino:104:1: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]
"
^
C:\Users\kuntze\Documents\Arduino\Licht\Licht\Licht.ino: In function 'void settingsPage(WebServer&, WebServer::ConnectionType)':
Licht:205: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [2]')
server << " ";
^
Licht:207: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [6]')
server << "
";
^
Licht:209: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [45]')
server << "";
^
C:\Users\kuntze\Documents\Arduino\Licht\Licht\Licht.ino: In function 'void displayPins(WebServer&, int, int, String, bool)':
Licht:325: error: no match for 'operator<<' (operand types are 'WebServer' and 'String')
server << label;
^
Licht:339: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [12]')
server << "";
^
Licht:345: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [12]')
server << "";
^
Licht:356: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char*')
server << (!val ? "Off" : "On");
^
Licht:360: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char*')
server << (val ? "On" : "Off");
^
Licht:366: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [29]')
server << "n/a";
^
Licht:371: error: no match for 'operator<<' (operand types are 'WebServer' and 'const char [6]')
server << "
";
^
exit status 1
no match for 'operator<<' (operand types are 'WebServer' and 'const char [2]')
marvinstuart/switchrelay
Code
Issues 1
Pull requests 0
Pulse
Graphs
switchrelay/lightpower
0972286 on 7 Nov 2014
@marvinstuart marvinstuart Update lightpower
1 contributor
468 lines (426 sloc) 15 KB
/*
This application will run on a Arduino with a WizArd compatible ethernet shield.
The Arduino will server up a jQuery enhanced website using webduino for switching on and off relays
The relays can be connected to any number of applications. Most Specific it was intended
for remote automation of utility main's power for home automation.
You will need the webduino library in your Arduino /library folder to compile;
built in Arduino 1.5.4 and webduino 1.7 (you will need to restart IDE to load)
The application also has functionality for Push Button, which is essentially a pulse rather
then a latch of a relay, this is useful for hooking up to items that need turned on and off
with a time delay on the power button.
This code assumes the use of a 2x2 or 1x4 optio-isolator relay module. for a max of 7 relays
(I am out of memory in default code to add more) Any use of high voltage or damage to your hardware is not my fault.
I assume no risk or responsibility for the quality of this code.
To enable auth look below and change the settings accordingly. you will need to base 64 encode your creds.
Currently I am not saving the Port Name to EEPROM, if you have suggestions on how to accomplish
this quickly let me know, I just haven’t done it yet.. until then you can edit the relayUse array below
change 'Undefined' To your port name after reboot, Port1,Port2... etc.
To use this, enter the following USLs into your browser.
Replace "host" with the IP address assigned to the Arduino. (variables below)
These URLs brings up a display of the values READ on digital pins
This is done with a call to defaultCmd.
This URL also brings up a display of the values READ on digital pins
But it's done as a form, by the "formCmd" function,
and the digital pins are shown as radio buttons you can change.
When you click the "Submit" button, it does a POST that sets the
digital pins, re-reads them, and re-displays the form.
This URL will assign the pins to relays, by default all relays are disabled
this pin to relay information is stored on your Arduino EEPROM
Note: 255 is the default and that means the Item is not active.