diff --git a/SPI_M0/SPI_M0.ino b/SPI_M0/SPI_M0.ino new file mode 100644 index 0000000..95c2b6e --- /dev/null +++ b/SPI_M0/SPI_M0.ino @@ -0,0 +1,9 @@ +void setup() { + // put your setup code here, to run once: + +} + +void loop() { + // put your main code here, to run repeatedly: + +} diff --git a/arduino vers web/WebServer/WebServer.ino b/arduino vers web/WebServer/WebServer.ino index 314c6fa..4c79418 100644 --- a/arduino vers web/WebServer/WebServer.ino +++ b/arduino vers web/WebServer/WebServer.ino @@ -15,17 +15,13 @@ EthernetServer server(80); void setup() { // Open serial communications and wait for port to open: - Serial.begin(9600); - while (!Serial) { - ; // wait for serial port to connect. Needed for native USB port only - } - + SerialUSB.begin(9600); // start the Ethernet connection and the server: Ethernet.begin(mac, ip); server.begin(); - Serial.print("server is at "); - Serial.println(Ethernet.localIP()); + SerialUSB.print("server is at "); + SerialUSB.println(Ethernet.localIP()); } @@ -33,13 +29,13 @@ void loop() { // listen for incoming clients EthernetClient client = server.available(); if (client) { - Serial.println("new client"); + SerialUSB.println("new client"); // an http request ends with a blank line boolean currentLineIsBlank = true; while (client.connected()) { if (client.available()) { char c = client.read(); - Serial.write(c); + SerialUSB.write(c); // if you've gotten to the end of the line (received a newline // character) and the line is blank, the http request has ended, // so you can send a reply