极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 24691|回复: 10

看看我的“蓝牙手表” 山寨版 —— 马上有宝!

[复制链接]
发表于 2014-1-10 22:09:37 | 显示全部楼层 |阅读模式
本帖最后由 wetnt 于 2014-1-10 22:44 编辑

            现在流行“蓝牙手表”,各种手表满天飞,……



            哈哈,我也DIY一个!当然现在还是原型,没能真正成为手表!有些思路和大家探讨探讨……



            
“马”上……






            看看整体的接线图:蓝牙+Microduino+MAX7219 8X8 点阵模块!



            其实很简单,就是 手机蓝牙向 —— 蓝牙模块发送串口数据,Microduino 解析串口数据,点亮 MAX7219 8X8 点阵!Microduino仅仅负责解析串口,没有复杂的处理,核心的处理都是手机端完成的!







            Microduino接线图,Microduino-FT232R主要负责供电!再加上一块 Microduino-BM 、锂电就完美了!



            Microduino真是为堆叠而生的,地线接口还是比较少,如果再有一块 Microduino-BT,再封装一个Microduino规格的MAX7219 8X8 点阵模块,大家就都可以DIY自己的个性蓝牙手表了。

            再看看手机端软件:BOBOKing 蓝牙手表V1.0,安卓手机软件专门用来发送点阵数据,而且可以手动绘制,随时随地发送自定义内容,还可以循环播放,可以给妹子惊喜哦!







