Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #10 from NordicSemiconductor/develop
Browse files Browse the repository at this point in the history
Version 1.1.0
  • Loading branch information
philips77 authored Mar 8, 2019
2 parents 00a3fff + 2941dd9 commit 5123b89
Show file tree
Hide file tree
Showing 63 changed files with 1,492 additions and 479 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ fastlane/Preview.html
fastlane/screenshots
fastlane/test_output

nRFBlinky.xcodeproj/project.xcworkspace/xcshareddata
nRFBlinky.xcodeproj/xcshareddata/xcschemes
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- **1.1.0**:
- Improvement: New Nordic look & feel
- Improvement: Localisatino support with Spanish, Italian, Norwegian, French, Russian, Ukrainian, Romanian, Polish, German and Korean
- Bugfix: FIxed hint positioning after orientation change

- **1.0.2**:
- Improvement: Blinky peripheral name is now used as the title of the view instead of the default name
- Improvement: Empty peripherals view resizes and animates better with orientation change
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,30 @@ A simplified proprietary service by Nordic Semiconductor, containing two charact
- UUID: **`00001524-1212-EFDE-1523-785FEABCD123`**
- Value: **`1`** => Button Pressed
- Value: **`0`** => Button Released

For full specification, check out
[documentation](https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_app_blinky).

### Requirements:
## Requirements:
- An iOS device with BLE capabilities
- A [nRF52](https://www.nordicsemi.com/eng/Products/Bluetooth-low-energy/nRF52-DK) or [nRF51](https://www.nordicsemi.com/eng/Products/nRF51-DK) Dev Kit
- The Blinky example firmware to flash on the Development Kit, there are a few places to acquire that:
- For your conveninence, we have bundled two firmwares in this project under the Firmwares directory.
- A [Development Kit](https://www.nordicsemi.com/Software-and-Tools/Development-Kits)
- The Blinky example firmware to flash on the Development Kit. For your conveninence, we have bundled two firmwares in this project under the Firmwares directory.
- To get the latest firmwares and check the source code, you may go directly to our [Developers website](http://developer.nordicsemi.com/nRF5_SDK/) and download the SDK version you need, then you can find the source code and hex files to the blinky demo in the directory `/examples/ble_peripheral/ble_app_blinky/`
- More information about the nRFBlinky example firmware can be found in the [Info center](https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.1.0%2Fble_sdk_app_blinky.html)
- More information about the nRFBlinky example firmware can be found in the [documentation](https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_app_blinky).

### Installation and usage:
## Installation and usage:
- Prepare your Development kit.
- Plug in the Development Kit to your computer via USB.
- Power On the Development Kit.
- The Development Kit will now appear as a Mass storage device.
- Drag (or copy/paste) the appropriate HEX file onto that new device.
- The Development Kit lEDS will flash and it will disconnect and reconnect.
- The Development Kit LEDs will flash and it will disconnect and reconnect.
- The Development Kit is now ready and flashed with the nRFBlinky example firmware.

- Start Xcode and run build the project against your target iOS Device (**Note:** BLE is not available in the iOS simulator, so the iOS device is a requirement to test the application).
- Launch the nRFBlinky app on your iOS device.
- The app will start scanning for nearby peripherals.
- Select the nRF_Blinky peripheral that appears on screen (**Note:** if the peripheral does not show up, ensure that it's powered on and functional).
- Select the Nordic_Blinky peripheral that appears on screen (**Note:** if the peripheral does not show up, ensure that it's powered on and functional).
- Your iOS device will now connect to the peripheral and state is displayed on the screen.
- Changing the value of the Toggle switch will turn LED 3 on or off.
- Pressing Button 1 on the Development Kit will show the button state as Pressed on the app.
Expand Down
123 changes: 113 additions & 10 deletions nRFBlinky.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

33 changes: 4 additions & 29 deletions nRFBlinky/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,12 @@ import CoreBluetooth
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

// Required for the Storyboard to show up.
var window: UIWindow?
public var centralManager: CBCentralManager?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
centralManager = CBCentralManager()
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


}

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"images" : [
{
"idiom" : "universal",
"filename" : "byNordic.png",
"filename" : "scanning.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "byNordic@2x.png",
"filename" : "scanning@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "byNordic@3x.png",
"filename" : "scanning@3x.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"images" : [
{
"idiom" : "universal",
"filename" : "nordic_logo-1.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "nordic_logo-2.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "nordic_logo.png",
"filename" : "splashscreen.png",
"scale" : "3x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 13 additions & 21 deletions nRFBlinky/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_0" orientation="portrait">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina5_9" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -15,37 +15,29 @@
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Nordic_Logo" translatesAutoresizingMaskIntoConstraints="NO" id="egL-H5-Mag">
<rect key="frame" x="87" y="123" width="146" height="241"/>
<constraints>
<constraint firstAttribute="height" constant="241" id="9NY-C3-j2M"/>
</constraints>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="byNordic" translatesAutoresizingMaskIntoConstraints="NO" id="6e9-ct-EyQ">
<rect key="frame" x="100" y="541" width="120" height="11"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="splashscreen" translatesAutoresizingMaskIntoConstraints="NO" id="xAk-gJ-3io">
<rect key="frame" x="0.0" y="0.0" width="375" height="812"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="egL-H5-Mag" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="103" id="4L1-Th-aNY"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="6e9-ct-EyQ" secondAttribute="bottom" constant="16" id="ChA-d6-3Dv"/>
<constraint firstItem="6e9-ct-EyQ" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="UM3-zV-WXM"/>
<constraint firstItem="egL-H5-Mag" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="87" id="b4W-ib-aQT"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="egL-H5-Mag" secondAttribute="trailing" constant="87" id="joK-iq-fxF"/>
<constraint firstItem="xAk-gJ-3io" firstAttribute="trailing" secondItem="Ze5-6b-2t3" secondAttribute="trailing" id="4H2-g1-UXR"/>
<constraint firstItem="xAk-gJ-3io" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="6bb-I4-Oy5"/>
<constraint firstItem="xAk-gJ-3io" firstAttribute="bottom" secondItem="Ze5-6b-2t3" secondAttribute="bottom" id="Y80-u8-M1P"/>
<constraint firstItem="xAk-gJ-3io" firstAttribute="top" secondItem="Ze5-6b-2t3" secondAttribute="top" id="lFw-hM-Ho5"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<viewLayoutGuide key="safeArea" id="wXR-uw-n6f"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="52" y="374.66266866566718"/>
<point key="canvasLocation" x="50.399999999999999" y="373.76311844077964"/>
</scene>
</scenes>
<resources>
<image name="Nordic_Logo" width="136" height="181"/>
<image name="byNordic" width="120" height="11"/>
<image name="splashscreen" width="2732" height="2732"/>
</resources>
</document>
Loading

0 comments on commit 5123b89

Please sign in to comment.