Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Fork of UART_TEMPLATE by
Revision 1:94e2d9e7b447, committed 2017-02-01
- Comitter:
- Mavrikant
- Date:
- Wed Feb 01 13:23:12 2017 +0000
- Parent:
- 0:442c7a6f1978
- Commit message:
- son
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Dec 15 21:05:18 2014 -0800
+++ b/main.cpp Wed Feb 01 13:23:12 2017 +0000
@@ -1,19 +1,3 @@
-/* mbed Microcontroller Library
- * Copyright (c) 2006-2013 ARM Limited
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
#include "mbed.h"
#include "BLEDevice.h"
#include "UARTService.h"
@@ -22,18 +6,17 @@
#define MAX_REPLY_LEN (UARTService::BLE_UART_SERVICE_MAX_DATA_LEN)
#define SENSOR_READ_INTERVAL_S (0.5F)
#define ADV_INTERVAL_MS (1000UL)
-#define UART_BAUD_RATE (19200UL)
-#define DEVICE_NAME ("DEMO SENSOR") // This can be read AFTER connecting to the device.
-#define SHORT_NAME ("HACKDEMO") // Keep this short: max 8 chars if a 128bit UUID is also advertised.
-
+#define UART_BAUD_RATE (9600UL)
+#define DEVICE_NAME ("MobilMed Tartı") // This can be read AFTER connecting to the device.
+#define SHORT_NAME ("Tartı2") // Keep this short: max 8 chars if a 128bit UUID is also advertised.
#define DEBUG(...) { m_serial_port.printf(__VA_ARGS__); }
BLEDevice m_ble;
-Serial m_serial_port(p9, p11); // TX pin, RX pin
-DigitalOut m_cmd_led(LED1);
+Serial m_serial_port(P0_3, P0_4); // TX pin, RX pin
+DigitalOut m_cmd_led(P0_21);
DigitalOut m_error_led(LED2);
-AnalogIn m_analog_in(p1);
+AnalogIn m_analog_in(P0_1);
uint16_t m_analog_in_value;
UARTService *m_uart_service_ptr;
