Run on TY51822r3 board with ACC sensor (LIS3DH or BMC050)
Dependencies: BLE_API LIS3DH mbed nRF51822 BMC050 nRF51_LowPwr nRF51_Vdd
Fork of BLE_EddystoneBeacon_Service by
main.cpp@28:af37cebcb583, 2015-07-24 (annotated)
- Committer:
- mbedAustin
- Date:
- Fri Jul 24 03:12:21 2015 +0000
- Revision:
- 28:af37cebcb583
- Parent:
- 26:2896fbdd0450
- Child:
- 29:dfb7fb5a971b
[[FIX]] fixed build issue, now compiling, though not running correctly.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
screamer | 0:c04d932e96c9 | 1 | /* mbed Microcontroller Library |
screamer | 0:c04d932e96c9 | 2 | * Copyright (c) 2006-2013 ARM Limited |
screamer | 0:c04d932e96c9 | 3 | * |
screamer | 0:c04d932e96c9 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
screamer | 0:c04d932e96c9 | 5 | * you may not use this file except in compliance with the License. |
screamer | 0:c04d932e96c9 | 6 | * You may obtain a copy of the License at |
screamer | 0:c04d932e96c9 | 7 | * |
screamer | 0:c04d932e96c9 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
screamer | 0:c04d932e96c9 | 9 | * |
screamer | 0:c04d932e96c9 | 10 | * Unless required by applicable law or agreed to in writing, software |
screamer | 0:c04d932e96c9 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
screamer | 0:c04d932e96c9 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
screamer | 0:c04d932e96c9 | 13 | * See the License for the specific language governing permissions and |
screamer | 0:c04d932e96c9 | 14 | * limitations under the License. |
screamer | 0:c04d932e96c9 | 15 | */ |
screamer | 0:c04d932e96c9 | 16 | |
screamer | 0:c04d932e96c9 | 17 | #include "mbed.h" |
rgrover1 | 7:e9800c45e065 | 18 | #include "BLE.h" |
mbedAustin | 26:2896fbdd0450 | 19 | #include "Eddystone.h" |
screamer | 0:c04d932e96c9 | 20 | |
rgrover1 | 8:1a21308e5008 | 21 | BLE ble; |
mbedAustin | 26:2896fbdd0450 | 22 | uint8_t UIDnamespace[] = {0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xAA}; // 10Bytes for Namespace UUID |
mbedAustin | 26:2896fbdd0450 | 23 | uint8_t UIDinstance[] = {0xbb,0xcc,0xdd,0xee,0xff,0x00}; // 6Bytes for Instance UUID |
mbedAustin | 26:2896fbdd0450 | 24 | char Url[] = "www.mbed.org"; |
screamer | 0:c04d932e96c9 | 25 | |
screamer | 0:c04d932e96c9 | 26 | int main(void) |
screamer | 0:c04d932e96c9 | 27 | { |
mbedAustin | 15:af8c24f34a9f | 28 | printf("Starting Example\r\n"); |
mbedAustin | 28:af37cebcb583 | 29 | EddystoneService eddyBeacon(ble, 100, 10,UIDnamespace, UIDinstance, Url, sizeof(Url)); |
mbedAustin | 15:af8c24f34a9f | 30 | printf("Running...\r\n"); |
screamer | 0:c04d932e96c9 | 31 | while (true) { |
screamer | 0:c04d932e96c9 | 32 | ble.waitForEvent(); |
screamer | 0:c04d932e96c9 | 33 | } |
screamer | 0:c04d932e96c9 | 34 | } |