附上arduino代码和手机APP软件:



  1. /*

  2. name:   @ 海云飞/BOBOKing
  3. email:    [email][email protected][/email]
  4. date:     2014.01.10

  5. */

  6. /*
  7. pin 12 is connected to the DataIn
  8. pin 11 is connected to the CLK
  9. pin 10 is connected to LOAD
  10. */

  11. #include "LedControl.h"

  12. LedControl lc1 = LedControl(12,11,10,1);

  13. //=======================================================================================================================
  14. byte DgitTab68[10][8]={
  15. {0x00,0x00,0x3e,0x41,0x41,0x41,0x3e,0x00}, //0
  16. {0x00,0x00,0x00,0x00,0x21,0x7f,0x01,0x00}, //1
  17. {0x00,0x00,0x27,0x45,0x45,0x45,0x39,0x00}, //2
  18. {0x00,0x00,0x22,0x49,0x49,0x49,0x36,0x00}, //3
  19. {0x00,0x00,0x0c,0x14,0x24,0x7f,0x04,0x00}, //4
  20. {0x00,0x00,0x72,0x51,0x51,0x51,0x4e,0x00}, //5
  21. {0x00,0x00,0x3e,0x49,0x49,0x49,0x26,0x00}, //6
  22. {0x00,0x00,0x40,0x40,0x40,0x4f,0x70,0x00}, //7
  23. {0x00,0x00,0x36,0x49,0x49,0x49,0x36,0x00}, //8
  24. {0x00,0x00,0x32,0x49,0x49,0x49,0x3e,0x00}  //9
  25. };

  26. byte DigitTab48[10][4]={
  27. {0x3e,0x41,0x41,0x3e}, //0
  28. {0x21,0x7f,0x01,0x00}, //1
  29. {0x27,0x45,0x45,0x39}, //2
  30. {0x22,0x49,0x49,0x36}, //3
  31. {0x1c,0x24,0x7f,0x04}, //4
  32. {0x72,0x51,0x51,0x4e}, //5
  33. {0x3e,0x49,0x49,0x26}, //6
  34. {0x40,0x40,0x4f,0x70}, //7
  35. {0x36,0x49,0x49,0x36}, //8
  36. {0x32,0x49,0x49,0x3e}  //9
  37. };

  38. //高8*6宽 ASCII码
  39. //采用"字模提取软件V2.2"
  40. //提取方式:纵向取模,字节倒序
  41. //制作:微控设计网-DC 手工制作6*8点阵字库
  42. //2005.8.20. 02:10  microcontrol  dc
  43. uint8_t ASCII86[][6]=
  44. {
  45. {0x00,0x00,0x00,0x00,0x00,0x00},//空
  46. {0x00,0x00,0x5F,0x00,0x00,0x00},//!
  47. {0x00,0x07,0x00,0x07,0x00,0x00},//"
  48. {0x14,0x7F,0x14,0x7F,0x14,0x00},//#
  49. {0x24,0x2A,0x7F,0x2A,0x12,0x00},//$
  50. {0x23,0x13,0x08,0x64,0x62,0x00},//%
  51. {0x36,0x49,0x56,0x20,0x50,0x00},//&
  52. {0x00,0x08,0x07,0x03,0x00,0x00},//'
  53. {0x00,0x1C,0x22,0x41,0x00,0x00},//(
  54. {0x00,0x41,0x22,0x1C,0x00,0x00},//)
  55. {0x24,0x18,0x7E,0x18,0x24,0x00},//*
  56. {0x08,0x08,0x3E,0x08,0x08,0x00},//+
  57. {0x00,0x80,0x70,0x30,0x00,0x00},//,
  58. {0x08,0x08,0x08,0x08,0x08,0x00},//-
  59. {0x00,0x00,0x60,0x60,0x00,0x00},//.
  60. {0x20,0x10,0x08,0x04,0x02,0x00},///
  61. {0x3E,0x41,0x49,0x41,0x3E,0x00},//0
  62. {0x00,0x42,0x7F,0x40,0x00,0x00},//1
  63. {0x72,0x49,0x49,0x49,0x46,0x00},//2
  64. {0x21,0x41,0x49,0x4D,0x32,0x00},//3
  65. {0x18,0x14,0x12,0x7F,0x10,0x00},//4
  66. {0x27,0x45,0x45,0x45,0x38,0x00},//5
  67. {0x3C,0x4A,0x49,0x49,0x31,0x00},//6
  68. {0x41,0x21,0x11,0x09,0x07,0x00},//7
  69. {0x36,0x49,0x49,0x49,0x36,0x00},//8
  70. {0x46,0x49,0x49,0x29,0x16,0x00},//9
  71. {0x00,0x00,0x14,0x00,0x00,0x00},//:
  72. {0x00,0x40,0x34,0x00,0x00,0x00},//;
  73. {0x00,0x08,0x14,0x22,0x41,0x00},//<
  74. {0x14,0x14,0x14,0x14,0x14,0x00},//=
  75. {0x00,0x41,0x22,0x14,0x08,0x00},//>
  76. {0x02,0x01,0x59,0x09,0x06,0x00},//?
  77. {0x3E,0x41,0x5D,0x59,0x4E,0x00},//@
  78. {0x7C,0x12,0x11,0x12,0x7C,0x00},//A
  79. {0x7F,0x49,0x49,0x49,0x36,0x00},//B
  80. {0x3E,0x41,0x41,0x41,0x22,0x00},//C
  81. {0x7F,0x41,0x41,0x41,0x3E,0x00},//D
  82. {0x7F,0x49,0x49,0x49,0x41,0x00},//E
  83. {0x7F,0x09,0x09,0x09,0x01,0x00},//F
  84. {0x3E,0x41,0x41,0x51,0x73,0x00},//G
  85. {0x7F,0x08,0x08,0x08,0x7F,0x00},//H
  86. {0x00,0x41,0x7F,0x41,0x00,0x00},//I
  87. {0x20,0x40,0x41,0x3F,0x01,0x00},//J
  88. {0x7F,0x08,0x14,0x22,0x41,0x00},//K
  89. {0x7F,0x40,0x40,0x40,0x40,0x00},//L
  90. {0x7F,0x02,0x1C,0x02,0x7F,0x00},//M
  91. {0x7F,0x04,0x08,0x10,0x7F,0x00},//N
  92. {0x3E,0x41,0x41,0x41,0x3E,0x00},//O
  93. {0x7F,0x09,0x09,0x09,0x06,0x00},//P
  94. {0x3E,0x41,0x51,0x21,0x5E,0x00},//Q
  95. {0x7F,0x09,0x19,0x29,0x46,0x00},//R
  96. {0x26,0x49,0x49,0x49,0x32,0x00},//S
  97. {0x03,0x01,0x7F,0x01,0x03,0x00},//T
  98. {0x3F,0x40,0x40,0x40,0x3F,0x00},//U
  99. {0x1F,0x20,0x40,0x20,0x1F,0x00},//V
  100. {0x3F,0x40,0x38,0x40,0x3F,0x00},//W
  101. {0x63,0x14,0x08,0x14,0x63,0x00},//X
  102. {0x03,0x04,0x78,0x04,0x03,0x00},//Y
  103. {0x61,0x59,0x49,0x4D,0x43,0x00},//Z
  104. {0x00,0x7F,0x41,0x41,0x41,0x00},//[
  105. {0x02,0x04,0x08,0x10,0x20,0x00},//""
  106. {0x04,0x02,0x01,0x02,0x04,0x00},//^
  107. {0x40,0x40,0x40,0x40,0x46,0x00},//_
  108. {0x00,0x03,0x07,0x08,0x00,0x00},//、
  109. {0x20,0x54,0x54,0x78,0x40,0x00},//a
  110. {0x7F,0x28,0x44,0x44,0x38,0x00},//b
  111. {0x38,0x44,0x44,0x44,0x28,0x00},//c
  112. {0x38,0x44,0x44,0x28,0x7F,0x00},//d
  113. {0x38,0x54,0x54,0x54,0x18,0x00},//e
  114. {0x00,0x08,0x7E,0x09,0x02,0x00},//f
  115. {0x38,0xA4,0xA4,0x9C,0x78,0x00},//g
  116. {0x7F,0x08,0x04,0x04,0x78,0x00},//h
  117. {0x00,0x44,0x7D,0x40,0x00,0x00},//i
  118. {0x20,0x40,0x40,0x3D,0x00,0x00},//j
  119. {0x7F,0x10,0x28,0x44,0x00,0x00},//k
  120. {0x00,0x41,0x7F,0x40,0x00,0x00},//l
  121. {0x7C,0x04,0x78,0x04,0x78,0x00},//m
  122. {0x7C,0x08,0x04,0x04,0x78,0x00},//n
  123. {0x38,0x44,0x44,0x44,0x38,0x00},//o
  124. {0xFC,0x18,0x24,0x24,0x18,0x00},//p
  125. {0x18,0x24,0x24,0x18,0xFC,0x00},//q
  126. {0x7C,0x08,0x04,0x04,0x08,0x00},//r
  127. {0x48,0x54,0x54,0x54,0x24,0x00},//s
  128. {0x04,0x04,0x3F,0x44,0x24,0x00},//t
  129. {0x3C,0x40,0x40,0x20,0x7C,0x00},//u
  130. {0x1C,0x20,0x40,0x20,0x1C,0x00},//v
  131. {0x3C,0x40,0x20,0x40,0x3C,0x00},//w
  132. {0x44,0x28,0x10,0x28,0x44,0x00},//x
  133. {0x4C,0x90,0x90,0x90,0x7C,0x00},//y
  134. {0x44,0x64,0x54,0x4C,0x44,0x00},//z
  135. {0x00,0x08,0x36,0x41,0x00,0x00},//{
  136. {0x00,0x00,0x77,0x00,0x00,0x00},//|
  137. {0x00,0x41,0x36,0x08,0x00,0x00},//}
  138. {0x02,0x01,0x02,0x04,0x02,0x00}//~
  139. };

  140. //=======================================================================================================================
  141.   byte C[8]={ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
  142.   byte I[8]={ 0x00,0x63,0x63,0x7f,0x7f,0x63,0x63,0x00 };
  143.   byte L[8]={ 0x38,0x44,0x42,0x21,0x21,0x42,0x44,0x38 };
  144.   byte U[8]={ 0x00,0x7e,0x7f,0x03,0x03,0x7f,0x7e,0x00 };
  145. //=======================================================================================================================

  146. unsigned long delaytime=1200;
  147. unsigned long SYSTime = 0;
  148. uint8_t READXXX[8]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};

  149. //=====================================================
  150. void setup() {
  151.   //--------------------------------------
  152.   lc1.shutdown(0,false);
  153.   lc1.setIntensity(0,8);
  154.   lc1.clearDisplay(0);
  155.   //--------------------------------------
  156.     Serial.begin(115200);
  157.   SYSTime = millis();
  158.   //--------------------------------------
  159. }
  160. //=====================================================
  161. void loop() {
  162.   //ILoveYou();
  163.   SerialRead();
  164.   WriteChar8(READXXX);
  165. // ILoveYou2();
  166. }
  167. //=====================================================

  168. void SerialRead(){
  169.   if (Serial.available() > 0) {
  170.     //--------------------------------
  171.     READXXX[0] = Serial.read();delay(2);
  172.     READXXX[1] = Serial.read();delay(2);
  173.     READXXX[2] = Serial.read();delay(2);
  174.     READXXX[3] = Serial.read();delay(2);
  175.     READXXX[4] = Serial.read();delay(2);
  176.     READXXX[5] = Serial.read();delay(2);
  177.     READXXX[6] = Serial.read();delay(2);
  178.     READXXX[7] = Serial.read();delay(2);
  179.     //--------------------------------
  180.      while (Serial.available() > 0)  
  181.     {
  182.       char(Serial.read());delay(2);
  183.     }
  184.     //--------------------------------
  185.   }
  186. }

  187. void ILoveYou() {
  188.   //---------------------------------------------  
  189.   WriteChar8(C); delay(delaytime);
  190.   WriteChar8(I); delay(delaytime);
  191.   WriteChar8(L); delay(delaytime);
  192.   WriteChar8(U); delay(delaytime);
  193.   //---------------------------------------------  
  194. }

  195. void ILoveYou2() {
  196.   for(int i=0;i<86;i++) {
  197.   //---------------------------------------------  
  198.   WriteChar6(ASCII86[i]); delay(delaytime);
  199.   //WriteChar4A(DigitTab48[i]);
  200.   //WriteChar4B(DigitTab48[i]);
  201.   //WriteChar8(ASCII[i]); delay(delaytime);
  202.   //---------------------------------------------  
  203.   }
  204.   //WriteChar8(AscTab[2]); delay(delaytime);
  205. }


  206. //=====================================================
  207. void WriteChar8(byte X[8]) {
  208.   for(int i=0;i<8;i++) {
  209.     lc1.setRow(0,7-i,X[i]);
  210.   }
  211. }
  212. void WriteChar6(byte X[6]) {
  213.   lc1.setRow(0,0,0x00);
  214.   for(int i=0;i<6;i++) {
  215.     lc1.setRow(0,i+1,X[i]);
  216.   }
  217.   lc1.setRow(0,7,0x00);
  218. }
  219. void WriteChar4A(byte X[4]) {
  220.   for(int i=0;i<4;i++) {
  221.     lc1.setRow(0,7-i,X[i]);
  222.   }
  223. }
  224. void WriteChar4B(byte X[4]) {
  225.   for(int i=0;i<4;i++) {
  226.     lc1.setRow(0,3-i,X[i]);
  227.   }
  228. }
  229. //=====================================================
