Giter Club home page Giter Club logo

nrf905-arduino's Introduction

Hey there!

Twitter Blog

Languages

C C++ C#

TypeScript JavaScript PHP

Electronics & Embedded

Raspberry Pi Arduino ESP ARM

EAGLE CAD Altium Designer

Web Things

NodeJS Nginx MongoDB MySQL

AWS Heroku

nrf905-arduino's People

Contributors

markusfelix avatar zakkemble avatar zxpower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nrf905-arduino's Issues

Error on Compile

Hello,
When compiling any sketch on an Arduino Zero, this error message is returned.
Any help is appreciated.
Thanks.
Compilation error: cannot allocate an object of abstract type 'arduino::HardwareSPI'
C:\Users****\Documents\Arduino\libraries\nRF905_Radio_Library\src/nRF905.h:179:12: error: cannot declare parameter 'spi' to be of abstract type 'arduino::HardwareSPI'
SPIClass spi,

[ESP8266/ESP32] 'usingInterrupt' does not work

Heya - the old version of your device driver works with the ESP8266/ESP32 chips but this one does not compile due to the lacking implementation in the SPI classes of those chips - ref: esp8266/Arduino#1943 (comment)
So line 212,213 and 233:6 are affected, the attachInterrupt function from line 225 is working fine so is there a chance to convert the usingInterrupt code over?

Library not working with latest ESP32 framework (fix inside)

Hi,

I wanted to use this library for a project of mine, but encountered some problems. On my laptop the library didn't work at all and on my PC it was fine (testing with the debug sketch, via platform.io). Turns out, the ESP framework had an update recently and my laptop was using this one while my PC used a very old one. I tried a few versions, and everything above version 5.0.0 causes the library to stop working.

After some research, I found the following issue: espressif/arduino-esp32#7556. Here a commit was references adding some functionality regarding thread safety for SPI on the ESP32: espressif/arduino-esp32@bdeef89

This commit adds a destructor for the SPI class, which is the root of the problem. This destructor is called instantly after running the library's begin() function, causing the SPI interface to stop working (took a bit of time to figure this one out).

Inspecting the code of this library, I noticed that the SPIClass object passed in the begin() function was not passed as reference, causing the object to be copied instead. This caused the copy to be destroyed after the begin functions ends (since it no longer has references), which in turn calls the new destructor. At this point, the library doesn't work anymore. If you run the debug sketch, it will say "All registers read as 0xFF or 0x00! Is the nRF905 connected correctly?".

The fix was pretty simple though. I modified this library slightly to pass the SPI instance via the constructor as reference, and now it works again as the destructor is no longer called :) I also added that the library starts the SPI class automatically when calling begin().

You can look at it here: https://github.com/Xanderr/nRF905-arduino. If you want, I can make a PR for this?

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.