BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

(Having problems with my libraries) Arduino UNO + GSM + DHT11 + Soil Moisture + RF Transmitter

nonblynkrelated

#1

Im having problems with my libraries. The <PinChangeInterruptHandler.h> and <SoftwareSerial.h>. I dont know how to get rid of the problem so it can upload in my board. This is the RX codes.





#2

Hello,

To start with… We help you learn about Blynk here… We don’t troubleshoot your IDE and non-Blynk related library issues :wink:

Try Googling your errors.

Secondly, even if it where Blynk related… Don’t post screenshots of text, instead copy and paste your full code as well as the full output of the compiling error.

Properly formatted after pasting it here… as required…

Blynk - FTFC


#3

so heres my codes. and im using blynk

#include <PinChangeInterruptBoards.h>
#include <PinChangeInterruptHandler.h>

#define BLYNK_PRINT Serial
#define TINY_GSM_MODEM_SIM900
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>

#include <PinChangeInterruptHandler.h>
#include <RFReceiver.h>

RFReceiver receiver (5);

char auth[] = "53fe32cfcbc24f5282f113ce421ee0f5";
char apn[] = "internet.globe.com.ph";
char user[] = "";
char pass[] = "";

#include <SoftwareSerial.h>
SoftwareSerial SerialAT (2, 3);

TinyGsm modem (SerialAT);

BlynkTimer timer;


void setup() {
  receiver.begin();
  Serial.begin(115200);
  delay(10);
  SerialAT.begin(115200);
  delay(3000);
  Serial.println("Initializing modem.... ");
  modem.restart();

  Blynk.begin(auth, modem, apn, user, pass);
  timer.setInterval(1000L, sendSensor);
}

void sendSensor() {
  char msg[MAX_PACKAGE_SIZE];
  char msg1[MAX_PACKAGE_SIZE];
  char msg2[MAX_PACKAGE_SIZE];
  byte senderId = 0;
  byte packageId = 0;
  byte senderId1 = 1;
  byte packageId1 = 1;
  byte senderId2 = 2;
  byte packageId2 = 2;
  byte len = receiver.recvPackage((byte *)msg, &senderId, &packageId);
  byte len1 = receiver.recvPackage((byte *)msg1, &senderId1, &packageId1);
  byte len2 = receiver.recvPackage((byte *)msg2, &senderId2, &packageId2);
  if (isnan(atof(msg1))||isnan(atof(msg))){
    Serial.println("Failed to read from DHT sensor!");
    return;
  }
  Blynk.virtualWrite(V2, msg1);
  Blynk.virtualWrite(V1, msg);
  if (atof(msg)>30){
    Blynk.email("garciasittie21@gmail.com", "Temperature Increased over limit.");
    Blynk.notify("Temperature Increased over limit.");
    
  }
  
}

void loop() {
  Blynk.run();
  timer.run();
  

}

#4

and this is the error when im verifying it

libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `__vector_3':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.cpp:229: multiple definition of `__vector_3'

libraries\PinChangeInterruptHandler-master\PinChangeInterruptHandler.cpp.o:C:\Users\sittiegarcia\Documents\Arduino\libraries\PinChangeInterruptHandler-master/PinChangeInterruptHandler.cpp:192: first defined here

libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.cpp:394: multiple definition of `__vector_4'

libraries\PinChangeInterruptHandler-master\PinChangeInterruptHandler.cpp.o:C:\Users\sittiegarcia\Documents\Arduino\libraries\PinChangeInterruptHandler-master/PinChangeInterruptHandler.cpp:172: first defined here

libraries\SoftwareSerial\SoftwareSerial.cpp.o: In function `SoftwareSerial::read()':

C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\SoftwareSerial\src/SoftwareSerial.cpp:394: multiple definition of `__vector_5'

libraries\PinChangeInterruptHandler-master\PinChangeInterruptHandler.cpp.o:C:\Users\sittiegarcia\Documents\Arduino\libraries\PinChangeInterruptHandler-master/PinChangeInterruptHandler.cpp:172: first defined here

collect2.exe: error: ld returned 1 exit status

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.

#5

im sorry i dont know how to edit it properly formatted. im new here btw


#6

Everyone is new the first time here… that is what the Welcome Topic and instructions are for :stuck_out_tongue:

I formatted your last posts.

Your issue, whatever it is exactly, is NOT Blynk related, rather it appears to do with SoftwareSerial and those PinChanger libraries… I recommend you start with a basic sketch and slowly add a library at a time until you determine the exact one that the IDE is having a problem with, then Google any errors.


#7

thank you for the suggestion :blush: