Basic demo that shows how to control a Zumo shield using ST X-NUCLEO-IDB04A1 BlueTooth Low energy shield.
Dependencies: BLE_API X_NUCLEO_IDB0XA1 ZumoShield mbed
ST BLE shield: https://developer.mbed.org/components/X-NUCLEO-IDB04A1/
Zumo shield: https://www.pololu.com/category/169/zumo-robot-for-arduino
Android Application: TBD
SampleService.cpp@0:901651f381c9, 2015-10-12 (annotated)
- Committer:
- bcostm
- Date:
- Mon Oct 12 11:33:19 2015 +0000
- Revision:
- 0:901651f381c9
Initial version.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:901651f381c9 | 1 | /* mbed Microcontroller Library |
bcostm | 0:901651f381c9 | 2 | * Copyright (c) 2006-2013 ARM Limited |
bcostm | 0:901651f381c9 | 3 | * |
bcostm | 0:901651f381c9 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bcostm | 0:901651f381c9 | 5 | * you may not use this file except in compliance with the License. |
bcostm | 0:901651f381c9 | 6 | * You may obtain a copy of the License at |
bcostm | 0:901651f381c9 | 7 | * |
bcostm | 0:901651f381c9 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bcostm | 0:901651f381c9 | 9 | * |
bcostm | 0:901651f381c9 | 10 | * Unless required by applicable law or agreed to in writing, software |
bcostm | 0:901651f381c9 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bcostm | 0:901651f381c9 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bcostm | 0:901651f381c9 | 13 | * See the License for the specific language governing permissions and |
bcostm | 0:901651f381c9 | 14 | * limitations under the License. |
bcostm | 0:901651f381c9 | 15 | */ |
bcostm | 0:901651f381c9 | 16 | |
bcostm | 0:901651f381c9 | 17 | #include "SampleService.h" |
bcostm | 0:901651f381c9 | 18 | |
bcostm | 0:901651f381c9 | 19 | const uint16_t SampleServiceShortUUID = 0x200C; |
bcostm | 0:901651f381c9 | 20 | |
bcostm | 0:901651f381c9 | 21 | // Sample Service UUIDs |
bcostm | 0:901651f381c9 | 22 | const uint8_t SampleServiceUUID[UUID::LENGTH_OF_LONG_UUID] = { |
bcostm | 0:901651f381c9 | 23 | 0x66, 0x9A, (uint8_t)(SampleServiceShortUUID >> 8), (uint8_t)(SampleServiceShortUUID & 0xFF), 0x00, 0x08, 0x96, 0x9E, |
bcostm | 0:901651f381c9 | 24 | 0xE2, 0x11, 0x9E, 0xB1, 0xE0, 0xF2, 0x73, 0xD9 |
bcostm | 0:901651f381c9 | 25 | }; |
bcostm | 0:901651f381c9 | 26 | const uint8_t TXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID] = { |
bcostm | 0:901651f381c9 | 27 | 0x66, 0x9A, (uint8_t)(SampleServiceShortUUID >> 8), (uint8_t)(SampleServiceShortUUID & 0xFF), 0x00, 0x08, 0x96, 0x9E, |
bcostm | 0:901651f381c9 | 28 | 0xE2, 0x11, 0x9E, 0xB1, 0xE1, 0xF2, 0x73, 0xD9 |
bcostm | 0:901651f381c9 | 29 | }; |
bcostm | 0:901651f381c9 | 30 | const uint8_t RXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID] = { |
bcostm | 0:901651f381c9 | 31 | 0x66, 0x9A, (uint8_t)(SampleServiceShortUUID >> 8), (uint8_t)(SampleServiceShortUUID & 0xFF), 0x00, 0x08, 0x96, 0x9E, |
bcostm | 0:901651f381c9 | 32 | 0xE2, 0x11, 0x9E, 0xB1, 0xE2, 0xF2, 0x73, 0xD9 |
bcostm | 0:901651f381c9 | 33 | }; |