查看: 6726|回复: 4

库文件明明已经安装成功 编译找不到文件

[复制链接]

9

主题

16

帖子

67

积分

注册会员

Rank: 2

积分
67
发表于 2021-9-23 18:23:13 | 显示全部楼层 |阅读模式

库文件明明已经安装成功 编译仍然不通过

src\main.cpp:3:10: fatal error: ads1015.h: No such file or directory

回复

使用道具 举报

27

主题

80

帖子

1044

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1044
发表于 2021-9-23 18:59:09 | 显示全部楼层
请重新表述下你的问题,用的哪个库,编译时main.cpp代码贴出来,不然很难解答你的问题
回复

使用道具 举报

9

主题

16

帖子

67

积分

注册会员

Rank: 2

积分
67
 楼主| 发表于 2021-9-24 07:45:19 | 显示全部楼层
文涛 发表于 2021-9-23 18:59
请重新表述下你的问题,用的哪个库,编译时main.cpp代码贴出来,不然很难解答你的问题 ...

比如这个,明明写了ads129r.h但是还是说没有找到这个库!
image.png
回复

使用道具 举报

27

主题

80

帖子

1044

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1044
发表于 2021-9-24 09:12:05 | 显示全部楼层
biubiu 发表于 2021-9-24 07:45
[md]

比如这个,明明写了ads129r.h但是还是说没有找到这个库!
1.报错不是说ads1292r.h库找不到,而是说spi.h库找不到,问题在于你的引用格式不对2.之后再下载类似的库,参见这个链接中的库下载使用说明步骤
http://www.stduino.com/forum.php ... =1&extra=#pid18

3.ads1292r.h库正确使用示例
  1. #include <arduino.h>
  2. #include "protocentralAds1292r.h"
  3. #include "ecgRespirationAlgo.h"
  4. #include <SPI.h>

  5. volatile uint8_t globalHeartRate;
  6. volatile uint8_t globalRespirationRate=0;

  7. const int ADS1292_DRDY_PIN = 26;
  8. const int ADS1292_CS_PIN = 13;
  9. const int ADS1292_START_PIN = 14;
  10. const int ADS1292_PWDN_PIN = 27;

  11. int16_t ecgWaveBuff, ecgFilterout;
  12. int16_t resWaveBuff,respFilterout;

  13. long timeElapsed=0;

  14. ads1292r ADS1292R;
  15. ecg_respiration_algorithm ECG_RESPIRATION_ALGORITHM;

  16. void setup()
  17. {
  18.   delay(2000);

  19.   SPI.begin();
  20.   SPI.setBitOrder(MSBFIRST);
  21.   //CPOL = 0, CPHA = 1
  22.   SPI.setDataMode(SPI_MODE1);
  23.   // Selecting 1Mhz clock for SPI
  24.   SPI.setClockDivider(SPI_CLOCK_DIV16);

  25.   pinMode(ADS1292_DRDY_PIN, INPUT);
  26.   pinMode(ADS1292_CS_PIN, OUTPUT);
  27.   pinMode(ADS1292_START_PIN, OUTPUT);
  28.   pinMode(ADS1292_PWDN_PIN, OUTPUT);
  29.   Serial.begin(57600);

  30.   ADS1292R.ads1292Init(ADS1292_CS_PIN,ADS1292_PWDN_PIN,ADS1292_START_PIN);  //initalize ADS1292 slave
  31.   Serial.println("Initiliziation is done");
  32. }

  33. void loop()
  34. {
  35.   ads1292OutputValues ecgRespirationValues;
  36.   boolean ret = ADS1292R.getAds1292EcgAndRespirationSamples(ADS1292_DRDY_PIN,ADS1292_CS_PIN,&ecgRespirationValues);

  37.   if (ret == true)
  38.   {
  39.     ecgWaveBuff = (int16_t)(ecgRespirationValues.sDaqVals[1] >> 8) ;  // ignore the lower 8 bits out of 24bits
  40.     resWaveBuff = (int16_t)(ecgRespirationValues.sresultTempResp>>8) ;

  41.     if(ecgRespirationValues.leadoffDetected == false)
  42.     {
  43.       ECG_RESPIRATION_ALGORITHM.ECG_ProcessCurrSample(&ecgWaveBuff, &ecgFilterout);   // filter out the line noise @40Hz cutoff 161 order
  44.       ECG_RESPIRATION_ALGORITHM.QRS_Algorithm_Interface(ecgFilterout,&globalHeartRate);// calculate
  45.       
  46.       //disable below 2 lines if you want to run with arduino uno. (arduino uno does not have the memory to do all processing together)
  47.       respFilterout = ECG_RESPIRATION_ALGORITHM.Resp_ProcessCurrSample(resWaveBuff);
  48.       ECG_RESPIRATION_ALGORITHM.RESP_Algorithm_Interface(respFilterout,&globalRespirationRate);

  49.     }else{

  50.       ecgFilterout = 0;
  51.       respFilterout = 0;
  52.     }

  53.     if(millis() > timeElapsed)  // update every one second
  54.     {
  55.       if(ecgRespirationValues.leadoffDetected == true) // lead in not connected
  56.       {
  57.         Serial.println("ECG lead error!!! ensure the leads are properly connected");
  58.       }else{

  59.         Serial.print("Heart rate: ");
  60.         Serial.print(globalHeartRate);
  61.         Serial.println("BPM");
  62.         Serial.print("Respiration Rate :");
  63.         Serial.println(globalRespirationRate);
  64.       }
  65.       timeElapsed += 1000;
  66.     }
  67.   }
  68. }
