SparkFun RF Link 434MHz - Right library?

I’m trying to use the SparkFun RFLink 434MHz with the Manchester library, specifically RWS-371-6 Receiver and TWS-BS-3 Transmitter, but I can’t get anything to work. Current receiver code:

// This #include statement was automatically added by the Particle IDE.
#include "SparkIntervalTimer/SparkIntervalTimer.h"

// This #include statement was automatically added by the Particle IDE.
#include "Manchester/Manchester.h"

#define RX_PIN D3
#define LED_PIN D2

#define KILL_OUT D4
#define KILL_IN D5

uint8_t moo = LOW;

void setup() {
    // Delay in case I f* something up
    delay(5000);
    
    // Initialize led pin for output
    pinMode(LED_PIN, OUTPUT);
    
    // Turn it off
    digitalWrite(LED_PIN, moo);
    
    // Init killOn and killOf
    pinMode(KILL_OUT, OUTPUT);
    pinMode(KILL_IN, INPUT_PULLDOWN);
    
    // Make sure killOut has power
    digitalWrite(KILL_OUT, HIGH);
    
    // Setup Manchester Library
    man.setupReceive(RX_PIN, MAN_4800);
    man.beginReceive();
}

void loop() {
    uint8_t receiveComplete = man.receiveComplete();
    if(digitalRead(KILL_IN) == HIGH){
        Spark.publish("Receive Complete",String(receiveComplete, DEC));
    }
    
    if(receiveComplete) {
        uint16_t msg = man.getMessage();
        if(digitalRead(KILL_IN) == HIGH){
            // Check to see if the message was for me
            Spark.publish("In byte",String(msg, DEC));
        }
        if(msg == 10) {
            // Turn LED on
            digitalWrite(LED_PIN, HIGH);
        }
    }
}

Transmitter code is basically straight out of the example as well, but using pin D1 instead of D2.

Any and all help would be appreciated, even if it’s pointing out that I’m doing everything wrong… I was assuming this would be much more painless than it has turned out to be (spent a day using Serial1/2 an the TX/RX until I started looking for libraries).

Thanks.

I’m having the same issue… To complete this picture, I’m going to post my transmitter code.

#include "SparkIntervalTimer/SparkIntervalTimer.h"

// This #include statement was automatically added by the Particle IDE.
#include "Manchester/Manchester.h"

#define TX_PIN	D1	//pin where your transmitter is connected
#define LED_PIN	D2	//pin for blinking LED

uint8_t moo = 1; //last led status
uint16_t transmit_data = 10;

void setup() {
    pinMode(LED_PIN, OUTPUT);
    digitalWrite(LED_PIN, moo);
    man.workAround1MhzTinyCore(); //add this in order for transmitter to work with 1Mhz Attiny85/84
    man.setupTransmit(TX_PIN, MAN_4800);
}

void loop() {
    man.transmit(transmit_data);
    digitalWrite(LED_PIN,HIGH);
    delay(1000);
    digitalWrite(LED_PIN,LOW);
    delay(1000);
}

I ended up going with the nRF24L01+ instead with the SPARKCORE-RF24 library on the Build WebIDE. This post was long but got me through it, and now my RF pair is working.

1 Like