Tnx! But it`s not big probleme
I try next:
#include <etherShield.h>
#include <ETHER_28J60.h>
#include <IRremote.h>
#include <wrun_jvc.h>
IRsend irsend;
ETHER_28J60 e;
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24};
static uint8_t ip[4] = {192, 168, 1, 15};
static uint16_t port = 80;
void RemoteJVC(unsigned long data) {
irsend.sendJVC(data, 16, 0);
delayMicroseconds(50);
irsend.sendJVC(data, 16, 1);
delay(50);
}
void setup() {
Serial.begin(115200);
Serial.println("Start 0");
e.setup(mac, ip, port);
Serial.println("Start 1");
}
void loop() {
// WebServer
char* params;
if (params = e.serviceRequest()) {
//params = params.substring(1,99);
Serial.println("in");
if (strcmp(params, "?JvcPower") == 0) RemoteJVC(JVC_Power);
if (strcmp(params, "?JvcVolUp") == 0) RemoteJVC(JVC_Vol_Up);
if (strcmp(params, "?JvcVolDn") == 0) RemoteJVC(JVC_Vol_Dn);
if (strcmp(params, "?JvcChNext") == 0) RemoteJVC(JVC_CH_Next);
if (strcmp(params, "?JvcChPrev") == 0) RemoteJVC(JVC_CH_Prev);
if (strcmp(params, "?031A") == 0) RemoteJVC(0xFFFF031A);
e.print("<html><head><title>wArd</title>");
e.print("<meta http-equiv='content-type' content='text/html; charset=utf-8' />");
e.print("<style>a{background:#ccc;display:block;font-size:80px;height:100px;text-align:center;margin:10px;}.temp{width:100px;display:inline-block;margin:10px 5px;}</style>");
e.print("</head><body> <H1>Wrun Web Remote</H1>");
e.print("<a href='?JvcPower'>Power</a>");
[b]e.print("<a href='?JvcVolUp&");
e.print(random(3000));
e.print("'>Volume Up</a>");
e.print("<a href='?JvcVolDn&");
e.print(random(3000));
e.print("'>Volume Down</a>");[/b]
e.print("<a href='?JvcChNext'>CH+</a>");
e.print("<a href='?JvcChPrev'>CH-</a>");
e.print("<a href='?031A'>031A</a>");
e.print("</body></html>");
e.respond();
}
}
I think its help, but I must to parse getting string...