This is a modular blinky code that implements a moving led pattern. This example project can be used as a template for the modular projects.
Dependencies: ledControl led_KnightRider mbed
main.cpp@2:31cf8d27ec43, 2015-07-21 (annotated)
- Committer:
- BaserK
- Date:
- Tue Jul 21 08:24:25 2015 +0000
- Revision:
- 2:31cf8d27ec43
- Parent:
- 0:3d8edb6d1767
MIT license is added
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
BaserK | 2:31cf8d27ec43 | 1 | /* |
BaserK | 2:31cf8d27ec43 | 2 | * Copyright (c) 2015, Baser Kandehir, baser.kandehir@ieee.metu.edu.tr |
BaserK | 2:31cf8d27ec43 | 3 | * |
BaserK | 2:31cf8d27ec43 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
BaserK | 2:31cf8d27ec43 | 5 | * of this software and associated documentation files (the "Software"), to deal |
BaserK | 2:31cf8d27ec43 | 6 | * in the Software without restriction, including without limitation the rights |
BaserK | 2:31cf8d27ec43 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
BaserK | 2:31cf8d27ec43 | 8 | * copies of the Software, and to permit persons to whom the Software is |
BaserK | 2:31cf8d27ec43 | 9 | * furnished to do so, subject to the following conditions: |
BaserK | 2:31cf8d27ec43 | 10 | * |
BaserK | 2:31cf8d27ec43 | 11 | * The above copyright notice and this permission notice shall be included in |
BaserK | 2:31cf8d27ec43 | 12 | * all copies or substantial portions of the Software. |
BaserK | 2:31cf8d27ec43 | 13 | * |
BaserK | 2:31cf8d27ec43 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
BaserK | 2:31cf8d27ec43 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
BaserK | 2:31cf8d27ec43 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
BaserK | 2:31cf8d27ec43 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
BaserK | 2:31cf8d27ec43 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
BaserK | 2:31cf8d27ec43 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
BaserK | 2:31cf8d27ec43 | 20 | * THE SOFTWARE. |
BaserK | 2:31cf8d27ec43 | 21 | * |
BaserK | 2:31cf8d27ec43 | 22 | */ |
BaserK | 2:31cf8d27ec43 | 23 | |
BaserK | 0:3d8edb6d1767 | 24 | #include "mbed.h" |
BaserK | 0:3d8edb6d1767 | 25 | #include "ledControl.h" |
BaserK | 0:3d8edb6d1767 | 26 | #include "led_KnightRider.h" |
BaserK | 0:3d8edb6d1767 | 27 | |
BaserK | 0:3d8edb6d1767 | 28 | int main() { |
BaserK | 0:3d8edb6d1767 | 29 | while(1) { |
BaserK | 0:3d8edb6d1767 | 30 | led_KnightRider(); |
BaserK | 0:3d8edb6d1767 | 31 | } |
BaserK | 0:3d8edb6d1767 | 32 | } |