Henry Herman
/
nodedemo
Node Code for 202A
Diff: main.cpp
- Revision:
- 0:981c60849454
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sun Oct 30 11:31:16 2011 +0000 @@ -0,0 +1,19 @@ +#include "mbed.h" +#include "Node.h" +DigitalOut myled(LED1); +Node node(5, 100, LED2, 1000); +Serial pc(USBTX,USBRX); +int main() { + char s[] = "HENRY"; + char *crc; + pc.printf("%s\r\n", s); + crc=node.execute(s); + for(int idx=0;idx<node.getSize();idx++) + pc.printf("0x%x\r\n",*(crc+idx)); + while(1) { + myled = 1; + wait(0.2); + myled = 0; + wait(0.2); + } +}