Rob Toulson / Mbed 2 deprecated PE_12-07_EthernetWrite

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 /* Program Example 12.7: Ethernet write
00002                                          */
00003 #include "mbed.h"                                      
00004 #include "Ethernet.h"
00005 Ethernet eth;                   // The Ethernet object
00006 char data[]={0xB9,0x46};        // Define the data values
00007 int main() {                                             
00008     while (1) {                                         
00009         eth.write(data,0x02);   // Write the package
00010         eth.send();             // Send the package
00011         wait(0.2);              // wait 200 ms
00012     }
00013 }
00014