复制代码

回复

使用道具 举报

9

主题

16

帖子

67

积分

注册会员

Rank: 2

积分
67
 楼主| 发表于 2021-9-24 17:09:10 | 显示全部楼层
文涛 发表于 2021-9-24 09:12
1.报错不是说ads1292r.h库找不到,而是说spi.h库找不到,问题在于你的引用格式不对2.之后再下载类似的库, ...

[md]还有这个也是
2.png
8CH[DGM)`1GHKEA7VO6B$$N.png
8CH[DGM)`1GHKEA7VO6B$$N.png
回复

使用道具 举报

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

本版积分规则

热门推荐

Stduino IDE一款高效、快速开发Stduino stm32 arm的工具
Stduino IDE一款高效、快
开发Stduino软硬件原因 想学STM32的32位ARM单片机,但不想读厚厚的技术文档, 不想记
Stduino 零基础入门课程系列(五) 实验三:按键输入
Stduino 零基础入门课程系
Hello!各位同学大家好~上节课我们利用管脚输出高低电平信号,控制LED的亮灭,那么我
Stduino小白练习第六弹--按键控制串口通信
Stduino小白练习第六弹--
2020/01/08 星期三 作者:Astilbe 问题:我们如何通过按下按键来传输固定的信息给PC呢
37种传感器(二十九)MPU6050陀螺仪模块+Stduino Nano&UNO
37种传感器(二十九)MPU6
StduinoUno /纳米37种传感器(二十九)六轴 MPU陀螺仪模块关键词: 51 ; stm32 ; ar
stm32 最小系统 小蓝板 LED闪烁灯(三),无需刷Bootloader
stm32 最小系统 小蓝板 LE
关键词:stm32 小蓝板 STM32F103C8T6 Stduino IDE Stduino Nano LED闪烁灯 通过Stduin
Stduino IDE软件下载专区
Stduino IDE软件下载专区
Stduino IDE软件下载专区 Windows版:7月29号发布1.01, 现可
今天在文涛老大的帮助下我的stm32zet6终于把simlpefoc库跑起...
今天在文涛老大的帮助下我
[md]首先本身是刚刚从MDK转到arduino过来的新人,只因为要完开源的simplefoc,期间由
©2001-2018  Stduino官网  Powered by©Discuz!   ( 皖ICP备17011998号 )
快速回复 返回顶部 返回列表