查看: 530|回复: 1

[未解决] 指纹编译时显示对应多个库

[复制链接]
  • TA的每日心情
    郁闷
    2019-4-15 15:12
  • 签到天数: 1 天

    [LV.1]初来乍到

    发表于 2019-4-7 16:45 | 显示全部楼层 |阅读模式
    #include <SoftwareSerial.h>
    #include <Adafruit_Fingerprint.h>   //调用指纹库
    SoftwareSerial mySerial(8,9);   //定义引脚

    Adafruit_Fingerprint finger=Adafruit_Fingerprint(&mySerial);
    int fingerprint();
    String IDname;    //定义指纹名称
    void setup() {
      Serial.begin(9600);
      finger.begin(57600);

      if(finger.verifyPassword())
      {
        Serial.print("找到指纹模块");
      }else
      {
        Serial.println("指纹模块识别");
        while(1){delay(1);}
      }
    }

    void loop() {
      if(fingerprint==1)    //判断指纹是否在指纹库中
      {
        IDname="sa";
        Serial.print(IDname);
      }else if(fingerprint==2)
      {
        IDname="king";
        Serial.print(IDname);
      }

    }

  • TA的每日心情
    郁闷
    2019-4-15 15:12
  • 签到天数: 1 天

    [LV.1]初来乍到

     楼主| 发表于 2019-4-7 16:46 | 显示全部楼层
    Arduino:1.8.5 (Windows 10), 开发板:"Arduino/Genuino Uno"

    C:\Users\鍩嶾Desktop\zhiwenceshi\zhiwenceshi.ino: In function 'void loop()':

    C:\Users\鍩嶾Desktop\zhiwenceshi\zhiwenceshi.ino:23:19: warning: ISO C++ forbids comparison between pointer and integer [-fpermissive]

    C:\Users\鍩嶾Desktop\zhiwenceshi\zhiwenceshi.ino:27:25: warning: ISO C++ forbids comparison between pointer and integer [-fpermissive]

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp: In member function 'uint8_t Adafruit_Fingerprint::setPassword(uint32_t)':

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:54: warning: narrowing conversion of '(password >> 24)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

                                                          ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:30:21: note: in definition of macro 'GET_CMD_PACKET'

       uint8_t data[] = {__VA_ARGS__}; \

                         ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:3: note: in expansion of macro 'SEND_CMD_PACKET'

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

       ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:72: warning: narrowing conversion of '(password >> 16)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

                                                                            ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:30:21: note: in definition of macro 'GET_CMD_PACKET'

       uint8_t data[] = {__VA_ARGS__}; \

                         ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:3: note: in expansion of macro 'SEND_CMD_PACKET'

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

       ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:90: warning: narrowing conversion of '(password >> 8)' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

                                                                                              ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:30:21: note: in definition of macro 'GET_CMD_PACKET'

       uint8_t data[] = {__VA_ARGS__}; \

                         ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:3: note: in expansion of macro 'SEND_CMD_PACKET'

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

       ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:30:32: warning: narrowing conversion of 'password' from 'uint32_t {aka long unsigned int}' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

       uint8_t data[] = {__VA_ARGS__}; \

                                    ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:36:30: note: in expansion of macro 'GET_CMD_PACKET'

    #define SEND_CMD_PACKET(...) GET_CMD_PACKET(__VA_ARGS__); return packet.data[0];

                                  ^

    D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library\Adafruit_Fingerprint.cpp:265:3: note: in expansion of macro 'SEND_CMD_PACKET'

       SEND_CMD_PACKET(FINGERPRINT_SETPASSWORD, (password >> 24), (password >> 16), (password >> 8), password);

       ^

    C:\Users\城\AppData\Local\Temp\ccGIIyX3.ltrans0.ltrans.o: In function `loop':

    C:\Users\鍩嶾Desktop\zhiwenceshi/zhiwenceshi.ino:23: undefined reference to `fingerprint()'

    C:\Users\鍩嶾Desktop\zhiwenceshi/zhiwenceshi.ino:23: undefined reference to `fingerprint()'

    collect2.exe: error: ld returned 1 exit status

    "Adafruit_Fingerprint.h" 对应多个库
    已使用: D:\软件安装目录\Arduino\libraries\Adafruit_Fingerprint_Sensor_Library
    未使用:C:\Users\城\Documents\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master
    未使用:D:\软件安装目录\Arduino\libraries\Adafruit-Fingerprint-Sensor-Library-master
    exit status 1
    为开发板 Arduino/Genuino Uno 编译时出错。

    这个是报错的信息
    您需要登录后才可以回帖 登录 | 立即注册  

    本版积分规则

    热门推荐

    全国机器人等级考试配件购买
    全国机器人等级考试配件购
    本人想自己教小孩机器人等级考试,需要购买机器人等级考试的配件,可是淘宝上的太
    【Arduino】108种传感器系列实验(24)---水位传感器模块
    【Arduino】108种传感器系
    37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
    【Arduino】108种传感器系列实验(96)---433M无线发射接收模块
    【Arduino】108种传感器系
    37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
    【Arduino】108种传感器系列实验(93)---CSR8350蓝牙音乐模块
    【Arduino】108种传感器系
    37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
    【Arduino】108种传感器系列实验(89)--- 4*4位 RGB LED 全彩模块
    【Arduino】108种传感器系
    37款传感器与模块的提法,在网络上广泛流传,其实Arduino能够兼容的传感器模块肯定是
    Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   ( 蜀ICP备14017632号-3 )
    快速回复 返回顶部 返回列表