
Completed Snake Program
Dependencies: N5110 PinDetect PowerControl mbed
Fork of DocTest by
Diff: main.cpp
- Revision:
- 1:6fc14cd8ccf1
- Parent:
- 0:b85460bc73b9
- Child:
- 2:deb61a34ac31
--- a/main.cpp Wed Mar 11 10:55:42 2015 +0000 +++ b/main.cpp Wed Mar 11 16:03:08 2015 +0000 @@ -7,6 +7,8 @@ #include "main.h" int main() { + + /// flash LED in infinite loop while(1) { myled = 1; wait(0.2); @@ -16,12 +18,8 @@ } -/** -* Doesn't really. Just an example function. -* @param a - some random value -* @returns the same value -*/ -int blink(int a) { +int sum(int a, int b) { - return a; + /// calculate the sum of the two arguments and return + return a + b; } \ No newline at end of file