韓冬
摘要:隨著科技的不斷發展,手機幾乎成為必不可少的東西。基于App Inventor 2平臺開發了一款適用于Android系統的普通藍牙遙控車APP,可利用藍牙通信,通過智能手機虛擬按鍵進行控制遙控車的移動,更加的便捷。
關鍵詞:Android 系統;APP設計;藍牙通信;遙控車
中圖分類號:TP311 文獻標識碼:A 文章編號:1009-3044(2018)20-0060-02
APP Design of Common Bluetooth Remote Control Car Based on APP Inventor2
HAN Dong
(Wuxi Institute of Technology, Internet of things Technology College, Wuxi 214121, China)
Abstract: With the continuous development of science and technology, mobile phones are almost indispensable. Based on App Inventor 2 platform, a common Bluetooth remote control car APP, which is suitable for Android system, has been developed. It can make use of Bluetooth communication to control the movement of remote control vehicle by smart phone keypad, which is more convenient.
Key words: Android system; APP design; Bluetooth communication; remote control car
1 背景
現今科技的不斷發展,實物的簡便操縱性與便捷攜帶性也顯得尤為重要,特別是遙控車類的東西,現在還需要遙控器這種略顯笨重的東西,這種遙控器還需要大量電池進行供電,比較浪費電池,不利于保護環境。而今智能手機已廣泛普及,因此可設計一款手機APP進行操縱實物,方便快捷,減少了電池的使用,利于環境的保護。下面以普通藍牙遙控車APP設計為例。
2 基于APP Inventor2的普通藍牙遙控車APP設計
該文基于App Inventor2平臺開發適用于Android系統的普通藍牙遙控車APP,其主要模塊有:藍牙通信和數據發送模塊、搖桿模塊、控制方向模塊。該APP可搜索周圍藍牙模塊,并通過Andriod手機的藍牙通信接口給小車藍牙模塊發送指令,令其運動。
2.1 APP Inventor2開發環境搭建
Google公司推出的Android智能手機平臺系統,以其開源、開放和優異便捷的開發架構,吸引了眾多程序開發者[1]。使用APP Inventor2進行開發,不一定非是專業的程序員,甚至并不需要掌握任何編程知識,它采用類似堆積木的方式對各個步驟進行疊加,無需寫程序代碼,為用戶提供了便捷的方式。
2.2 APP頁面設計
APP頁面的設計更人性化,會增加用戶對它的喜愛,用戶可根據自己的喜好,進行頁面的排版布局。……