freedom board datacomm

Dependencies:   DataCommClassVersion mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 #include "DataComm.h"
00003 
00004 DataComm test;
00005 char data[4] = "Hi!";
00006 int i=1000;
00007 
00008 int main()
00009 {
00010     //set up the output
00011     test.setClockIn(D8); //clock out pin
00012     test.setSerialIn(D7); //data out pin        
00013     test.setClock(i); //set clock timing
00014     test.initiate_connection(); //send preamble
00015     test.send_data(data, 3);   
00016 }