Giter VIP home page Giter VIP logo

rfm69_softspi's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

rfm69_softspi's Issues

Sending Data with SoftSPI

Hello,

I have implemented your lib to use RFM69 with Arduino MEGA. I will use your lib on this device because I will use this with Ethernet shield. All incoming Data will be OK, but when is send an Text, that will don’t be receive on the partner.
When I change the lib to the standard lib of Felix and change the wiring to the hardware pins 50 – 53, all is fine.

My wiring is:

RFM69 <-> Arduino MEGA
GND <-> GND
3,3 <-> 3,3V
DIO0 <-> Pin2
SCK <-> Pin 14
MOSI <-> Pin 15
MISO <-> Pin 16
NSS <-> Pin 17

The Pin 2, 14, 15, 16, 17 are all connected with an level-shifter module.

Lib from Felix with this code: send works fine, receive works fine
Lib from you with this code: send won`t work, receive works fine

So what`s wrong?

Here is the code:___________________________________________________________
#define NODEID 47
#define NETWORKID 100 //the same on all nodes that talk to each other (range up to 255)
#define GATEWAYID 1
#define FREQUENCY RF69_868MHZ
#define ENCRYPTKEY "unyu2x5b2rwx2nj4"
#define IS_RFM69HW
#include <RFM69.h>
#include <SPI.h>
#include <SimpleDHT.h>
unsigned long current_uptime, last_loop;
int loop_time = 1000; //100 Millisekunden
RFM69 radio;
//----------------------------------------------------------------------------------------------------------
// SETUP
//----------------------------------------------------------------------------------------------------------
void setup() {
Serial.begin(9600);
radio.initialize(FREQUENCY, NODEID, NETWORKID);
radio.setHighPower(); //uncomment only for RFM69HW!
radio.encrypt(ENCRYPTKEY);
Serial.println(F("Setup finished T47->0.2"));
}
//----------------------------------------------------------------------------------------------------------
// LOOP
//----------------------------------------------------------------------------------------------------------
void loop() {
current_uptime = millis();
// RFM69 check permanently
if (radio.receiveDone())
{
Serial.println(F("receiveDone---------------------------------------------------"));
Serial.print('['); Serial.print(radio.SENDERID, DEC); Serial.print("] ");
for (byte i = 0; i < radio.DATALEN; i++)
Serial.print((char)radio.DATA[i]);
Serial.print(" [RX_RSSI:"); Serial.print(radio.RSSI); Serial.println("]");
}
// Every sec.-----------------------------------------------------------
if ((current_uptime > last_loop) || (last_loop > current_uptime && last_loop > 9999999999999))
{
radio.send(255, "Hello", 6);
last_loop = current_uptime + loop_time;
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.