成功实现手机蓝牙控制智能小车机器人视频程序源代码Android
上次成功实现了通过笔记本电脑蓝牙来控制智能小车机器人的运动,但是通过电脑控制毕竟不方便,于是乎~本人打算将控制程序移植到手机上。
目前主流的手机操作系统有塞班、安卓(Android)、Windows Mobile,对比了一下,首先,塞班是用C++写的,这么多门语言我唯独看到C++就头大···,放弃了···,Windows Moblie其实和之前发的电脑端程序基本是一样的,也就没什么意思了,最后决定选择目前正火的Android手机作为控制平台。
Android是个开源的应用,使用Java语言对其编程。于是这次的开发我选用Eclipse作为开发工具,用Java语言开发手机端的控制程序,由于之前对Android的蓝牙通信这块涉及不多,一开始感觉有点小茫然,而网上也少有这方面的例程,有少数人做出了类似的东西,但是只传了个视频装X!雪特····
经过几天的研究,最终确定了手机蓝牙通信其实就是Socket编程,再经过一番编写和调试,昨晚终于大功告成!
这是视频:
下面开始介绍Android手机端控制程序的编写:
首先打开Eclipse,当然之前的Java开发环境和安卓开发工具自己得先配置好,这里就不多说了,网上教程一大摞。
然后新建一个Android项目,修改布局文件main.xml,代码如下:
android:id="@+id/widget0" android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="https://www.360docs.net/doc/8612580217.html,/apk/res/android" >
这个布局文件的效果就是如视频中所示的手机操作界面。
然后是权限声明,这一步不能少,否则将无法使用安卓手机的蓝牙功能。
权限声明如下:
打开AndroidManifest.xml文件,修改代码如下:
package="com.ThinBTClient.www" android:versionCode="1" android:versionName="1.0"> android:label="@string/app_name">
其中红色、加粗部分就是要添加的权限声明。
然后编写Activity中的执行代码,这些代码的作用就是发送指令,控制小车的运动。代码如下:
package com.ThinBTClient.www;
import android.app.Activity;
import android.os.Bundle;
import java.io.IOException;
import java.io.OutputStream;
import java.util.UUID;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import https://www.360docs.net/doc/8612580217.html,monDataKinds.Event;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class ThinBTClient extends Activity {
private static final String TAG = "THINBTCLIENT";
private static final boolean D = true;
private BluetoothAdapter mBluetoothAdapter = null;
private BluetoothSocket btSocket = null;
private OutputStream outStream = null;
Button mButtonF;
Button mButtonB;
Button mButtonL;
Button mButtonR;
Button mButtonS;
private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
private static String address = "00:11:03:21:00:43"; // <==要连接的蓝牙设备MAC 地址
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(https://www.360docs.net/doc/8612580217.html,yout.main);
//前进
mButtonF=(Button)findViewById(R.id.btnF);
mButtonF.setOnTouchListener(new Button.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
String message;
byte[] msgBuffer;
int action = event.getAction();
switch(action)
{
case MotionEvent.ACTION_DOWN:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "1";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
case MotionEvent.ACTION_UP:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "0";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
}
return false;
}
});
//后退
mButtonB=(Button)findViewById(R.id.btnB);
mButtonB.setOnTouchListener(new Button.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
String message;
byte[] msgBuffer;
int action = event.getAction();
switch(action)
{
case MotionEvent.ACTION_DOWN:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "3";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
case MotionEvent.ACTION_UP:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "0";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
}
return false;
}
});
//左转
mButtonL=(Button)findViewById(R.id.btnL);
mButtonL.setOnTouchListener(new Button.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
String message;
byte[] msgBuffer;
int action = event.getAction();
switch(action)
{
case MotionEvent.ACTION_DOWN:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "2";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
case MotionEvent.ACTION_UP:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "0";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
}
return false;
}
});
//右转
mButtonR=(Button)findViewById(R.id.btnR);
mButtonR.setOnTouchListener(new Button.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
String message;
byte[] msgBuffer;
int action = event.getAction();
switch(action)
{
case MotionEvent.ACTION_DOWN:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.",
}
message = "4";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
case MotionEvent.ACTION_UP:
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
message = "0";
msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
break;
}
return false;
}
});
//停止
mButtonS=(Button)findViewById(R.id.btnS);
mButtonS.setOnTouchListener(new Button.OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
if(event.getAction()==MotionEvent.ACTION_DOWN)
try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
String message = "0";
byte[] msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
return false;
}
});
if (D)
Log.e(TAG, "+++ ON CREATE +++");
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
Toast.makeText(this, "Bluetooth is not available.", Toast.LENGTH_LONG).show();
finish();
return;
}
if (!mBluetoothAdapter.isEnabled()) {
Toast.makeText(this, "Please enable your Bluetooth and re-run this program.", Toast.LENGTH_LONG).show();
finish();
return;
}
if (D)
Log.e(TAG, "+++ DONE IN ON CREATE, GOT LOCAL BT ADAPTER +++");
}
@Override
public void onStart() {
super.onStart();
if (D) Log.e(TAG, "++ ON START ++");
}
@Override
public void onResume() {
super.onResume();
if (D) {
Log.e(TAG, "+ ON RESUME +");
Log.e(TAG, "+ ABOUT TO ATTEMPT CLIENT CONNECT +");
}
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
try {
btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Socket creation failed.", e);
}
mBluetoothAdapter.cancelDiscovery();
try {
btSocket.connect();
Log.e(TAG, "ON RESUME: BT connection established, data transfer link open.");
} catch (IOException e) {
try {
btSocket.close();
} catch (IOException e2) {
Log .e(TAG,"ON RESUME: Unable to close socket during connection failure", e2);
}
}
// Create a data stream so we can talk to server.
if (D)
Log.e(TAG, "+ ABOUT TO SAY SOMETHING TO SERVER +");
/* try {
outStream = btSocket.getOutputStream();
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Output stream creation failed.", e);
}
String message = "1";
byte[] msgBuffer = message.getBytes();
try {
outStream.write(msgBuffer);
} catch (IOException e) {
Log.e(TAG, "ON RESUME: Exception during write.", e);
}
*/
}
@Override
public void onPause() {
super.onPause();
if (D)
Log.e(TAG, "- ON PAUSE -");
if (outStream != null) {
try {
outStream.flush();
} catch (IOException e) {
Log.e(TAG, "ON PAUSE: Couldn't flush output stream.", e);
}
}
try {
btSocket.close();
} catch (IOException e2) {
Log.e(TAG, "ON PAUSE: Unable to close socket.", e2);
}
}
@Override
public void onStop() {
super.onStop();
if (D)Log.e(TAG, "-- ON STOP --");
}
@Override
public void onDestroy() {
super.onDestroy();
if (D) Log.e(TAG, "--- ON DESTROY ---");
}
}
可以看到,在这个程序中我直接把小车蓝牙模块的MAC地址给写进去了,其实更合理一点应该让程序运行后搜索周围蓝牙设备,然后选择需要连接的设备,获取它的MAC地址再连接,但是我为了图省事,就直接把我的小车的蓝牙MAC给定死了(反正也没那么多小车让我遥控~~~),这样一打开程序,手机将自动连接智能小车。
好了,手机端的开发到此介绍完毕~希望能为需要者提供一点帮助。
下一步是打算增加红外避障功能、超声波测距功能,机械手臂,如果有机会,以后再安装上火控系统发射钻天猴~,不过估计时间不太允许了······
最后在此感谢侯金龙童鞋提供了他心爱的Android手机~
基于stm32f4的蓝牙控制小车
ARM-STM32校园创新大赛 项目报告 题目:基于stm32f4的蓝牙控制小车 学校:中南民族大学 指导教师: 视频观看地址:https://www.360docs.net/doc/8612580217.html,/v_show/id_XNjA3NTE4MzU2.html
题目:基于stm32f4的蓝牙控制小车 关键词:STM32F4 LM2940-5.0 L298N FBT06_LPDB 蓝牙串口通信android 摘要 “基于stm32f4的蓝牙控制小车”是一个基于意法半导体与ARM公司生产的STM32F4 DISCOVERY开发板的集电机驱动模块、电源管理模块、stm32f4主控模块、蓝牙串口通信模块、android控制端模块。电机驱动模块使用了两个L298N 芯片来驱动4路电机,使能端连接4路来自主控板的PWM波信号,8个输入端接主控板的8个输出端口;电源管理模块使用了LM2940-5.0芯片进行12V到5V 的转换,12V用于电机模块的供电,5V用于蓝牙模块、传感器等的供电;主控模块采用了MDK编辑程序,然后下载到主控板,实现硬件与软件的交互;蓝牙串口通信模块则是采用了FBT06_LPDB针插蓝牙模块,与主控板进行串口通信,同时与android手机进行通信;android控制端模块是一个集开启蓝牙、搜索蓝牙、控制小车等功能。用户可以通过android控制端进行控制小车的运动,实现一些用户需要的功能和服务。 1.引言 蓝牙的创始人是瑞典爱立信公司,蓝牙技术是一种无限数据与语音通信的开放性全球规范,它以低成本的近距离无线连接为基础,为固定与移动设备通信环境建立一个特别连接。手机之间通过蓝牙实现数据共享成为常理,将手机变为遥控器为人们的生活带来无限方便。遥控小车在工业、国防、科研等领域应用越来越广泛,例如说:消防遥控小车、探测小车等。本文详细阐述了使用蓝牙通信的手机遥控小车前行、倒退、左转、右转和停止等功能的软硬件设计过程。 2.系统方案 该系统分为电机驱动模块、电源管理模块、主控板、蓝牙通信模块、android 控制端等5个模块,如图2.1所示:
蓝牙串口通信遥控小车
蓝牙串口通信遥控小车
————————————————————————————————作者:————————————————————————————————日期:
蓝牙串口通信遥控小车 目录 1系统方案论证及方案选择 2本系统软硬件设计 2.1单元硬件电路设计 2.2软件部分设计 参考文献 附录1原器件清单 附录2电路原理图及印制板图 附录3程序 1. 系统方案论证及方案选择 1.总体设计方案 题目要求设计一个蓝牙串口遥控小车,通过对电机转速的控制,调节速度的大小,改变小车角度,并能实现转弯和旋转。设计主要由主控单片机STC 12C5A60S2驱动直流电机,使车轮工作,带动小车的转动。
2.基本工作原理
3.STC89C52RC有定时器T0 T1 T2,在自动控制领域经常把T1作为串口通信了T0作PWM调速用因此有必要把T2定时器拿出来作定时器作为声音频谱程序。下面介绍T2的用法 STC89C52RC有定时器T2 ?void main(void) ?{ ?/* T2定时器赋预装载值,溢出16次就是1秒。*/ ?RCAP2H=(65536-5000)/256; ?RCAP2L=(65536-5000)%256; ?ET2=1; //允许T2定时器中断 ?EA=1; //打开总中断 ?TR2=1; //启动T2定时器
?while(1); // 死循环,等待T2定时器的溢出中断 ?} ?void Timer2_Server(void) interrupt5 ?{ ?staticuint Timer2_Server_Count; ?// 定义静态变量,用来计数T2定时器的溢出次数(进入本函数的次数) ?TF2=0; ?// T2定时器发生溢出中断时,需要用户自己清除溢出标记,而51的其他定时器是自动清除的 ?Timer2_Server_Count++; ?if(Timer2_Server_Count==16)// T2定时器的预装载值为0x0BDC,溢出16次就是1秒钟。 ?{ ?Timer2_Server_Count=0; ?P1_7=~P1_7; // LED11反转显示。 ?} ?} ?voidTimer2_Server(void)interrupt5
成功实现手机蓝牙控制智能小车机器人!视频+程序源代码(Android)
上次成功实现了通过笔记本电脑蓝牙来控制智能小车机器人的运动,但是通过电脑控制毕竟不方便,于是乎~本人打算将控制程序移植到手机上。 目前主流的手机操作系统有塞班、安卓(Android)、Windows Mobile,对比了一下,首先,塞班是用C++写的,这么多门语言我唯独看到C++就头大···,放弃了···,Windows Moblie 其实和之前发的电脑端程序基本是一样的,也就没什么意思了,最后决定选择目前正火的Android手机作为控制平台。 Android是个开源的应用,使用Java语言对其编程。于是这次的开发我选用Eclipse作为开发工具,用Java语言开发手机端的控制程序,由于之前对Android的蓝牙通信这块涉及不多,一开始感觉有点小茫然,而网上也少有这方面的例程,有少数人做出了类似的东西,但是只传了个视频装X!雪特···· 经过几天的研究,最终确定了手机蓝牙通信其实就是Socket编程,再经过一番编写和调试,昨晚终于大功告成! 这是视频: 下面开始介绍Android手机端控制程序的编写: 首先打开Eclipse,当然之前的Java开发环境和安卓开发工具自己得先配置好,这里就不多说了,网上教程一大摞。 然后新建一个Android项目,修改布局文件main.xml,代码如下:
基于Android的蓝牙遥控小车设计
成绩评定表
课程设计任务书
阐述一种通过手机蓝牙遥控小车行走的软、硬件设计。手机蓝牙作为客户端,小车上的蓝牙模块HC-05作为服务端。客户端采用Eclipse 开发环境,J2ME编程,服务端采用单片机控制。双方通过串口仿真协议进行通信,单片机驱动直流电机控制小车行动。实验结果表明,小车可以接收手机遥控信号并灵活地进行前行、倒退、左转、右转和停止等功能。 关键词:89c52,hc-05,遥控小车,Andriod
目录 1引言 (1) 1.1课题设计目的及意义 (1) 1.1.1设计的目的 (1) 1.1.2设计的意义 (2) 2 方案比较与论证 (2) 2.1无线单元方案与比较 (2) 3 硬件电路设计 (4) 3.1 总体设计 (4) 3.2 单片机模块 (5) 3.2.1 STC89C52简介 (5) 3.2.2 L298N驱动模块及原理介绍 (6) 3.2.3 蓝牙模块 (7) 4 软件设计 (8) 4.1 智能车运动控制程序 (8) 4.2 Android蓝牙客户端设计与实现 (9) 4.2.1 客户端界面设计 (10)
4.2.2 BluetoothCar类设计 (10) 4.2.3 单片机C语言代码 (10) 5 实验结果及分析 (16) 6 心得体会 (17) 参考文献 (17)
1引言 1.1课题设计目的及意义 1.1.1设计的目的 遥控小车起源于美国,由于政府对无线遥控小车研发的资助以及相关资助的推动作用,日本、美国、德国等工业大国在遥控小车技术上占据着明显优势。我国的无线遥控小车研究工作始于20世纪中后期,在国家的863、973等技术发展计划的重点支持下,国内已大范围地进行无线遥控小车的研究。在研发应用方面取得了重要发展,但是与国际先进还存在一定的差距。无线遥控实现方法包括蓝牙、红外、射频几种,其中蓝牙技术具有一定优势。目前在信息家电方面应用正在铺。遥控小车起源于美国,由于政府对无线遥控小车研发的资助以及相关资助的推动作用,日本、美国、德国等工业大国在遥控小车技术上占据着明显优势。我国的无线遥控小车研究工作始于20世纪中后期,在国家的863、973等技术发展计划的重点支持下,国内已大范围地进行无线遥控小车的研究。在研发应用方面取得了重要发展,但是与国际先进还存在一定的差距。无线遥控实现方法包括蓝牙、红外、射频几种,其中蓝牙技术具有一定优势。目前在信息家电方面应用正在铺开。各种家电共用遥控,并可组网与公众互联网相接,共享有用信息。目前蓝牙技术实现无线遥控的短板在于传输距离短和芯片
基于蓝牙遥控的智能小车设计
基于蓝牙遥控的智能小车 设计 Last updated at 10:00 am on 25th December 2020
《嵌入式系统设计》项目设计报告题目:基于蓝牙技术的智能遥控小车的设计 专业:自动化 班级: 姓名:学号: 指导老师: 成绩: ( )
摘要 随着汽车工业的迅速发展,关于汽车的研究也就越来越受人关注。遥控小车起源于美国,由于政府对无线遥控小车研发的资助以及相关资助的推动作用,日本、美国、德国等工业大国在遥控小车技术上占据着明显优势。我国的无线遥控小车研究工作始于20世纪中后期,在国家的863、973等技术发展计划的重点支持下,国内已大范围地进行无线遥控小车的研究。全国电子大赛和省内电子大赛几乎每次都有智能小车这方面的题目,全国各高校也都很重视该题目的研究,但是与国际先进还存在一定的差距。可见其研究意义很大。本设计就是在这样的背景下提出的。设计的智能电动小车能够实现无线遥控,串口通讯,实时检测速度,避障碍等功能。无线遥控实现方法包括蓝牙、红外、射频几种,其中蓝牙技术具有一定优势,目前在信息家电方面应用正在铺设。各种家电共用遥控,并可组网与公众互联网相接,共享有用信息。目前蓝牙技术实现无线遥控的短板在于传输距离短和芯片价格高方面。但随着科技发展,这些问题正在逐步得以解决。无线遥控机器人有着广阔的应用前景。 无线遥控的小车,可以在危险的环境作业,人员搜索,可以在各类领域中发挥着它特殊的作用,本次设计是选择基于蓝牙遥控的多功能智能小车为对象。控制系统以C51单片机为主控芯片,采用L298N为电机驱动芯片、HC-06蓝牙无线模块、12864液晶显示模块、四路循迹模块等构成外围扩展电路。将自制的控制电路、控制程序和四轮小车机械相结合,制作多功能智能小车。实验调试实现了智能小车的蓝牙无线遥控、自动避障、自动测距及各种灯光的功能。 关键词:51单片机;蓝牙遥控;智能小车
基于安卓手机蓝牙控制的智能小车设计
编号: 审定成绩: 毕业设计(论文) 设计(论文)题目:基于安卓手机蓝牙控制的智能小车设计 学院名称:自动化 学生姓名: 专业:测控技术与仪器 班级: 学号: 指导教师: 答辩组负责人: 填表时间:2013 年 05 月 制
摘要 随着物联网的兴起,Android手机以其独有的开放性优势正在为我们提供更多优质便捷的技术成果。本课题研究的是基于安卓手机蓝牙控制的智能小车设计,基于手机平台,借助于蓝牙技术,设计和实现了一种无线遥控小车新的解决方案。设计以手机控制平台、蓝牙通讯模块、电机驱动模块等硬件模块组成的遥控小车。实现小车的前进、后退、前左转弯、前右转弯、后左转弯、后右转弯等实时控制功能。为遥控玩具小车的设计提出了一种新的思路,同时可以为将来智能家居的遥控设计提供一定的参考意义。 阐述一种通过手机蓝牙遥控小车行走的软、硬件设计。手机蓝牙作为客户端,小车上的蓝牙模块HC-06作为服务端。客户端采用Eclipse开发环境,JAVA编程,服务端采用单片机控制。双方通过串口进行通信,单片机驱动直流电机控制小车行动。实验结果表明,小车可以接收手机遥控信号并灵活地进行前行、倒退、左转、右转和停止等功能。 本文介绍了基于安卓手机的蓝牙智能小车控制要实现的功能,接着阐述该系统电路的设计及原理的说明,包括了方案的设计、重要元器件的介绍、电路设计的说明(包括单片机控制电路、电机驱动电路)安卓手机软件界面设计、软件设计流程以及系统的调试。最后总结了基于安卓的蓝牙智能小车控制设计完成的任务,分析系统出现的不足。 【关键词】Andriod蓝牙智能小车智能手机AT89C52单片机
ABSTRACT With the rise of the Internet of Things, Android phones with its unique advantage of being open for us to provide more quality and convenient technological achievements. The research is based on the Android mobile phone Bluetooth controlled smart car design, based on mobile platforms, by means of Bluetooth technology, design and implementation of a wireless remote control car new solutions. Control platform designed for mobile phones, Bluetooth communication module, motor drive modules and other hardware modules remote control car. Realize the car forward, backward, turn left in front, front right turn after turn left, turn right after the other real-time control functions. For the remote control toy car design presents a new way of thinking, and can for the future smart home remote control designed to provide some reference value. Describes one kind of walking through the phone's Bluetooth remote control car software and hardware design. Bluetooth mobile phone as a client, a small car Bluetooth Module HC-06 as a server. Clients using the Eclipse development environment, JAVA programming, client services using micro-controller. The two sides communicate through the serial port, the microcontroller drive DC motor control car action. Experimental results show that the car can receive mobile phone remote control signals and the flexibility to move forward, backward, turn left, turn right and stop functions. Introduces the based on Andrews's the Bluetooth intelligent trolley control want to achieve the function is trolley be able to forward, backward, turn left, turn right, then expounded that the system circuit design and principle of description, including the program design, it is important components introduction, circuit design Description of (, including SCM control circuit, the motor drive circuit) Andrews mobile phone software interface design, software design flow as well as system debugging. Finally summed up the based on Andrews's the Bluetooth intelligent trolley control design is completed the task of, analysis system appear deficiencies. 【Key words】Andriod Bluetooth Intelligent car Smartphone AT89C52 SCM
单片机蓝牙控制小车
课题:基于单片机得蓝牙控制小车专业: 班级: 学号: 姓名: 指导教师: 设计日期: 成绩: 重庆大学城市科技学院电气信息学院
目录 1、设计目得作用 (2) 2、设计要求.............................................. 23、设计得具体实现?2 3、1设计原理 (2) 3、2系统设计12? 3、3系统实现13? 4、总结19? 参考文献................................................ 20附录 ................................................... 21附录121? 附录22?2
C51蓝牙控制小车设计报告 1设计目得与意义 目得与意义:提高学生动手能力,培养学生得思维,巩固理论知识,让我们能对单片机更加深入得了解,加深同学们对单片机得认识,通过自己动手让小车跑起来还能让同学们更加有积极性,参与感,成就感.让学生们亲自体验这门课程得神奇性。 因为无线技术得广泛使用,使蓝牙技术得发展成为了趋势之一,蓝牙可以发送与接受语音与数据,满足了大多数人得需求,它也融合了其她相关产品得特点,也就是这样技术变得更多样性。实现了无线控制小车,摆脱了有线控制得不方便,更加智能。 2设计要求 SPP蓝牙串口调试助手---—》聊天窗口-—》 1、在Bluetooth_Car项目中添加超声波躲避障碍功能(在小车前进得过程中,实时检测障碍物,一旦检测得距离,接近设定得值,触发蜂鸣器,报警系统工作,小车停止前进); 2、在Bluetooth_Car项目中得串口中断服务函数中,添加小车前进得8个方向 ,前后左右,左前,右前,左后,右后; 3、利用外部中断,强制停止小车运行(无论小车现在处于什么状态),蜂鸣器报警1s后,可再运行; 4、用手机得蓝牙串口调试助手来远程操作小车。 3、设计得具体实现 3、1设计原理 芯片常识: STM8、C52 、STM32 、ARM C52:主要做末端得控制11、0592MHZ STM32:主要做工业控制领域--智能设备168M ARM:主要做消费市场——手机
基于安卓手机蓝牙控制的智能小车设计毕业论文
毕业设计(论文) 设计(论文)题目:基于安卓手机蓝牙控制的智能小车设计
摘要 随着物联网的兴起,Android手机以其独有的开放性优势正在为我们提供更多优质便捷的技术成果。本课题研究的是基于安卓手机蓝牙控制的智能小车设计,基于手机平台,借助于蓝牙技术,设计和实现了一种无线遥控小车新的解决方案。设计以手机控制平台、蓝牙通讯模块、电机驱动模块等硬件模块组成的遥控小车。实现小车的前进、后退、前左转弯、前右转弯、后左转弯、后右转弯等实时控制功能。为遥控玩具小车的设计提出了一种新的思路,同时可以为将来智能家居的遥控设计提供一定的参考意义。 阐述一种通过手机蓝牙遥控小车行走的软、硬件设计。手机蓝牙作为客户端,小车上的蓝牙模块HC-06作为服务端。客户端采用Eclipse开发环境,JAVA编程,服务端采用单片机控制。双方通过串口进行通信,单片机驱动直流电机控制小车行动。实验结果表明,小车可以接收手机遥控信号并灵活地进行前行、倒退、左转、右转和停止等功能。 本文介绍了基于安卓手机的蓝牙智能小车控制要实现的功能,接着阐述该系统电路的设计及原理的说明,包括了方案的设计、重要元器件的介绍、电路设计的说明(包括单片机控制电路、电机驱动电路)安卓手机软件界面设计、软件设计流程以及系统的调试。最后总结了基于安卓的蓝牙智能小车控制设计完成的任务,分析系统出现的不足。 【关键词】Andriod蓝牙智能小车智能手机AT89C52单片机
ABSTRACT With the rise of the Internet of Things, Android phones with its unique advantage of being open for us to provide more quality and convenient technological achievements. The research is based on the Android mobile phone Bluetooth controlled smart car design, based on mobile platforms, by means of Bluetooth technology, design and implementation of a wireless remote control car new solutions. Control platform designed for mobile phones, Bluetooth communication module, motor drive modules and other hardware modules remote control car. Realize the car forward, backward, turn left in front, front right turn after turn left, turn right after the other real-time control functions. For the remote control toy car design presents a new way of thinking, and can for the future smart home remote control designed to provide some reference value. Describes one kind of walking through the phone's Bluetooth remote control car software and hardware design. Bluetooth mobile phone as a client, a small car Bluetooth Module HC-06 as a server. Clients using the Eclipse development environment, JAVA programming, client services using micro-controller. The two sides communicate through the serial port, the microcontroller drive DC motor control car action. Experimental results show that the car can receive mobile phone remote control signals and the flexibility to move forward, backward, turn left, turn right and stop functions. Introduces the based on Andrews's the Bluetooth intelligent trolley control want to achieve the function is trolley be able to forward, backward, turn left, turn right, then expounded that the system circuit design and principle of description, including the program design, it is important components introduction, circuit design Description of (, including SCM control circuit, the motor drive circuit) Andrews mobile phone software interface design, software design flow as well as system debugging. Finally summed up the based on Andrews's the Bluetooth intelligent trolley control design is completed the task of, analysis system appear deficiencies. 【Key words】Andriod Bluetooth Intelligent car Smartphone AT89C52 SCM
(完整)基于Android的蓝牙遥控小车设计
(完整)基于Android的蓝牙遥控小车设计 编辑整理: 尊敬的读者朋友们: 这里是精品文档编辑中心,本文档内容是由我和我的同事精心编辑整理后发布的,发布之前我们对文中内容进行仔细校对,但是难免会有疏漏的地方,但是任然希望((完整)基于Android的蓝牙遥控小车设计)的内容能够给您的工作和学习带来便利。同时也真诚的希望收到您的建议和反馈,这将是我们进步的源泉,前进的动力。 本文可编辑可修改,如果觉得对您有帮助请收藏以便随时查阅,最后祝您生活愉快业绩进步,以下为(完整)基于Android的蓝牙遥控小车设计的全部内容。
成绩评定表 课程设计任务书
阐述一种通过手机蓝牙遥控小车行走的软、硬件设计.手机蓝牙作为客户端,小车上的蓝牙模块HC—05作为服务端。客户端采用Eclipse开发环境,J2ME编程,服务端采用单片机控制。双方通过串口仿真协议进行通信,单片机驱动直流电机控制小车行动。实验结果
表明,小车可以接收手机遥控信号并灵活地进行前行、倒退、左转、右转和停止等功能。 关键词: 89c52,hc—05,遥控小车,Andriod 目录 1引言 (1) 1。1课题设计目的及意义 (1) 1。1。1设计的目的 (1) 1.1.2设计的意义 (1) 2 方案比较与论证 (2) 2。1无线单元方案与比较 (2) 3 硬件电路设计 (3) 3。1 总体设计 (3) 3.2 单片机模块 (4) 3.2。1 STC89C52简介 (4) 3.2。2 L298N驱动模块及原理介绍 (5) 3。2.3 蓝牙模块 (6) 4 软件设计 (6) 4。1 智能车运动控制程序 (6) 4。2 Android蓝牙客户端设计与实现 (7) 4。2。1 客户端界面设计 (8)
基于安卓手机蓝牙控制的智能小车设计
摘要 随着物联网的兴起,Android手机以其独有的开放性优势正在为我们提供更多优质便捷的技术成果。本课题研究的是基于安卓手机蓝牙控制的智能小车设计,基于手机平台,借助于蓝牙技术,设计和实现了一种无线遥控小车新的解决方案。设计以手机控制平台、蓝牙通讯模块、电机驱动模块等硬件模块组成的遥控小车。实现小车的前进、后退、前左转弯、前右转弯、后左转弯、后右转弯等实时控制功能。为遥控玩具小车的设计提出了一种新的思路,同时可以为将来智能家居的遥控设计提供一定的参考意义。 阐述一种通过手机蓝牙遥控小车行走的软、硬件设计。手机蓝牙作为客户端,小车上的蓝牙模块HC-06作为服务端。客户端采用Eclipse开发环境,JAVA编程,服务端采用单片机控制。双方通过串口进行通信,单片机驱动直流电机控制小车行动。实验结果表明,小车可以接收手机遥控信号并灵活地进行前行、倒退、左转、右转和停止等功能。 本文介绍了基于安卓手机的蓝牙智能小车控制要实现的功能,接着阐述该系统电路的设计及原理的说明,包括了方案的设计、重要元器件的介绍、电路设计的说明(包括单片机控制电路、电机驱动电路)安卓手机软件界面设计、软件设计流程以及系统的调试。最后总结了基于安卓的蓝牙智能小车控制设计完成的任务,分析系统出现的不足。 【关键词】Andriod蓝牙智能小车智能手机AT89C52单片机
ABSTRACT With the rise of the Internet of Things, Android phones with its unique advantage of being open for us to provide more quality and convenient technological achievements. The research is based on the Android mobile phone Bluetooth controlled smart car design, based on mobile platforms, by means of Bluetooth technology, design and implementation of a wireless remote control car new solutions. Control platform designed for mobile phones, Bluetooth communication module, motor drive modules and other hardware modules remote control car. Realize the car forward, backward, turn left in front, front right turn after turn left, turn right after the other real-time control functions. For the remote control toy car design presents a new way of thinking, and can for the future smart home remote control designed to provide some reference value. Describes one kind of walking through the phone's Bluetooth remote control car software and hardware design. Bluetooth mobile phone as a client, a small car Bluetooth Module HC-06 as a server. Clients using the Eclipse development environment, JAVA programming, client services using micro-controller. The two sides communicate through the serial port, the microcontroller drive DC motor control car action. Experimental results show that the car can receive mobile phone remote control signals and the flexibility to move forward, backward, turn left, turn right and stop functions. Introduces the based on Andrews's the Bluetooth intelligent trolley control want to achieve the function is trolley be able to forward, backward, turn left, turn right, then expounded that the system circuit design and principle of description, including the program design, it is important components introduction, circuit design Description of (, including SCM control circuit, the motor drive circuit) Andrews mobile phone software interface design, software design flow as well as system debugging. Finally summed up the based on Andrews's the Bluetooth intelligent trolley control design is completed the task of, analysis system appear deficiencies. 【Key words】Andriod Bluetooth Intelligent car Smartphone AT89C52 SCM
基于蓝牙遥控的智能小车设计
《嵌入式系统设计》项目设计报告 题目:基于蓝牙技术的智能遥控小车的设计专业:自动化 班级: 姓名:学号: 指导老师: 成绩: ( 2015.12)
摘要 随着汽车工业的迅速发展,关于汽车的研究也就越来越受人关注。遥控小车起源于美国,由于政府对无线遥控小车研发的资助以及相关资助的推动作用,日本、美国、德国等工业大国在遥控小车技术上占据着明显优势。我国的无线遥控小车研究工作始于20世纪中后期,在国家的863、973等技术发展计划的重点支持下,国内已大范围地进行无线遥控小车的研究。全国电子大赛和省内电子大赛几乎每次都有智能小车这方面的题目,全国各高校也都很重视该题目的研究,但是与国际先进还存在一定的差距。可见其研究意义很大。本设计就是在这样的背景下提出的。设计的智能电动小车能够实现无线遥控,串口通讯,实时检测速度,避障碍等功能。无线遥控实现方法包括蓝牙、红外、射频几种,其中蓝牙技术具有一定优势,目前在信息家电方面应用正在铺设。各种家电共用遥控,并可组网与公众互联网相接,共享有用信息。目前蓝牙技术实现无线遥控的短板在于传输距离短和芯片价格高方面。但随着科技发展,这些问题正在逐步得以解决。无线遥控机器人有着广阔的应用前景。 无线遥控的小车,可以在危险的环境作业,人员搜索,可以在各类领域中发挥着它特殊的作用,本次设计是选择基于蓝牙遥控的多功能智能小车为对象。控制系统以C51单片机为主控芯片,采用L298N为电机驱动芯片、HC-06蓝牙无线模块、12864液晶显示模块、四路循迹模块等构成外围扩展电路。将自制的控制电路、控制程序和四轮小车机械相结合,制作多功能智能小车。实验调试实现了智能小车的蓝牙无线遥控、自动避障、自动测距及各种灯光的功能。 关键词:51单片机;蓝牙遥控;智能小车
蓝牙智能遥控小车毕业设计论文
基于蓝牙遥控的多功能智能小车设计与制作 学院名称: 机械工程学院 专 业: 机械电子工程 班 级: 09机电2Z 学 号: 09324234 姓 名: 祁星 指导教师姓名: 李尚荣 指导教师职称: 讲师 二零一三年六月一日 JIANGSU UNIVERSITY OF TECHNOLOGY 本科毕业设计(论文)
基于蓝牙遥控的多功能智能小车设计与制作 摘要:无线遥控的机器人小车在危险环境作业、人员搜集等应用中可发挥特殊的作用。本次毕业设计选择基于蓝牙遥控的多功能智能小车为对象。设计了该系统的硬件电路原理图和PCB图,控制系统以STC12C5A60S2单片机为主控芯片,采用L293D为电机驱动芯片、蓝牙无线遥控模块、红外光电传感器模块、超声波发射与接收模块等构成外围扩展电路。将自制的控制电路、控制程序和四轮小车机械结构相结合,制作多功能机器人小车。实验调试实现了智能小车的蓝牙无线遥控、自动避障、自动循迹、自动测速、自动测距等功能。 关键词:单片机;蓝牙遥控;PWM调速;光电传感器
Development of a smart remote control vehicle based on blue-tooth communication Abstract: Wireless remote control robot car could play a special role in the hazardous environment operations and search & rescue personnel. A multi-function smart car with bluetooth remote control is selected as my graduation thesis subject. The design of the system hardware circuit schematic and PCB diagram is present in paper. The control system circuit is mainly consist of a STC12C5A60S2 MCU as the main chip, as well as a L293D chip for motor driving, a bluetooth wireless communication module for remote control, a infrared photoelectric sensor module for object detection, a ultrasonic transmitter and receiver module for distance measurement. The smart car is implemented by the combination of the self-control circuit, the control program code and four-wheel car mechanical structure. Experimental tests showed that some functions such as Bluetooth wireless remote control, automatic obstacle avoidance, automatic tracking route, auto-sensing objects and auto-detecting distance were completely achieved in the smart car. Keywords:Single Chip Microcomputer; Blue-Tooth Remote control; PWM Speed Regulation; Optical Electronic Sensor
基于安卓蓝牙遥控操作小汽车
无需编程,DIY自己智能小车的Android蓝牙遥控软件(一) 分类:单片机小车2012-09-04 19:58 2928人阅读评论(7) 收藏举报 很多热衷于玩单片机小车、机器人的童靴,往往也向往着有天能自己编写一个Android手机的遥控程序,通过自己的手机遥控小车,单片机程序用C语言或者汇编什么的都可以容易完成,,无奈要写一个上位机的Android控制程序就要会java、还要学一点xml知识,对于只学过C 或C++的人来说……..╮(╯▽╰)╭ 不过万能的Google提供了一款云端Android程序开发工具:AppInventor。因为对于想要用手机控制机器人的使用者而言,他们不大需要太华丽的界面,只要使用基本组件例如按钮、文字输入输出即可,所以,App Inventor 让你抛开复杂的程序代码,使用搭积木式的方法来完成您的Android程序。(完全不需要编程哦) 上个效果图先。 呵呵,有没有跃跃欲试的冲动?按照下面的步骤一步一步来吧: 一、要有一台电脑(废话呀…………)
系统需求: 1)Macintosh:Mac OS X 10.5,10.6 2)Windows系列:Windows XP,Windows Vista,Windows 7都可以的 3)GUN/Linux系统:Ubuntu 8+,Debian 5+ 等。 1)Mozilla Firefox 3.6或更高 2)Apple Safari 5.0或更高 3)Google Chrome 4.0或更高 4)IE6及更高 其次测试一下你的Java环境配置是否正确: 这需要在你的电脑上能够运行Java ,目前官方更新到了Java 7,如果没有安装的话,可以在Oracle官方网站上去下载(我的电脑有没有装了java呢?到java 的官方链接里看一下知道了https://www.360docs.net/doc/8612580217.html,/zh_CN/download/installed.jsp)。 要有一个Gmail帐号,个人认为Gmail邮箱是必备的邮箱啊,没有就申请一个。 最后,安装App Inventor软件包:在使用App Inventor之前,你还需要安装一个叫做App Inventor Setup的软件包在你的电脑上。当然你需要根据你的操作系统来下载不同的软件包的。这里我提供的是Windows系统下的软件包,其他的可以在Google的网站上去下载!Download!!下载完成后的文件名应该是: AppInventor_Setup_Installer_v_1_2.exe (~92 MB),点击打开安装即可,这里建议最好不要更改安装路径的。这里提供以下地址: https://www.360docs.net/doc/8612580217.html,/learn/setup/setupwindows.html 到目前为止,以上4个步骤如果都顺利,那么我们可以登录这里开始编写Android软件啦:https://www.360docs.net/doc/8612580217.html,/ 点击右边的红色“Invent”按钮进入MyProjects页面,这里就可以新建工程,开始编写Android软件了。