• 应战美国贸易战中国跟500亿 同等力度、同日开征关税 2019-07-12
  • 专家谈当前市场预期 信心持续攀升预期比较乐观 2019-07-02
  • SNH48年度总决选速报结果公布 李艺彤登顶 2019-07-02
  • 也门国防部说打死250名胡塞武装人员 2019-06-25
  • 高雅艺术进海淀创业园之合唱艺术赏析音乐会 2019-06-25
  • 端午话药浴:探秘藏东山谷里的藏药浴 2019-06-08
  • 美法院判处杀害中国女留学生的凶手25年监禁 2019-06-08
  • 国产动画电影:如何才能化平庸为经典? 2019-05-31
  • 县名解析:晋中介休市地名来历 2019-05-31
  • 广州拟增38家长护险机构 白云海珠分布最多 2019-05-30
  • 不忘初心、牢记使命、永远奋斗——学习贯彻落实党的十九大精神“基层调研行” 2019-05-24
  • 【波士瑞达奔驰车型报价】波士瑞达奔驰4S店车型价格 2019-05-24
  • 滚滚而来的温暖!山坡上滚下万斤爱心榨菜头 2019-05-20
  • 【新时代 新作为 新篇章】“煤老大”渐行渐远 新动能清风徐来 2019-05-12
  • 搂住所言延退对于企业和零活就业者或专家型科技工作者而言很恰当,可是对于公务员这一群体来说延退可能导致利益固化行政僵化,这是普罗大众不能够容忍的。 2019-05-06
  • > Arduino
    查看: 264|回复: 2
    打印 上一主题 下一主题

    [项目分享] 3D打印的视觉暂留显示器

    [复制链接]
    本帖最后由 中二点 于 2019-5-29 14:48 编辑


    MAKER: theSTEMpedia/译:趣无尽 Cherry
    人眼在观察景物时,光信号传入大脑神经,需经过一段短暂的时间,光的作用结束后,视觉形象并不立即消失,这种残留的视觉称“后像”,也被称为是“视觉暂留”。

    人眼每秒处理的图像不超过 10-12 个。当一系列图像很快的连续性的滚动时,就会让我们产生幻觉,感觉画面在动。这也是制作动画电影的基本原则。

    本期给大家带来一款别出心裁的 LED 显示器,用 Arduino、电机和一排 LED 制作的视觉暂留显示器。


    是不是很酷呢,接下来我们先来看一段视频,看看是如何制作的吧。


    材料清单


    Arduino Nano×1
    红外线传感器×1
    洞洞板×1
    LED 灯×若干
    电阻×若干
    直流电机×1
    电池×1
    电线×若干
    热熔胶×1
    烙铁×1
    白纸×1
    Arduino IDE(软件)

    3D打印
    3D 打印部分主要分为旋转支架和固定底座两个部分。


    所需 3D 打印的 STL 文件请在项目文件库中下载。

    安装 LED

    3D 部件打印完毕后,就可以进入操作环节了。
    1、剪取一块洞洞板,大小与旋转支架部分相匹配。


    2、安装 LED 灯,我使用八个红色的 LED 灯。关于灯的颜色,你可以自由选择。


    3、将所有 LED 灯的负极端口都焊接到洞洞板上。


    4、添加电阻,防止 LED 灯因电压(5V)过高而烧坏。我使用 220ohm 的电阻,将每个电阻焊接到每个 LED 灯的正极。
    5、将跳线电缆连接到电阻的另一个脚上。

    连接 LED 与 Arduino Nano



    连接接口的方式如下:
    LED0:Nano 的 D2 。
    LED1: Nano 的 D3 。
    LED2: Nano 的 D4 。
    LED3: Nano 的 D5 。
    LED4: Nano 的 D6 。
    LED5: Nano 的 D7 。
    LED6: Nano 的 D8 。
    LED7: Nano 的 D9 。
    负极为:Nano 的 Ground 。

    安装直流电机

    将直流电机安装到固定底座上并通电。


    添加红外线传感器

    我们需要一个点作为文本读写开始的起点。在固定底座下面粘贴一块白纸块作为起点,红外线传感器能检测到这张白纸块。
    如果改变白纸的位置,那么文本显示的位置也将随之发生改变。





    红外线传感器与 Nano 连接方式如下 :
    GND:Nano 的 GND。
    Vin: Nano 的 5V。
    Out:Nano 的 D10。

    组装部件
    1、连接电源,给 Arduino Nano 通电。



    2、将 Arduino Nano 安装到旋转的部件中。

    3、将旋转部件安装到固定底座上。


    Arduino 编程
    [AppleScript] 纯文本查看 复制代码
    /*[/size]
    [size=3] * This Code demonstrates [/size]
    [size=3] * LED POV DISPLAY [/size]
    [size=3] * [/size]
    [size=3] * Components used [/size]
    [size=3] * 1) Arduino Nano[/size]
    [size=3] * 2) DC motor[/size]
    [size=3] * 3) LEDs[/size]
    [size=3] * 4) IR sensor[/size]
    [size=3] * 5) Battery[/size]
    [size=3] * 6) Wire[/size]
    [size=3] * [/size]
    [size=3] * Connect leds to 2 to 9 digital pin of Nano[/size]
    [size=3] * Connect IR sensor out pin to 10 digital pin of Nano[/size]
    [size=3] * [/size]
    [size=3] * code written by Palak Mehta on March 29,2019[/size]
    [size=3]*/[/size]
    [size=3]////////////////////////design a pattern of display the number and alphabates//////////////////////////////// [/size]
    
    [size=3]int NUMBER9[]={1,1,1,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int NUMBER8[]={0,1,1,0,1,1,1,0, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,1,1,1,0};[/size]
    [size=3] int NUMBER7[]={1,0,0,0,0,0,0,0, 1,0,0,0,1,0,0,0, 1,0,0,0,1,0,0,0, 1,0,0,1,1,1,1,1, 1,1,1,0,1,0,0,0};[/size]
    [size=3] int NUMBER6[]={1,1,1,1,1,1,1,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};[/size]
    [size=3] int NUMBER5[]={1,1,1,1,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,1};[/size]
    [size=3] int NUMBER2[]= {1,0,0,0,0,0,1,1, 1,0,0,0,0,1,0,1, 1,0,0,0,1,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,0,0,0,1};[/size]
    [size=3] int NUMBER1[]= {0,0,1,0,0,0,0,0, 0,1,0,0,0,0,0,0, 1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};[/size]
    [size=3] int NUMBER0[]= {1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,1};[/size]
    
    [size=3] int _[] = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0};[/size]
    [size=3] int A[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int B[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 0,1,1,0,1,1,1,0};[/size]
    [size=3] int C[] = {0,0,1,1,1,1,0,0, 0,1,0,0,0,0,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1};[/size]
    [size=3] int D[] = {1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 0,1,0,0,0,0,1,0, 0,0,1,1,1,1,0,0};[/size]
    [size=3] int E[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1, 1,0,0,1,0,0,0,1};[/size]
    [size=3] int F[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0};[/size]
    [size=3] int G[] = {0,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,0};[/size]
    [size=3] int H[] = {1,1,1,1,1,1,1,1, 0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0, 0,0,0,0,1,0,0,0, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int I[] = {1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1};[/size]
    [size=3] int J[] = {0,0,0,0,0,1,1,0, 0,0,0,0,1,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,0};[/size]
    [size=3] int K[] = {1,1,1,1,1,1,1,1, 0,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 0,1,0,0,0,0,1,0, 1,0,0,0,0,0,0,1};[/size]
    [size=3] int L[] = {1,1,1,1,1,1,1,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1};[/size]
    [size=3] int M[] = {1,1,1,1,1,1,1,1, 0,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0, 0,1,0,0,0,0,0,0, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int N[] = {1,1,1,1,1,1,1,1, 0,0,1,0,0,0,0,0, 0,0,0,1,1,0,0,0, 0,0,0,0,0,1,0,0, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int O[] = {0,1,1,1,1,1,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 1,0,0,0,0,0,0,1, 0,1,1,1,1,1,1,0};[/size]
    [size=3] int P[] = {1,1,1,1,1,1,1,1, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 1,0,0,1,0,0,0,0, 0,1,1,0,0,0,0,0};[/size]
    [size=3] int Q[] = {0,1,1,1,1,1,1,0, 1,0,0,0,0,0,0,1, 1,0,0,0,0,1,0,1, 0,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,1};[/size]
    [size=3] int R[] = {1,1,1,1,1,1,1,1, 1,0,0,1,1,0,0,0, 1,0,0,1,0,1,0,0, 1,0,0,1,0,0,1,0, 0,1,1,0,0,0,0,1};[/size]
    [size=3] int S[] = {0,1,1,1,0,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,0,0,1, 1,0,0,0,1,1,1,0};[/size]
    [size=3] int T[] = {1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0, 1,1,1,1,1,1,1,1, 1,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0};[/size]
    [size=3] int U[] = {1,1,1,1,1,1,1,0, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,0,1, 1,1,1,1,1,1,1,0};[/size]
    [size=3] int V[] = {1,1,1,1,1,1,0,0, 0,0,0,0,0,0,1,0, 0,0,0,0,0,0,0,1, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,0,0};[/size]
    [size=3] int W[] = {1,1,1,1,1,1,1,1, 0,0,0,0,0,0,1,0, 0,0,0,0,0,1,0,0, 0,0,0,0,0,0,1,0, 1,1,1,1,1,1,1,1};[/size]
    [size=3] int X[] = {1,1,0,0,0,0,1,1, 0,0,1,0,0,1,0,0, 0,0,0,1,1,0,0,0, 0,0,1,0,0,1,0,0, 1,1,0,0,0,0,1,1};[/size]
    [size=3] int Y[] = {1,1,0,0,0,0,0,0, 0,0,1,0,0,0,0,0, 0,0,0,1,1,1,1,1, 0,0,1,0,0,0,0,0, 1,1,0,0,0,0,0,0};[/size]
    [size=3] int Z[] = {1,0,0,0,0,1,1,1, 1,0,0,0,1,0,0,1, 1,0,0,1,0,0,0,1, 1,0,1,0,0,0,0,1, 1,1,0,0,0,0,0,1};[/size]
     
    [size=3] int* alpha[]= {A,B,C,D,E,F,G,H,I,J,K,L,M,N};//,T,U,V,W,X,Y,Z};[/size]
    [size=3] int letterSpace;[/size]
    [size=3] int delayTime;[/size]
    
    [size=3] #define IR_pin 10[/size]
     
    [size=3] void setup()[/size]
    [size=3] { [/size]
    [size=3]         Serial.begin(9600);       [/size]
    [size=3]         pinMode(IR_pin,INPUT);[/size]
    [size=3]         for( int i = 2; i<10 ;i++ ) // setting the ports of the leds to OUTPUT[/size]
    [size=3]           {[/size]
    [size=3]            pinMode(i, OUTPUT);[/size]
    [size=3]           }[/size]
    [size=3]                [/size]
    [size=3]         letterSpace =4;// defining the space between the letters (ms)         [/size]
    [size=3]         delayTime =1;// defining the time dots appear (ms)[/size]
    [size=3]}[/size]
    
    
    [size=3] void printLetter(int letter[])[/size]
    [size=3] {[/size]
    [size=3]           int y;[/size]
    [size=3]          // printing the first y row of the letter[/size]
    [size=3]           for (y=0; y<8; y++)[/size]
    [size=3]           {[/size]
    [size=3]           digitalWrite(y+2, letter[y]);[/size]
    [size=3]           }[/size]
    [size=3]           delay(delayTime);[/size]
    [size=3]          // printing the second y row of the letter[/size]
    [size=3]           for (y=0; y<8; y++)[/size]
    [size=3]           {[/size]
    [size=3]           digitalWrite(y+2, letter[y+8]);[/size]
    [size=3]           }[/size]
    [size=3]           delay(delayTime);[/size]
    [size=3]          // printing the third y row of the letter[/size]
    [size=3]           for (y=0; y<8; y++)[/size]
    [size=3]           {[/size]
    [size=3]           digitalWrite(y+2, letter[y+16]);[/size]
    [size=3]           }[/size]
    [size=3]           delay(delayTime);[/size]
    [size=3]           for(y = 0; y<8; y++) {[/size]
    [size=3]           digitalWrite(y+2, letter[y+24]);[/size]
    [size=3]           }[/size]
    [size=3]           delay(delayTime);[/size]
    [size=3]          for(y = 0; y<8; y++) {[/size]
    [size=3]           digitalWrite(y+2, letter[y+32]);[/size]
    [size=3]           }[/size]
    [size=3]           delay(delayTime);[/size]
    [size=3]           // printing the space between the letters[/size]
    [size=3]           for (y=0; y<8; y++)[/size]
    [size=3]           {[/size]
    [size=3]           digitalWrite(y+2, 0);[/size]
    [size=3]           }[/size]
    [size=3]           delay(letterSpace);[/size]
    [size=3] }[/size]
    
     
    [size=3] void loop()[/size]
    [size=3] {[/size]
    [size=3]  if(digitalRead(IR_pin)==LOW)[/size]
    [size=3]  {[/size]
    [size=3]     printLetter (P);[/size]
    [size=3]     printLetter (O);[/size]
    [size=3]     printLetter (V);[/size]
    [size=3]     printLetter (_);[/size]
    [size=3]     printLetter (_);[/size]
    [size=3]     printLetter (D);[/size]
    [size=3]     printLetter (I);[/size]
    [size=3]     printLetter (S);[/size]
    [size=3]     printLetter (P);[/size]
    [size=3]     printLetter (L);[/size]
    [size=3]     printLetter (A);[/size]
    [size=3]     printLetter (Y);[/size]
    [size=3]     printLetter (_);[/size]
     
    [size=3]  }[/size]
    [size=3]     [/size]
    [size=3]}[/size]
    [size=3]

    归档.zip (127.37 KB, 下载次数: 0)


    沙发

    DL张  见习技师

    发表于 2019-5-29 21:43:32

    赞赞赞
    板凳

    LANCHUAN  见习技师

    发表于 2019-6-3 18:13:11

    牛逼啊,
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    为本项目制作心愿单
    购买心愿单
    心愿单 编辑
    wifi气象站

    硬件清单

    btnicon
    我也要做!
    点击进入购买页面
    上海智位机器人股份有限公司 沪ICP备09038501号-4

    © 2013-2019 Comsenz Inc. Powered by Discuz! X3.4 Licensed

    极速赛车预测
  • 应战美国贸易战中国跟500亿 同等力度、同日开征关税 2019-07-12
  • 专家谈当前市场预期 信心持续攀升预期比较乐观 2019-07-02
  • SNH48年度总决选速报结果公布 李艺彤登顶 2019-07-02
  • 也门国防部说打死250名胡塞武装人员 2019-06-25
  • 高雅艺术进海淀创业园之合唱艺术赏析音乐会 2019-06-25
  • 端午话药浴:探秘藏东山谷里的藏药浴 2019-06-08
  • 美法院判处杀害中国女留学生的凶手25年监禁 2019-06-08
  • 国产动画电影:如何才能化平庸为经典? 2019-05-31
  • 县名解析:晋中介休市地名来历 2019-05-31
  • 广州拟增38家长护险机构 白云海珠分布最多 2019-05-30
  • 不忘初心、牢记使命、永远奋斗——学习贯彻落实党的十九大精神“基层调研行” 2019-05-24
  • 【波士瑞达奔驰车型报价】波士瑞达奔驰4S店车型价格 2019-05-24
  • 滚滚而来的温暖!山坡上滚下万斤爱心榨菜头 2019-05-20
  • 【新时代 新作为 新篇章】“煤老大”渐行渐远 新动能清风徐来 2019-05-12
  • 搂住所言延退对于企业和零活就业者或专家型科技工作者而言很恰当,可是对于公务员这一群体来说延退可能导致利益固化行政僵化,这是普罗大众不能够容忍的。 2019-05-06
  • 大乐透历史跨度最小 超智能足球 摇钱树一肖中特免费公开奖资料 新疆福彩18选7走势图 陕西快乐十分前三直 浙江11选5爱彩乐 黑龙江时时彩走势图官 31选7开奖11132 上海时时乐开奖走势图连线 十四码信封管三期网址 广东十一选五基本走势 刘伯温四肖中特料2019r 秒速飞艇有正规软件吗 秒速时时彩个位计划 学习诈金花技巧