diff --git a/hardware/arduino/avr/libraries/Bridge/YunServer.cpp b/hardware/arduino/avr/libraries/Bridge/YunServer.cpp index f23566a2f..3473ce8d9 100644 --- a/hardware/arduino/avr/libraries/Bridge/YunServer.cpp +++ b/hardware/arduino/avr/libraries/Bridge/YunServer.cpp @@ -46,3 +46,9 @@ YunClient YunServer::accept() { return YunClient(res[0]); } +size_t YunServer::write(uint8_t c) { + uint8_t cmd[] = { 'b', c }; + bridge.transfer(cmd, 2); + return 1; +} + diff --git a/hardware/arduino/avr/libraries/Bridge/YunServer.h b/hardware/arduino/avr/libraries/Bridge/YunServer.h index 734392414..69fdeabbc 100644 --- a/hardware/arduino/avr/libraries/Bridge/YunServer.h +++ b/hardware/arduino/avr/libraries/Bridge/YunServer.h @@ -32,7 +32,7 @@ public: void begin(); YunClient accept(); - virtual size_t write(uint8_t c) { /* TODO */ } + virtual size_t write(uint8_t c); void listenOnLocalhost() { useLocalhost = true; } void noListenOnLocalhost() { useLocalhost = false; }