查看: 1669|回复: 0

[原创] 【赚周年币】fireduino-测试TCH223触摸模块

[复制链接]
  • TA的每日心情
    开心
    2020-2-14 12:16
  • 签到天数: 827 天

    连续签到: 1 天

    [LV.10]以坛为家III

    发表于 2016-12-24 17:15:30 | 显示全部楼层 |阅读模式
    分享到:
    接上一篇帖子
    【   】四周年庆-四周年庆-【赚周年币】fireduino-上电、升级模式-爱板网论坛 - 电子工程师学习交流园地 https://www.cirmall.com/bbs/thread-59195-1-1.html

    之前在atmel社区获得了触摸模块,型号TCH223,该模块中文介绍
    【   】【Arduino uno】-----触摸模块 - Arduino设计 - Atmel技术区
    http://atmel.eefocus.com/module/forum/thread-11170-1-1.html


    直接修改blink例程如下,下载测试
    1. int led = 13;

    2. // the setup routine runs once when you press reset:
    3. void setup() {        
    4.   Serial.begin(115200);
    5.   // initialize the digital pin as an output.
    6.   pinMode(4,INPUT);
    7.   pinMode(led, OUTPUT);     
    8. }

    9. // the loop routine runs over and over again forever:
    10. void loop() {
    11.   if(digitalRead(4)==HIGH)
    12.   {
    13.   digitalWrite(led, HIGH);  
    14.   delay(100);// turn the LED on (HIGH is the voltage level)
    15.   Serial.println("thanks to EEboard and Firefly ");
    16.   }
    17.   else   
    18.   {// wait for a second
    19.   digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
    20.   }              // wait for a second
    21. }
    复制代码
    编译下载,没有触摸时,LED反而亮了
    20161224_170015.jpg
    触摸时LED灭,串口有输出
    20161224_170620.jpg
    42.JPG
    怎么回事?检查程序,没有问题,看硬件,哦,原来是LED上拉了,大家只要把LED程序调换一下位置即可实现触摸时输出字符
    fireduino-review-14-500x164.png

    另外,发现个问题,程序下载的时候设备管理器串口会消失,类似返回升级模式以前,过一会又有了,怪怪的
    还有开发板开发板5V旁边是3V,arduino不是3.3V吗?3V是何理由?期待工程师介绍一下

    评分

    参与人数 1 +10 收起 理由
    loveeeboard + 10

    查看全部评分

    回复

    使用道具 举报

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

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条



    手机版|小黑屋|与非网

    GMT+8, 2024-4-25 12:37 , Processed in 0.143618 second(s), 20 queries , MemCache On.

    ICP经营许可证 苏B2-20140176  苏ICP备14012660号-2   苏州灵动帧格网络科技有限公司 版权所有.

    苏公网安备 32059002001037号

    Powered by Discuz! X3.4

    Copyright © 2001-2024, Tencent Cloud.