查看: 2326|回复: 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 编译时出错。

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

    本版积分规则

    热门推荐

    创客火首发无人机编队套装,开启不一样的人工智能教育
    创客火首发无人机编队套装
    2017年国务院发布《新一代人工智能发展规划》,提出要广泛开展人工智能科普活动,在中
    【干货分享】mega2560原理图PCB图纸altium designer18
    【干货分享】mega2560原理
    分享一下mega2560的板子 AD版本 **** 本内容被作者隐藏 **** ergo
    无源蜂鸣器声音小
    无源蜂鸣器声音小
    声音太小,如何优化下电路
    自制WiFi天气时钟基于Blinker esp-01(8266) u8g2驱动12864 LCD屏
    自制WiFi天气时钟基于Blin
    先发个实物展示视频:https://www.bilibili.com/video/BV12k4y1679Q/ 第一次发分享
    一文教你选择Arduino开发板,小白进
    一文教你选择Arduino开发
    笔者在2016年接触了Arduino,跳了万条坑,行了千里弯,到今天也算是Arduino的一
    Copyright   ©2015-2016  Arduino中文社区  Powered by©Discuz!   
    快速回复 返回顶部 返回列表