정보나눔

오픈소스하드웨어 프로젝트에 대한 다양한 정보를 나누는 공간입니다.

설치해도 오류가 계속되어요 ㅠㅠ
호진 | 2015-07-06

DHT11.cpp:12: error: 'DHT11' does not name a type
 DHT11::DHT11(int pin_number) {
 ^
DHT11.cpp:23: error: 'DHT11' has not been declared
 unsigned long DHT11::waitFor(uint8_t target, unsigned long time_out_us) {
               ^
DHT11.cpp: In function 'long unsigned int waitFor(uint8_t, long unsigned int)':
DHT11.cpp:26: error: invalid use of 'this' in non-member function
  while(digitalRead(this->pin)!=target)
                    ^
DHT11.cpp: At global scope:
DHT11.cpp:34: error: 'DHT11' has not been declared
 void DHT11::waitFor(uint8_t target) {
      ^
DHT11.cpp: In function 'void waitFor(uint8_t)':
DHT11.cpp:35: error: invalid use of 'this' in non-member function
  while(digitalRead(this->pin)!=target);
                    ^
DHT11.cpp: At global scope:
DHT11.cpp:39: error: 'DHT11' has not been declared
 byte DHT11::readByte() {
      ^
DHT11.cpp: In function 'byte readByte()':
DHT11.cpp:46: error: invalid use of 'this' in non-member function
   if(digitalRead(this->pin)==HIGH) //if HIGH status lasts for 30us, the bit is 1;
                  ^
DHT11.cpp: At global scope:
DHT11.cpp:55: error: 'DHT11' does not name a type
 DHT11::~DHT11() {
 ^
DHT11.cpp:65: error: 'DHT11' has not been declared
 int DHT11::read(float& humidity, float& temperature) {
     ^
DHT11.cpp: In function 'int read(float&, float&)':
DHT11.cpp:66: error: invalid use of 'this' in non-member function
  if((millis()-this->last_read_time<DHT11_RETRY_DELAY)&&this->last_read_time!=0) return -1;
               ^
DHT11.cpp:66: error: 'DHT11_RETRY_DELAY' was not declared in this scope
  if((millis()-this->last_read_time<DHT11_RETRY_DELAY)&&this->last_read_time!=0) return -1;
                                    ^
DHT11.cpp:66: error: invalid use of 'this' in non-member function
  if((millis()-this->last_read_time<DHT11_RETRY_DELAY)&&this->last_read_time!=0) return -1;
                                                        ^
DHT11.cpp:68: error: 'pin' was not declared in this scope
  pinMode(pin,OUTPUT);
          ^
DHT11.cpp:78: error: invalid use of 'this' in non-member function
  byte hI=this->readByte();
          ^
DHT11.cpp:79: error: invalid use of 'this' in non-member function
  byte hF=this->readByte();
          ^
DHT11.cpp:80: error: invalid use of 'this' in non-member function
  byte tI=this->readByte();
          ^
DHT11.cpp:81: error: invalid use of 'this' in non-member function
  byte tF=this->readByte();
          ^
DHT11.cpp:82: error: invalid use of 'this' in non-member function
  byte cksum=this->readByte();
             ^
DHT11.cpp:89: error: invalid use of 'this' in non-member function
  this->last_read_time=millis();
  ^
'DHT11' does not name a type

 

이전글   |    오류메세지입니다 2015-07-06
다음글   |    코딩문의 드려요~~ 2015-07-06