henuk
July 15, 2022, 6:49am
1
Hi, when I compile my code i get two warnings:
......\Arduino\libraries\UIPEthernet\utility\uipopt.h:97:4: warning: #warning "Endianness configured automaticaly." [-Wcpp]
#warning "Endianness configured automaticaly."
.......\Arduino\libraries\UIPEthernet\utility\logging.h:24:2: warning: #warning "You can configure LogObject and ACTLOGLEVEL in 'utility/logging.h'. More verbosity more memory usage." [-Wcpp]
#warning "You can configure LogObject and ACTLOGLEVEL in 'utility/logging.h'. More verbosity more memory usage."
I've tried to write above and below:
#define ACTLOGLEVEL LOG_NONE
but it doesn't work. Do you know how to solve it?
horace
July 15, 2022, 7:49am
2
post your code using code tags </> and the complete error messages
what arduino board are you using and what Ethernet shield?
Juraj
July 15, 2022, 8:21am
3
if it is a new project, please use the EthernetENC library.
(I maintain both libraries)
henuk
July 15, 2022, 8:45am
4
#define IR_SEND_PIN 3
#include <IRremote.hpp>
#include <UIPEthernet.h>
#define ACTLOGLEVEL LOG_NONE // <- This may be a solution but it doesn't work
static uint8_t mac[6] = {0x54, 0x55, 0x58, 0x10, 0x00, 0x24};
IPAddress ip(192, 168, 0, 200);
EthernetServer server = EthernetServer(80);
void setup() {
Serial.begin(9600);
IrSender.begin();
Ethernet.begin(mac, ip);
server.begin();
}
void loop() {
EthernetClient client = server.available();
if (client) {
boolean currentLineIsBlank = true;
String buffer = "";
while (client.connected()) {
if (client.available()) {
char c = client.read();
buffer += c;
if (c == '\n' && currentLineIsBlank) {
client.println("HTTP/1.1 200 OK"); // HTTP response
client.println("Content-Type: text/html");
client.println();
break;
}
if (c == '\n') {
currentLineIsBlank = true;
buffer = "";
}
else if (c == '\r') {
if (buffer.indexOf("GET /?code=") >= 0) { //http://192.168.0.200/?code=123456
String s = buffer.substring(11, 17);
//uint32_t code = 0xFF02FD;
uint32_t code = 0;
for (int i = 0; i < s.length(); ++i) {
if (s[i] >= '0' and s[i] <= '9') {
code *= 16;
code += s[i] - '0';
} else if (s[i] == 'a' or s[i] == 'A') {
code *= 16;
code += 10;
} else if (s[i] == 'b' or s[i] == 'B') {
code *= 16;
code += 11;
} else if (s[i] == 'c' or s[i] == 'C') {
code *= 16;
code += 12;
} else if (s[i] == 'd' or s[i] == 'D') {
code *= 16;
code += 13;
} else if (s[i] == 'e' or s[i] == 'E') {
code *= 16;
code += 14;
} else if (s[i] == 'f' or s[i] == 'F') {
code *= 16;
code += 15;
}
}
//Serial.println(code);
//ON-OFF code 0xFF02FD
//code = 0xFF02FD;
IrSender.sendNECMSB(code, uint8_t(32)); //https://github.com/Arduino-IRremote/Arduino-IRremote
}
}
else {
currentLineIsBlank = false;
}
}
}
client.stop(); // End server
}
}
Arduino model: Arduino Nano
Ethernet Shield: ENC28J60
henuk
July 15, 2022, 8:49am
5
I am having some issues with arduino memory space. Do you thing changing to EthernetENC will help to solve this?
I will change it anyway but for asking.
Juraj
July 15, 2022, 9:20am
6
1 Like
system
Closed
January 11, 2023, 9:21am
7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.