by Rob Toulson and Tim Wilmshurst from textbook "Fast and Effective Embedded Systems Design: Applying the ARM mbed"
Diff: main.cpp
- Revision:
- 0:90a5426d4de5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Jun 16 15:31:34 2013 +0000 @@ -0,0 +1,14 @@ +/* Program Example 12.7: Ethernet write + */ +#include "mbed.h" +#include "Ethernet.h" +Ethernet eth; // The Ethernet object +char data[]={0xB9,0x46}; // Define the data values +int main() { + while (1) { + eth.write(data,0x02); // Write the package + eth.send(); // Send the package + wait(0.2); // wait 200 ms + } +} +