Quick commit of code to program sketch onto another ATMega chip.

git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@132 3ee9b42a-b53c-0410-a25e-f0b6218d5d5b
master
follower 17 years ago
parent bedd180b0f
commit 7e1137fa16

@ -690,10 +690,11 @@ int StreamConnection::gobbleMatch(const char * separators, const char * target)
void setup () { void setup () {
Serial.begin(9600); // Serial.begin(9600);
Serial.println("Setup enter..."); Serial.begin(19200);
///Serial.println("Setup enter...");
Serial.println("Start W5100 configuration..."); ///Serial.println("Start W5100 configuration...");
SPI.begin(); SPI.begin();
@ -706,18 +707,45 @@ void setup () {
Network.device.setGateway(192,168,2,101); Network.device.setGateway(192,168,2,101);
Serial.println("End W5100 configuration..."); ///Serial.println("End W5100 configuration...");
pinMode(PIN_LED, OUTPUT); pinMode(PIN_LED, OUTPUT);
digitalWrite(PIN_LED, HIGH); digitalWrite(PIN_LED, HIGH);
Serial.println("Setup exit..."); ///Serial.println("Setup exit...");
// Serial.println(((analogRead(2)*70)/630)/10+'0', BYTE); // Serial.println(((analogRead(2)*70)/630)/10+'0', BYTE);
/**/ /**/
Serial.println("Test sockets..."); ///Serial.println("Test sockets...");
NetworkConnection conn = Network.listen(7);
///Serial.println("Waiting for connection...");
while (!conn.isConnected()) {
//Serial.print(!conn.isConnected());
delay(500);
}
///Serial.println("Connected...");
while (conn.isConnected()) {
if (conn.available()) {
// Serial.print(conn.read(), BYTE);
//conn.print(conn.read());
Serial.print(conn.read(), BYTE);
}
if (Serial.available()) {
conn.print(Serial.read());
}
}
///Serial.println("");
conn.close();
#if 0
#if 1 #if 1
#if 1 //b #if 1 //b
@ -725,6 +753,8 @@ void setup () {
Serial.println("halting"); Serial.println("halting");
while (1) {}; while (1) {};
NetworkConnection conn = Network.connect(209,177,146,34, 6667); // TODO: Better? NetworkConnection conn = Network.connect(209,177,146,34, 6667); // TODO: Better?
Serial.println("Waiting to connect..."); Serial.println("Waiting to connect...");
@ -946,9 +976,9 @@ void setup () {
} }
} }
#endif #endif
#endif // a-1
///Serial.println("End test and dummy loop");
Serial.println("End test and dummy loop");
while (1) {} while (1) {}
/**/ /**/
} }

Loading…
Cancel
Save