-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
there's no commit like the first commit
- Loading branch information
scope
committed
Oct 12, 2017
1 parent
cfd2fc0
commit c522dae
Showing
10 changed files
with
418 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"name": "bte", | ||
"app_id": "", | ||
"type": "ionic-angular" | ||
"type": "ionic-angular", | ||
"integrations": { | ||
"cordova": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,61 @@ | ||
{ | ||
"name": "bte", | ||
"version": "0.0.1", | ||
"author": "Ionic Framework", | ||
"homepage": "http://ionicframework.com/", | ||
"private": true, | ||
"scripts": { | ||
"clean": "ionic-app-scripts clean", | ||
"build": "ionic-app-scripts build", | ||
"lint": "ionic-app-scripts lint", | ||
"ionic:build": "ionic-app-scripts build", | ||
"ionic:serve": "ionic-app-scripts serve" | ||
}, | ||
"dependencies": { | ||
"@angular/common": "4.4.3", | ||
"@angular/compiler": "4.4.3", | ||
"@angular/compiler-cli": "4.4.3", | ||
"@angular/core": "4.4.3", | ||
"@angular/forms": "4.4.3", | ||
"@angular/http": "4.4.3", | ||
"@angular/platform-browser": "4.4.3", | ||
"@angular/platform-browser-dynamic": "4.4.3", | ||
"@ionic-native/core": "4.3.0", | ||
"@ionic-native/splash-screen": "4.3.0", | ||
"@ionic-native/status-bar": "4.3.0", | ||
"@ionic/storage": "2.0.1", | ||
"ionic-angular": "3.7.1", | ||
"ionicons": "3.0.0", | ||
"rxjs": "5.4.3", | ||
"sw-toolbox": "3.6.0", | ||
"zone.js": "0.8.18" | ||
}, | ||
"devDependencies": { | ||
"@ionic/app-scripts": "3.0.0", | ||
"typescript": "2.3.4" | ||
}, | ||
"description": "An Ionic project" | ||
} | ||
"name": "bte", | ||
"version": "0.0.1", | ||
"author": "Ionic Framework", | ||
"homepage": "http://ionicframework.com/", | ||
"private": true, | ||
"scripts": { | ||
"clean": "ionic-app-scripts clean", | ||
"build": "ionic-app-scripts build", | ||
"lint": "ionic-app-scripts lint", | ||
"ionic:build": "ionic-app-scripts build", | ||
"ionic:serve": "ionic-app-scripts serve" | ||
}, | ||
"dependencies": { | ||
"@angular/common": "4.4.3", | ||
"@angular/compiler": "4.4.3", | ||
"@angular/compiler-cli": "4.4.3", | ||
"@angular/core": "4.4.3", | ||
"@angular/forms": "4.4.3", | ||
"@angular/http": "4.4.3", | ||
"@angular/platform-browser": "4.4.3", | ||
"@angular/platform-browser-dynamic": "4.4.3", | ||
"@ionic-native/bluetooth-serial": "^4.3.1", | ||
"@ionic-native/core": "4.3.0", | ||
"@ionic-native/splash-screen": "4.3.0", | ||
"@ionic-native/status-bar": "4.3.0", | ||
"@ionic/storage": "2.0.1", | ||
"cordova-android": "^6.2.3", | ||
"cordova-plugin-bluetooth-serial": "^0.4.7", | ||
"cordova-plugin-device": "^1.1.4", | ||
"cordova-plugin-ionic-webview": "^1.1.15", | ||
"cordova-plugin-splashscreen": "^4.0.3", | ||
"cordova-plugin-statusbar": "git+https://github.com/apache/cordova-plugin-statusbar.git", | ||
"cordova-plugin-whitelist": "^1.3.1", | ||
"ionic-angular": "3.7.1", | ||
"ionic-plugin-keyboard": "^2.2.1", | ||
"ionicons": "3.0.0", | ||
"rxjs": "5.4.3", | ||
"sw-toolbox": "3.6.0", | ||
"zone.js": "0.8.18" | ||
}, | ||
"devDependencies": { | ||
"@ionic/app-scripts": "3.0.0", | ||
"typescript": "2.3.4" | ||
}, | ||
"description": "An Ionic project", | ||
"cordova": { | ||
"plugins": { | ||
"cordova-plugin-device": {}, | ||
"cordova-plugin-ionic-webview": {}, | ||
"cordova-plugin-splashscreen": {}, | ||
"cordova-plugin-statusbar": {}, | ||
"cordova-plugin-whitelist": {}, | ||
"ionic-plugin-keyboard": {}, | ||
"cordova-plugin-bluetooth-serial": {} | ||
}, | ||
"platforms": [ | ||
"android" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<ion-header> | ||
|
||
<ion-navbar> | ||
<ion-title>Bluetooth Things</ion-title> | ||
</ion-navbar> | ||
|
||
</ion-header> | ||
|
||
|
||
<ion-content padding> | ||
<ion-slides pager="true"> | ||
|
||
<!--Slide 1--> | ||
<ion-slide> | ||
<ion-list padding> | ||
<button ion-button block (click)="startScanning()">scan</button> | ||
|
||
<ion-list-header> | ||
Paired Devices | ||
</ion-list-header> | ||
|
||
<ion-item *ngFor="let device of pairedDevices"> | ||
<span (click)="selectDevice(device.address)"> | ||
{{device.name}} : {{device.address}} | ||
</span> | ||
</ion-item> | ||
|
||
<button ion-button block (click)="disconnect()">Disconnect</button> | ||
|
||
<ion-list-header> | ||
Available Devices | ||
</ion-list-header> | ||
|
||
<ion-item *ngFor='let device of unpairedDevices'> | ||
<span (click)="selectDevice(device.address)"> | ||
{{device.name}} : {{device.address}} | ||
</span> | ||
</ion-item> | ||
|
||
<ion-spinner name="crescent" *ngIf="gettingDevices"></ion-spinner> | ||
</ion-list> | ||
</ion-slide> | ||
|
||
<!--Slide 2--> | ||
<ion-slide> | ||
|
||
<ion-label>LED Response:</ion-label> | ||
<p> {{model.ledResponse}} </p> | ||
<button ion-button block (click)="turnOn()">on</button> | ||
<button ion-button block (click)="turnOff()">off</button> | ||
|
||
</ion-slide> | ||
|
||
<!--Slide 3--> | ||
<ion-slide> | ||
<p> {{model.readResponse}} </p> | ||
<button ion-button block (click)="readThings()">read</button> | ||
<hr> | ||
<ion-label>Write Things:</ion-label> | ||
<ion-textarea type="text" [(ngModel)]="model.writeThis"></ion-textarea> | ||
<button ion-button block (click)="writeThings()">write</button> | ||
</ion-slide> | ||
|
||
<!--Slide 4--> | ||
<ion-slide> | ||
<p>{{model.slideFourInfo}}</p> | ||
<button ion-button block (click)="util()">util</button> | ||
<button ion-button block (click)="showSettings()">settings</button> | ||
<button ion-button block (click)="listThings()">list</button> | ||
</ion-slide> | ||
|
||
</ion-slides> | ||
|
||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { IonicPageModule } from 'ionic-angular'; | ||
import { BluetoothThingsPage } from './bluetooth-things'; | ||
import { BluetoothSerial } from '@ionic-native/bluetooth-serial'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
BluetoothThingsPage, | ||
], | ||
imports: [ | ||
IonicPageModule.forChild(BluetoothThingsPage) | ||
], | ||
providers: [ | ||
BluetoothSerial | ||
] | ||
}) | ||
export class BluetoothThingsPageModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
page-bluetooth-things { | ||
.led-actions{ | ||
button{ | ||
margin-top: 40%; | ||
} | ||
} | ||
} |
Oops, something went wrong.