一乐电子

一乐电子百科

 找回密码
 请使用微信账号登录和注册会员

QQ登录

只需一步,快速开始

快捷登录

手机号码,快捷登录

搜索
12
返回列表 发新帖
楼主: freesl
收起左侧

[arduino] 【软件+源码】Arduino电压蓝牙发送至Android手机上显示,据说标题要长

[复制链接]
发表于 2014-11-14 09:06 | 显示全部楼层
楼主,您好,一楼的压缩包,里面仅含EasyVm.aia, EasyVm.apk 2个文件,.apk安装手机,.aia不清楚什么文件格式(难道压缩包?打不开的),可像没有Arduino文件的(.ino),谢谢。
 楼主| 发表于 2014-11-17 16:45 | 显示全部楼层
yuqingshan 发表于 2014-11-14 09:06
楼主,您好,一楼的压缩包,里面仅含EasyVm.aia, EasyVm.apk 2个文件,.apk安装手机,.aia不清楚什么文件格 ...

一楼有写着:Arduino程序为例程里加了50ms的延时;
发送数据格式为:ASCII码+换行回车符,例如发送1.53V,则发送HEX数据:31 2E 35 33 0D 0A



时间过去久了,没找到当时的程序。
可以参考:


/*
  AnalogReadSerial
  Reads an analog input on pin 0, prints the result to the serial monitor.
  Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.

This example code is in the public domain.
*/

// the setup routine runs once when you press reset:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(50);        // delay in between reads for stability
}

发表于 2014-11-18 13:48 | 显示全部楼层
哦,原来这样简单,谢谢楼主指导!
发表于 2015-5-6 16:27 | 显示全部楼层
做人要厚道,下载要谢谢,谢谢楼主!谢谢!
发表于 2015-5-14 16:28 | 显示全部楼层

本版积分规则

QQ|一淘宝店|手机版|商店|电子DIY套件|一乐电子 ( 粤ICP备09076165号 ) 公安备案粤公网安备 44522102000183号

GMT+8, 2024-5-4 14:19 , Processed in 0.053044 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表