复制代码


BOBOKing 蓝牙手表V1.0:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复

使用道具 举报

发表于 2014-1-11 00:03:02 | 显示全部楼层
APP做的不 错,
回复 支持 反对

使用道具 举报

发表于 2014-1-11 21:58:57 | 显示全部楼层
android上位机软件帅啊
回复 支持 反对

使用道具 举报

发表于 2014-1-12 02:39:08 | 显示全部楼层
深夜点赞!{:soso_e179:}
回复 支持 反对

使用道具 举报

发表于 2014-1-12 04:28:01 | 显示全部楼层
收藏了
{:soso_e179:}
回复 支持 反对

使用道具 举报

发表于 2014-1-12 04:28:35 | 显示全部楼层
收藏了
支持更新下去
回复 支持 反对

使用道具 举报

发表于 2014-1-14 14:56:04 | 显示全部楼层
挺酷的。。。。
回复 支持 反对

使用道具 举报

发表于 2014-4-19 17:34:28 | 显示全部楼层
字库怎么来的?我喜欢
回复 支持 反对

使用道具 举报

发表于 2014-4-20 03:31:56 | 显示全部楼层
cool  收了
收藏了, 謝謝
回复 支持 反对

使用道具 举报

发表于 2014-10-14 09:31:18 | 显示全部楼层
做的真好。一定下了不少功夫。用了多久做成这样。居然有配套app
回复 支持 反对

使用道具 举报

发表于 2014-11-1 15:41:03 | 显示全部楼层
牛的一塌糊涂。。哈哈
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|联系我们|极客工坊

GMT+8, 2026-6-14 00:04 , Processed in 0.109637 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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