Blynk with RCSwitch library

I can’t see to get Blynk to work with the RCSwitch library from
I am using Arduino over USB, and the arduino see the disconnect itself after I try to call the send function from RCSwitch.
Here is my code

#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11);
#define BLYNK_PRINT SwSerial
#include <BlynkSimpleSerial.h>

char auth[] = "SOME CHARACTERS HERE";

void setup() {

void loop() {;

  mySwitch.send(3852814, 24);

  mySwitch.send(3852806, 24);

I know my switch work and the code is correct.
I am not sure if this is how virtual pins are suppose to be used by the way.

Hey, you must realize that BLYNK_WRITE can be called twice if you push the button (once for button down and once for up). You can distinguish those by checking param.asInt().

Besides that I can’t see any problems. Actually I didn’t have a chance to use this module, maybe other guys?
Also, I don’t know haw much RAM can mySwitch.send use…

I tried it with a Mega as well, same result, so i don’t think it’s a lack of RAM issue.

You are using your digital pin 10 twice. In your SoftwareSerial and the RCSwitch. Change one of them to an other pin and it should work.

1 Like

I have no idea what

SoftwareSerial SwSerial(10, 11);

does actually, so 10 and 11 are actually pins? they can be anything? What are you suppose to connect to it?

These are the in- and output pins for the sowtware serial. ( )
You can change them to other pins that you don’t need. (with some limitations: )
The SoftwareSerial is used for the serial output that blynk creates.
If you don’t need that output you can disable it by deleting these lines:

#include <SoftwareSerial.h>
SoftwareSerial SWSerial(10,11);
#define BLYNK_PRINT SwSerial



@Scyl, @twobe seems to be right.
Please update us if it helped.

Yes! that worked, thanks everyone!!