Example program for BLE devices using updated Puck library.
Fork of location-puck by
main.cpp@14:d1a26847d25d, 2015-08-02 (annotated)
- Committer:
- Timmmm
- Date:
- Sun Aug 02 17:19:30 2015 +0000
- Revision:
- 14:d1a26847d25d
- Parent:
- 13:0f04dc5f14af
Example program for BLE devices.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cristea | 10:970a9922952b | 1 | /** |
cristea | 10:970a9922952b | 2 | * Copyright 2014 Nordic Semiconductor |
cristea | 10:970a9922952b | 3 | * |
cristea | 10:970a9922952b | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
cristea | 10:970a9922952b | 5 | * you may not use this file except in compliance with the License. |
cristea | 10:970a9922952b | 6 | * You may obtain a copy of the License at |
cristea | 10:970a9922952b | 7 | * |
cristea | 10:970a9922952b | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
cristea | 10:970a9922952b | 9 | * |
cristea | 10:970a9922952b | 10 | * Unless required by applicable law or agreed to in writing, software |
cristea | 10:970a9922952b | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
cristea | 10:970a9922952b | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
cristea | 10:970a9922952b | 13 | * See the License for the specific language governing permissions and |
cristea | 10:970a9922952b | 14 | * limitations under the License |
cristea | 10:970a9922952b | 15 | */ |
cristea | 10:970a9922952b | 16 | |
aleksanb | 13:0f04dc5f14af | 17 | // Remove the log level define in production. It will prevent your mbed from entering low power modes. |
sigveseb | 9:28eb877be5f8 | 18 | #define LOG_LEVEL_INFO |
sigveseb | 9:28eb877be5f8 | 19 | #include "Puck.h" |
cristea | 0:f4fbeaabdff5 | 20 | |
sigveseb | 9:28eb877be5f8 | 21 | Puck* puck = &Puck::getPuck(); |
cristea | 5:8ccb1cd6694d | 22 | |
cristea | 4:4324d5acd5d8 | 23 | int main(void) { |
sigveseb | 9:28eb877be5f8 | 24 | puck->init(0xBA55); |
sigveseb | 9:28eb877be5f8 | 25 | while(puck->drive()); |
sigveseb | 9:28eb877be5f8 | 26 | } |