Easy IoT General

library problem on github

userHead verenicolson 2019-09-17 19:22:01 5836 Views5 Replies
Just did fresh download from https://github.com/DFRobot/DFRobot_SIM7000 and used the example DFRobot_SIM7000_http from that download (Also fresh download of https://github.com/DFRobot/DFRobot_SIM tonight) and the current github code won't compile. get this error
Arduino: 1.8.9 (Windows 10), Board: "Arduino/Genuino Uno"

In file included from C:\Users\vere.nicolson\Documents\Arduino\SketchBook\DFRobotSIM7000HTTPtest\DFRobotSIM7000HTTPtest.ino:18:0:

C:\Users\vere.nicolson\Documents\Arduino\libraries\DFRobot_SIM7000-master/DFRobot_SIM7000.h:9:6: error: multiple definition of 'enum Protocol'

enum Protocol {

^

In file included from C:\Users\vere.nicolson\Documents\Arduino\libraries\DFRobot_SIM-master/DFRobot_SIM.h:7:0,

from C:\Users\vere.nicolson\Documents\Arduino\SketchBook\DFRobotSIM7000HTTPtest\DFRobotSIM7000HTTPtest.ino:12:

C:\Users\vere.nicolson\Documents\Arduino\libraries\DFRobot_SIM-master/DFRobot_SIMclient.h:6:6: note: previous definition here

enum Protocol {

^

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
2022-01-27 16:59:48 Thanks for sharing. I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.
slope game
userHeadPic dwenceri484
2019-09-18 18:51:24 Yes I had included <DFRobot_SIM.h> Thank you

Now I have removed <DFRobot_SIM.h> it compiles but the serial output stopped at
"Turn ON SIM7000......"
This happened with both the HTTP and the AT examples so I thought there might be a problem before the boolean "sim7000.turnON()" is decided in the DFRobot_SIM7000.cpp file

To test I put the following debugs into the DFRobot_SIM7000.cpp file
" bool DFRobot_SIM7000::turnON(void)
{
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(2000);
digitalWrite(12, LOW);
int i=3;
while(1){
Serial.println(F("in the [while(1) loop")); //VN inserted
i = 6;
delay(200);
baudrate = 19200;
setRate(baudrate);
send_cmd("AT\r\n");
while(i){
if(check_send_cmd("AT\r\n","OK",1,1000)){
return true;
Serial.println(F("in the true part of [ if(check_send_cmd())]")); //VN inserted
}
delay(20);
Serial.println(F("in the flase part of [ if(check_send_cmd())]")); //VN inserted
i--;
}
pinMode(12,OUTPUT);
digitalWrite(12, HIGH);
delay(2000);
digitalWrite(12, LOW);
}
} "

The resulting output was
" Turn ON SIM7000......
in the [while(1) loop
in the flase part of [ if(check_send_cmd())]
in the flase part of [ if(check_send_cmd())]
in the flase part of [ if(check_send_cmd())]
in the flase part of [ if(check_send_cmd())]
in the flase part of [ if(check_send_cmd())]
in the flase part of [ if(check_send_cmd())]
in the [while(1) loop
in the flase part of [ if(check_send_cmd())] "


Can you suggest a next step to see if this is a software or hardware issue?
userHeadPic verenicolson
2019-09-17 19:30:13 problem above was on Arduino IDE version 1.8.9 userHeadPic verenicolson