Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <EthernetRaw.h>
- #include <socket.h>
- #include <avr/wdt.h>
- byte mac[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
- //byte mac_dest[] = { 0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };
- EthernetRawClass client;
- void setup() {
- wdt_disable();
- // Open serial communications and wait for port to open:
- Serial.begin(9600);
- Serial.println("Waiting one second");
- delay(1000);
- client.begin(mac);
- }
- void loop()
- {
- Serial.println("loop");
- if (client.available()) {
- Serial.println("On trouve quelque-chose à lire");
- char c = client.read();
- Serial.print(c);
- }
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment