Cordova IOT Lesson003
bot
index.html
<!DOCTYPE html>
<html>
<head>
<title>Arduino蓝牙机械昆虫控制器</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
</head>
<body>
<div data-role="page" id="controller" data-theme="b">
<div data-role="header">
<h1>机械昆虫控制器</h1>
</div><!-- /header -->
<div data-role="content" class="ui-content">
<div id="btPanel">
<ul data-role="listview" id="btList">
<li data-role="list-divider">蓝牙设备</li>
</ul>
<div style="margin: 10px">
<a href="#" id="refreshBtn" data-role="button" data-inline="true" data-icon="refresh">刷新</a>
</div>
</div>
<div id="botPanel">
<a href="#" id="forwardBtn" class="ui-btn ui-corner-all ui-icon-arrow-u ui-btn-icon-top ui-shadow-icon">前进</a>
<div class="ui-grid-b">
<div class="ui-block-b"><a href="#" id="leftBtn" class="ui-btn ui-corner-all ui-icon-arrow-l ui-btn-icon-top ui-shadow-icon">左转</a></div>
<div class="ui-block-b"><a href="#" id="stopBtn" class="ui-btn ui-corner-all ui-icon-delete ui-btn-icon-top ui-shadow-icon">停止</a></div>
<div class="ui-block-b"><a href="#" id="rightBtn" class="ui-btn ui-corner-all ui-icon-arrow-r ui-btn-icon-top ui-shadow-icon">右转</a></div>
</div>
<a href="#" id="backBtn" class="ui-btn ui-corner-all ui-icon-arrow-d ui-btn-icon-top ui-shadow-icon">后退</a>
<p>
<a href="#" id="disconnectBtn" data-role="button" data-inline="true" data-icon="delete">中断蓝牙连接</a>
</p>
</div>
<div id="msg"></div>
</div><!-- /content -->
<div data-role="footer" data-position="fixed">
© 2015 swf.com.tw
</div>
</div>
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="cordova.js"></script>
<script src="js/index.js"></script>
<script type="text/javascript">
app.init();
</script>
</body>
</html>
index.js
var app = {
init: function() {
$(document).on('deviceready', app.onDeviceReady);
$('#botPanel').hide();
},
onDeviceReady: function() {
app.listBT();
$(document).on('tap', '.BTitem', function () {
var bt = $(this).attr('data-mac');
// 设置在msgDiv显示4秒钟文本
app.showMsg("与设备连接中…");
bluetoothSerial.connect(bt, app.onConnect, app.onDisconnect);
});
$('#refreshBtn').on('tap', function(e) {
e.preventDefault();
app.listBT();
});
$('#disconnectBtn').on('tap', function(e) {
e.preventDefault();
// // 设置在msgDiv显示4秒钟文本
app.showMsg("中断连接中…");
bluetoothSerial.disconnect(app.onDisconnect);
});
$('#forwardBtn').on('tap', function () {
bluetoothSerial.write('w');
app.showMsg("送出数据: w");
});
$('#leftBtn').on('tap', function () {
bluetoothSerial.write('a');
app.showMsg("送出数据: a");
});
$('#rightBtn').on('tap', function () {
bluetoothSerial.write('d');
app.showMsg("送出数据: d");
});
$('#stopBtn').on('tap', function () {
bluetoothSerial.write('s');
app.showMsg("送出数据: s");
});
$('#backBtn').on('tap', function () {
bluetoothSerial.write('x');
app.showMsg("送出数据: x");
});
},
onConnect: function() {
$('#btPanel').hide(200);
$('#botPanel').show(200);
app.showMsg("已连接");
},
onDisconnect: function() {
$('#btPanel').show(200);
$('#botPanel').hide(200);
app.showMsg("已断线");
},
timeoutId: 0,
showMsg: function(msg) {
if (app.timeoutId) {
clearTimeout(app.timeoutId);
}
$('#msg').text(msg);
app.timeoutId = setTimeout(function() { $('#msg').text(""); }, 4000);
},
listBT: function() {
// 设置在msgDiv显示4秒钟文本
app.showMsg("探寻蓝牙设备…");
bluetoothSerial.list(app.onListBT, function() {
app.showMsg("探寻蓝牙设备时出现问题…");
});
},
onListBT: function(devices) {
var listItem, mac;
$('#btList').html('<li data-role="list-divider">蓝牙设备</li>');
app.showMsg("");
devices.forEach(function(bt) {
if (bt.hasOwnProperty("address")) {
mac = bt.address;
} else {
mac = "出错了:" + JSON.stringify(bt);
}
// 标准设置标签属性的语法
listItem = $('<li class="BTitem"></li>')
.attr({ 'data-mac' : mac })
.html('<a href="#"><img src="img/bluetooth.png" class="ui-li-icon">'
+ bt.name + "<br/><i>" + mac + "</i></a>");
$('#btList').append(listItem);
$("#btList").listview("refresh");
});
if (devices.length === 0) {
app.showMsg("请先配对好蓝牙设备。");
} else {
app.showMsg("找到 " + devices.length + " 个蓝牙设备。");
}
}
};
LED
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset=UTF-8" />
<meta name = "format-detection" content = "telephone=no"/>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css">
<title>LED开关</title>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>LED开关</h1>
</div>
<div data-role="content">
<div id="btPanel">
<ul data-role="listview" id="btList">
<li data-role="list-divider">蓝牙设备</li>
</ul>
<div style="margin: 10px">
<a href="#" id="refreshBtn" data-role="button" data-inline="true" data-icon="refresh">刷新</a>
</div>
</div>
<div id="ledPanel">
<div class="ui-field-contain">
<label for="ledSW">LED开关:</label>
<select name="ledSW" id="ledSW" data-role="slider">
<option value="0">OFF</option>
<option value="1">ON</option>
</select>
</div>
<p>
<a href="#" id="disconnectBtn" data-role="button" data-inline="true" data-icon="delete">中断蓝牙连接</a>
</p>
</div>
<div id="msg">
</div>
</div>
</div>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="cordova.js"></script>
<script src="js/index.js"></script>
<script type="text/javascript">
app.init();
</script>
</body>
</html>
index.js
var app = {
init: function () {
$(document).on('deviceready', app.onDeviceReady);
$("#ledPanel").hide();
},
onDeviceReady: function () {
app.listBT();
//$(document).on('click','要选择的元素',function(){}) 可动态
$(document).on('tap', '.BTitem', function () {
var bt = $(this).attr('data-mac'); //list中的 bt.address;
// 设置在msgDiv显示4秒钟文本
app.showMsg('与设备连接中。。')
//bluetoothSerial.connect(macAddress_or_uuid, connectSuccess, connectFailure);
//connectSuccess 成功时调用函数
//connectFailure 失败时调用函数
bluetoothSerial.connect(bt, app.onConnect, app.onDisconnect);
});
//创建所有按钮的事件处理函数
//链接蓝牙设备
//[刷新]按钮
$('refreshBtn').on('tap', function (e) {
e.preventDefault();//阻止元素发生默认的(冒泡等)行为
app.listBT();
});
//[中断连接]按钮
$('#disconnectBtn').on('tap', function (e) {
e.preventDefault();
//设置在msgDiv显示4秒钟文本
app.showMsg('中断连接中');
bluetoothSerial.disconnect(app.onDisconnect);
});
//[LED开关]
$('#ledSW').on('change', function () {
console.log("123") //添加console控件 就可以调试了
var data = $(this).val();
bluetoothSerial.write(data);
app.showMsg("送出数据:" + data);
})
},
onConnect: function () {
$('#btPanel').hide();//已经选中所以 隐藏蓝牙面板
$('#ledPanel').show();
app.showMsg("已连接")
},
onDisconnect: function () {
$('#btPanel').show();
$('#ledPanel').hide();
app.showMsg("已断开");
},
timeoutId: 0,
showMsg: function (msg) {
//如果有timeoutId的话 取消定时器
if (app.timeoutId) {
clearTimeout(app.timeoutId);
}
$('#msg').text(msg);
//timeoutId 就是变量 因为 setTimeout返回一个 ID(数字)
//设置 4秒以后自动清空
app.timeoutId = setTimeout(function () {
$("#msg").text("");
}, 4000);
},
listBT: function () {
//设置msgDiv显示4秒钟文本
app.showMsg("探寻蓝牙设备。。。");
bluetoothSerial.list(app.onListBT, function () {
app.showMsg("探寻蓝牙设备出现了问题。。");
});
},//后面都有逗号
onListBT: function (devices) {
var listItem, mac;
$("#btList").html('<li data-role="list-divider">蓝牙设备</li>');
app.showMsg("");
devices.forEach(function (bt) {
/*
Java 源代码是这样的形式 返回Json数据
private JSONObject deviceToJSON(BluetoothDevice device) throws JSONException {
JSONObject json = new JSONObject();
json.put("name", device.getName());
json.put("address", device.getAddress());
json.put("id", device.getAddress());
if (device.getBluetoothClass() != null) {
json.put("class", device.getBluetoothClass().getDeviceClass());
}
return json;
}
hasOwnProperty 是查看属性
*/
if (bt.hasOwnProperty("address")) {
mac = bt.address;
} else {
mac = "出错了:" + JSON.stringify(bt);//JavaScript 值转换为 JSON 字符串
}
//标准设置标签属性的语法 attr() 方法设置或返回被选元素的属性和值。.html()设置或返回被选元素的内容
listItem = $('<li class="BTitem"></li>')
.attr({ 'data-mac': mac })
.html('<a href="#"><img src="img/blutooth.png" class="ui-li-icon">'
+ bt.name + "<br/><i>" + mac + "</i></a>");
$('#btList').append(listItem);//list 元素结尾插入内容
});
$('#btList').listview("refresh");//添加到里面也可以
if (devices.length === 0) {
app.showMsg("请先配对好蓝牙设备");
} else {
app.showMsg("找到" + devices.length + "个蓝牙设备");
}
}
}
motion
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name = "format-detection" content = "telephone=no"/>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css">
<title>加速度传感器</title>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>加速度传感器</h1>
</div>
<div data-role="content">
<div id="btPanel">
<ul data-role="listview" id="btList">
<li data-role="list-divider">蓝牙设备</li>
</ul>
<div style="margin: 10px">
<a href="#" id="refreshBtn" data-role="button" data-inline="true" data-icon="refresh">刷新</a>
</div>
</div>
<div id="motionPanel">
<div class="ui-field-contain">
<label for="accSW">侦测加速度:</label>
<select name="accSW" id="accSW" data-role="slider">
<option value="0">OFF</option>
<option value="1">ON</option>
</select>
</div>
<div id="accData"></div>
</div>
<div id="msg">
</div>
</div>
</div>
<script src="cordova.js"></script>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="js/index.js"></script>
</body>
</html>
index.js
var app = {
watchID:0,
timeoutId: 0,
init: function() {
$(document).on('deviceready', app.onDeviceReady);
$('#motionPanel').hide();
},
onDeviceReady: function() {
app.listBT();
$(document).on('tap', '.BTitem', function () {
var bt = $(this).attr('data-mac');
app.showMsg("与设备连接中…");
bluetoothSerial.connect(bt, app.onConnect, app.onDisconnect);
});
$('#refreshBtn').on('tap', function(e) {
e.preventDefault();
app.listBT();
});
$('#disconnectBtn').on('tap', function(e) {
e.preventDefault();
app.showMsg("中断连接中…");
bluetoothSerial.disconnect(app.onDisconnect);
});
$('#accSW').on('change', function () {
var data = $(this).val();
var motionOpt = {frequency:100};
if (data == '1') {
app.watchID = navigator.accelerometer.watchAcceleration(app.onMotionSuccess,
app.onMotionError,
motionOpt);
} else {
navigator.accelerometer.clearWatch(app.watchID);
}
});
},
onMotionSuccess: function(acc) {
var servo = {
x:Math.floor((acc.x + 10) * 9),
y:Math.floor((acc.y + 10) * 9)
};
var str = 'X: ' + acc.x + '<br>' +
'Y: ' + acc.y + '<br>' +
'Z: ' + acc.z + '<br>' +
'时间: ' + acc.timestamp + '<br><br>' +
'转换值:<br>' +
'Servo X: ' + servo.x + '<br>' +
'Servo Y: ' + servo.y;
$('#accData').html(str);
bluetoothSerial.write(servo.x + ',' + servo.y + '\n');
},
onMotionError: function() {
app.showMsg("无法读取加速度值…");
},
onConnect: function() {
$('#btPanel').hide(200);
$('#motionPanel').show(200);
app.showMsg("已连接");
},
onDisconnect: function() {
$('#btPanel').show(200);
$('#motionPanel').hide(200);
app.showMsg("已断线");
},
showMsg: function(msg) {
if (app.timeoutId) {
clearTimeout(app.timeoutId);
}
$('#msg').text(msg);
app.timeoutId = setTimeout(function() { $('#msg').text(""); }, 4000);
},
listBT: function() {
// 设置在msgDiv显示4秒钟文本
app.showMsg("探寻蓝牙设备…");
bluetoothSerial.list(app.onListBT, function() {
app.showMsg("探寻蓝牙设备时出现问题…");
});
},
onListBT: function(devices) {
var listItem, mac;
$('#btList').html('<li data-role="list-divider">蓝牙设备</li>');
app.showMsg("");
devices.forEach(function(bt) {
if (bt.hasOwnProperty("address")) {
mac = bt.address;
} else {
mac = "出错了:" + JSON.stringify(bt);
}
// 标准设置标签属性的语法
listItem = $('<li class="BTitem"></li>')
.attr({ 'data-mac' : mac })
.html('<a href="#"><img src="img/bluetooth.png" class="ui-li-icon">'
+ bt.name + "<br/><i>" + mac + "</i></a>");
$('#btList').append(listItem);
});
$("#btList").listview("refresh");
if (devices.length === 0) {
app.showMsg("请先配对好蓝牙设备。");
} else {
app.showMsg("找到 " + devices.length + " 个蓝牙设备。");
}
}
};
app.init();
USBSerial
index.html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name = "format-detection" content = "telephone=no"/>
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css">
<title>串口LED开关</title>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>串口LED开关</h1>
</div>
<div data-role="content">
<div id="serialPanel">
<a href="#" id="openBtn" data-role="button" data-inline="true" data-icon="check">开启串口</a>
</div>
<div id="ledPanel">
<div class="ui-field-contain">
<label for="ledSW">LED开关:</label>
<select name="ledSW" id="ledSW" data-role="slider">
<option value="0">OFF</option>
<option value="1">ON</option>
</select>
</div>
<p>模拟值:<span id="A0"></span></p>
<p>
<a href="#" id="closeBtn" data-role="button" data-inline="true" data-icon="delete">关闭串口</a>
</p>
</div>
<div id="msg">
</div>
</div>
</div>
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="cordova.js"></script>
<script src="js/index.js"></script>
<script type="text/javascript">
app.init();
</script>
</body>
</html>
index.js
var app = {
init: function() {
$(document).on('deviceready', app.onDeviceReady);
$('#ledPanel').hide();
},
onDeviceReady: function() {
$('#openBtn').on('tap', function(e) {
e.preventDefault();
// 开启串口
serial.requestPermission(
function(msg) {
serial.open(
{baudRate: 9600},
// 开启串口成功
app.onOpen,
// 无法开启串口
app.showMsg("无法开启串行端口:" + msg)
);
},
app.showMsg("无法开启串行端口:" + msg)
);
});
$('#closeBtn').on('tap', function(e) {
e.preventDefault();
serial.close(app.onClose, app.showMsg("无法关闭串口:" + msg));
});
// throttle changes
$('#ledSW').on('change', function () {
var data = $(this).val();
serial.write(
data,
function(msg) {
app.showMsg(msg);
},
app.showMsg("数据传输错误: " + msg)
);
});
},
onOpen: function(msg) {
$('#serialPanel').hide(200);
$('#ledPanel').show(200);
var str = '';
serial.registerReadCallback(
function (data){
// 处理输入数据
var raw = new Uint8Array(data);
var total = raw.length; // 保存数组长度
for(var i=0; i < total; i++) {
if(raw[i] != 10) { // 若非 '\n' 字符编码……
var temp_str = String.fromCharCode(raw[i]);
str += temp_str;
} else {
$('#A0').text(str);
str = '';
}
}
},
app.showMsg(msg)
);
},
onClose: function(msg) {
$('#serialPanel').show(200);
$('#ledPanel').hide(200);
app.showMsg(msg);
},
timeoutId: 0,
showMsg: function(msg) {
if (app.timeoutId) {
clearTimeout(app.timeoutId);
}
$('#msg').text(msg);
app.timeoutId = setTimeout(function() { $('#msg').text(""); }, 4000);
}
};
wifiBot
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>灯光控制器</title>
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
<script src="cordova.js"></script>
<script src="js/jquery-2.1.3.min.js"></script>
<script>
$(document).on('mobileinit', function() {
$.mobile.pushStateEnabled = false;
});
</script>
<script src="js/jquery.mobile-1.4.5.min.js"></script>
<script src="js/index.js"></script>
<style type="text/css">
#splashPage {
background-color:#fac800;
text-align: center;
}
#splashPage div h1 {
border-radius: 10px;
padding:10px 30px;
display:inline-block;
background-color:#fff;
margin-bottom:30px;
}
</style>
</head>
<body>
<!-- 起始画面 -->
<div data-role="page" id="splashPage">
<div role="main" class="ui-content">
<h1>网络灯光控制器</h1>
<img src="data:images/app_logo.svg" width="300" height="300">
</div>
</div>
<!-- 主控画面 --->
<div data-role="page" id="ctrlPage" data-theme="a">
<div data-role="header">
<h1>灯光控制器</h1>
<a href="#netPage" class="ui-btn-right ui-btn ui-btn-inline ui-mini ui-corner-all ui-btn-icon-right ui-icon-gear">网络设置</a>
</div>
<div role="main" class="ui-content">
<div class="ui-field-contain">
<label for="ledSw">壁灯</label>
<select name="ledSw" id="ledSw" data-role="slider" data-mini="true">
<option value="0">关</option>
<option value="1">开</option>
</select>
</div>
<div class="ui-field-contain">
<label for="pwmSlider">台灯</label>
<input type="range" name="pwmSlider" id="pwmSlider" value="25" min="0" max="100" data-highlight="true">
</div>
<div id="msg"></div>
</div>
<div data-role="footer" data-position="fixed">
© 2016 swf.com.tw
</div>
</div>
<!-- "WiFi设置画面" -->
<div data-role="page" id="netPage" data-theme="a">
<div data-role="header">
<h1>网络链接设置</h1>
</div>
<div role="main" class="ui-content">
<form>
<label for="deviceIP">设备IP地址或网域名称</label>
<input type="text" name="deviceIP" id="deviceIP" value="" placeholder="jarvis.local" data-clear-btn="true">
<label for="devicePort">设备端口号</label>
<input type="number" name="devicePort" id="devicePort" value="80" data-clear-btn="true">
</form>
<p><a href="#" id="saveBtn" class="ui-btn ui-corner-all ui-btn-b ui-btn-icon-left ui-icon-refresh ui-shadow-icon">保存设置</a></p>
<p><a href="#ctrlPage" class="ui-btn ui-shadow ui-corner-all ui-btn-b">回主控画面</a></p>
</div>
<div data-role="footer" data-position="fixed">
© 2016 swf.com.tw
</div>
</div>
</body>
</html>
index.js
var app = {
nextPage:"",
host:"",
port:80,
splashTime:3000,
init: function() {
$(document).on('deviceready', app.onDeviceReady);
},
onDeviceReady: function() {
$("#ledSw").on("change", function(e){
var val = $(this).val();
var swData = {"pin":13, "sw":val};
// 向第13脚送出开关信号
$.ajax({
url: "http://" + app.host + ":" + app.port + "/sw",
data: swData,
success: function( d ) {
app.showMsg("收到服务器回应:" + d );
}
});
});
$('#saveBtn').on('tap', function(){
app.host = $("#deviceIP").val();
app.port = $("#devicePort").val();
localStorage.setItem('deviceIP', app.host);
localStorage.setItem('devicePort', app.port);
location.hash = 'ctrlPage';
});
},
timeoutId: 0,
showMsg: function(msg) {
if (app.timeoutId) {
clearTimeout(app.timeoutId);
}
$('#msg').text(msg);
app.timeoutId = setTimeout(function() { $('#msg').text(""); }, 4000);
},
splashTimer : function(){
setTimeout(function() {
// 进入下一页
location.hash = app.nextPage;
}, app.splashTime);
}
};
$(document).on("pageshow", "#ctrlPage", pageEvt);
function pageEvt (e) {
$( "#pwmSlider" ).on( "slidestop", function( e ) {
var pwm = Math.ceil($(this).val() * 2.55);
var pwmData = {"pin":9, "pwm":pwm};
// 向第9脚送出PWM信号
$.ajax({
url: "http://" + app.host + ":" + app.port + "/pwm",
data: pwmData,
success: function( d ) {
app.showMsg("收到服务器回应:" + d );
}
});
});
$(document).off("pageshow", "#ctrlPage", pageEvt);
}
$(document).on("pageshow", "#splashPage", function( e ) {
var host = localStorage.getItem('deviceIP');
if (host === null) {
app.nextPage = "netPage";
} else {
app.host = host;
app.port = localStorage.getItem('devicePort');
$("#deviceIP").val(app.host);
$("#devicePort").val(app.port);
app.nextPage = "ctrlPage";
}
// 启动计时器
app.splashTimer();
});
$(document).on('backbutton', function (e) {
var page = $('body').pagecontainer('getActivePage')[0].id;
if (page == 'ctrlPage'){
e.preventDefault();
navigator.notification.confirm( '啥?你要离开了?',
function (btn) {
if (btn == 1){
return false;
} else{
navigator.app.exitApp();
}
},
'关闭App', '取消,离开'
);
} else {
navigator.app.backHistory();
}
});
$(document).ajaxError(function(){
app.showMsg("连接出错了!");
navigator.notification.vibrate(1000);
});
app.init();
Cordova IOT Lesson003的更多相关文章
- Cordova IOT Lesson002
hello index.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"& ...
- H5程序员如何利用cordova开发跨平台应用
什么是Cordova? Cordova以前也叫PhoneGap,它提供了一组设备相关的API,通过这组API,移动应用能够以JavaScript访问原生的设备功能,如摄像头.麦克风等.Cordova还 ...
- Apache Cordova开发Android应用程序——番外篇
很多天之前就安装了visual studio community 2015,今天闲着么事想试一下Apache Cordova,用它来开发跨平台App.在这之前需要配置N多东西,这里找到了一篇MS官方文 ...
- Win10 UWP开发系列:使用VS2015 Update2+ionic开发第一个Cordova App
安装VS2015 Update2的过程是非常曲折的.还好经过不懈的努力,终于折腾成功了. 如果开发Cordova项目的话,推荐大家用一下ionic这个框架,效果还不错.对于Cordova.PhoneG ...
- VS2015 Update2中有关cordova和xamarin安装的问题
最近VS2015出了Update2,当然是第一时间进行了安装,中间过程曲折,反复安装卸载n次,也算是获得了一定的安装经验值.现在说一下经常出的问题. Update2里最吸引人的当然是跨平台开发的部分, ...
- 《连载 | 物联网框架ServerSuperIO教程》-4.如开发一套设备驱动,同时支持串口和网络通讯。附:将来支持Windows 10 IOT
1.C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 <连载 | 物联网框架ServerSuperIO教程>1.4种通讯模式机制. <连载 | 物联网框架Serve ...
- 开源物联网框架ServerSuperIO 3.0正式发布(C#),跨平台:Win&Win10 Iot&Ubuntu&Ubuntu Mate,一套设备驱动跨平台挂载,附:开发套件和教程。
3.0版本主要更新内容: 1.增加跨平台能力:Win&Win10 Iot&Ubuntu&Ubuntu Mate 2.统一设备驱动接口:可以一套设备驱动,跨平台挂载运行,降低人力 ...
- 开源物联网通讯框架ServerSuperIO,成功移植到Windows10 IOT,在物联网和集成系统建设中降低成本。附:“物联网”交流大纲
[开源]C#跨平台物联网通讯框架ServerSuperIO(SSIO)介绍 一.概述 经过一个多月晚上的时间,终于把开源物联网通讯框架ServerSuperIO成功移植到Windows10 IOT上, ...
- 玩儿转物联网IoT - 在Beagle Bone Black上运行node.js 程序
物联网(IoT)技术方兴未艾,智能手环,智能血压计,智能眼镜甚至智能鞋垫都开始进入我们的生活,各种智能设备层出不穷,世界已经到了一个"人有多大胆,地有多大产"的时代,不玩儿点物联网 ...
随机推荐
- python学习日记(OOP访问限制)
在Class内部,可以有属性和方法,而外部代码可以通过直接调用实例变量的方法来操作数据,这样,就隐藏了内部的复杂逻辑. 但是,从前面Student类的定义来看,外部代码还是可以自由地修改一个实例的na ...
- 关于vue的域名重定向和404
//创建路由对象并配置路由规则 let router = new VueRouter({ routes:[ {path:'/',redirect:{name:"index"}}, ...
- Mycat的读写分离
1. Mycat实现读写分离的部署: https://www.cnblogs.com/softidea/p/5447566.html springboot动态数据源的原理以及配置: Spring内置了 ...
- Hadoop记录-hadoop jmx配置
1.hadoop-env.sh添加export HADOOP_JMX_OPTS="-Dcom.sun.management.jmxremote.authenticate=false -Dco ...
- Linux运维(首页)
系统学习,以此见证学习历程 Linux运维基础 安装vmware+centos Linux基础 Linux的一些问题 Ubuntu遇到的bug linux_网易云音乐安装 linux_添加图标 遇到的 ...
- oldboy s21day09
#!/usr/bin/env python# -*- coding:utf-8 -*- # 1.将函数部分知识点,整理到自己笔记中.(搞明白课上讲的案例.) # 2.写函数,检查获取传入列表或元组对象 ...
- Contest2154 - 2019-2-28 高一noip基础知识点 测试1 题解版
传送门 预计得分:100+100+100+100=400 实际得分:55+100+60+80=295 细节决定成败啊!!! T1 这道题思路很简单,就是一些细节很变态坑人 首先,数据不一定是有序的,虽 ...
- 第十三章 部署Java应用程序
打包 清单文件被命名为MANIFEST.MF,用于描述归档特征. 清单文件被分为多个节, 第一节被称为主节,作用于整个文件; 其他节则必须起始于Name的条目. 节之间空行分开. jar cfm JA ...
- C++ 变长模板参数
转载自: http://www.cnblogs.com/liyiwen/archive/2013/04/13/3018608.html C++11 语言核心的改进中,最为关注的有 rvalue ref ...
- cartographer 点云同步处理
1.点云同步处理的类 RangeDataCollator class RangeDataCollator { public: explicit RangeDataCollator( const st ...