This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dgram = require('dgram'); | |
var client = dgram.createSocket('udp4'); | |
var express = require('express'); | |
var app = express(); | |
var http = require('http'); | |
var server = http.createServer(app); | |
app.use(express.static(__dirname + '/static')); | |
server.listen(8888); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <EthernetUdp.h> | |
byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; | |
IPAddress ip(192, 168, 0, 20); | |
unsigned int localPort = 8888; | |
EthernetUDP Udp; | |
unsigned char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; |