?>

Hard Copy World

HCW

Q&A

Home > Forum >

Q&A

질문 | 층간소음 측정기에 esp8266 적용하기

페이지 정보

작성자 yoloula 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일18-01-11 17:59 조회20회 댓글0건

본문

아래 답변 주신 것 보고 보드 연결하여 간단한 예제 동작하는 걱까지 확인했습니다

층간소음 측정기 코드를 수정해야하는데 혼자 해볼려고 했으나 이해가 되지 않는 부분이 많네요..

아래는 오류 메시지 입니다. 도움주시면 감사하겠습니다

아두이노:1.8.5 (Windows 10), 보드:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, 4M (1M SPIFFS), v2 Prebuilt (MSS=536), Disabled, None, 115200"

In file included from C:\Users\LSJ\Documents\Arduino\noise\noise.ino:5:0:

C:\Program Files (x86)\Arduino\libraries\Adafruit_CC3000_Library-master/utility/debug.h:28:22: error: section attribute not allowed for 'prog_char'

 typedef char PROGMEM prog_char;

                      ^

noise:44: error: 'int index' redeclared as different kind of symbol

 int index = 0;

    ^

In file included from C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include/stdlib.h:11:0,

                from C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:27,

                from sketch\noise.ino.cpp:1:

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include/string.h:54:15: error: previous declaration of 'char* index(const char*, int)'

 char  *_EXFUN(index,(const char *, int));

              ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0/tools/sdk/libc/xtensa-lx106-elf/include/_ansi.h:65:30: note: in definition of macro '_EXFUN'

 #define _EXFUN(name, proto)  name proto

                              ^

C:\Users\LSJ\Documents\Arduino\noise\noise.ino: In function 'void loop()':

noise:152: error: invalid cast from type 'char* (*)(const char*, int)' to type 'float'

    AvgNoiseMin = (float)PeakToPeakAvg / (float)(index + 1);

                                                          ^

noise:192: error: call of overloaded 'println(char* (*)(const char*, int))' is ambiguous

    Serial.println(index + 1);

                            ^

C:\Users\LSJ\Documents\Arduino\noise\noise.ino:192:29: note: candidates are:

In file included from C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Stream.h:26:0,

                from C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/HardwareSerial.h:31,

                from C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Arduino.h:246,

                from sketch\noise.ino.cpp:1:

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:83:16: note: size_t Print::println(char) <near match>

        size_t println(char);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:83:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'char'

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:84:16: note: size_t Print::println(unsigned char, int) <near match>

        size_t println(unsigned char, int = DEC);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:84:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'unsigned char'

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:85:16: note: size_t Print::println(int, int) <near match>

        size_t println(int, int = DEC);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:85:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'int'

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:86:16: note: size_t Print::println(unsigned int, int) <near match>

        size_t println(unsigned int, int = DEC);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:86:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'unsigned int'

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:87:16: note: size_t Print::println(long int, int) <near match>

        size_t println(long, int = DEC);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:87:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'long int'

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:88:16: note: size_t Print::println(long unsigned int, int) <near match>

        size_t println(unsigned long, int = DEC);

                ^

C:\Users\LSJ\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.0\cores\esp8266/Print.h:88:16: note:  no known conversion for argument 1 from 'char* (*)(const char*, int)' to 'long unsigned int'

noise:213: error: assignment of function 'char* index(const char*, int)'

    index = 0;

          ^

noise:213: error: cannot convert 'int' to 'char*(const char*, int)' in assignment

noise:219: error: ISO C++ forbids incrementing a pointer of type 'char* (*)(const char*, int)' [-fpermissive]

    index++;

          ^

noise:219: error: lvalue required as increment operand

exit status 1
'int index' redeclared as different kind of symbol

이 리포트는 파일 -> 환경설정에 "컴파일중 자세한 출력보이기"를
활성화하여 더 많은 정보를
보이게 할 수 있습니다.

댓글목록

등록된 댓글이 없습니다.