diff --git a/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde b/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde index 8b00e8f..65434d3 100644 --- a/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde +++ b/branches/follower/wiz810mj/src/demo/WizDemo3/WizDemo3.pde @@ -193,6 +193,13 @@ void sendBanner(uint8_t *buffer, int ledState) { // {Socket targetSocket, ) { } +uint8_t readByte() { + uint8_t theByte; + recv(testSocket, &theByte, 1); + return theByte; +} + + void loop() { Serial.println("Test W5100 socket..."); @@ -256,8 +263,7 @@ void loop() { while (getSn_SR(testSocket) == SOCK_ESTABLISHED) { while (getSn_RX_RSR(testSocket) > 0) { - recv(testSocket, bytesReceived, 1); - theByte = bytesReceived[0]; + theByte = readByte(); //Serial.print(bytesReceived[0], BYTE); Serial.print(theByte, BYTE); if ((state == STATE_G) && (theByte == 'G')) {