Coder Social home page Coder Social logo

cc1101_full_spi's Introduction

CC110x Library that supports full SPI

Description:

This is a library that I'm using to get Full SPI working with transactions. It currently works with a Teensy 3.1/3.2. This will be tested on other platforms like Cortex M0's, Atmel SAMDxx, Espressif ESP8266, Espressif ESP32, etc. I'm open to requests to create compatibility with other platforms.

I cannot take full credit for this project, as I have leveraged other peoples' work-in-progress and started experimenting to make it work correctly. I did find other SPI libraries for the CC110x but either they were unstable, outdated, or just did not work properly. My goal is to get this working fully. I have it working today on a Teensy 3.1/3.2 and have tested on the platforms listed below.

I have added a Receive Example, it's set for 315MHz right now. It can be easily changed to any of the CC110x supported frequencies. I'm using some cheap modules purchased off eBay. They were originally designed to work at 433MHz, but I am able to send and receive in the 315MHz range. I'm sure it's not 100% ideal; however it does work. I have not tested higher ranges yet.

The Receive Example is mainly for devices that do not have Multi-Core. I will build a separate example for the Espressif ESP32 in the near future. Eventually, I will consolidate all examples down to a single RX example, and a single TX Example.

Most random issues experienced (e.g. not always sending data) have been cleaned up and no longer happen.

I've add what I call cc11xxOptions, which gives you the ability to assign the Chip Select, GDO0, and GDO2 pins right from the sketch. This is the step forward (I think) to be able to run multiple radios.

Example:

#include <SPI.h>
#include <cc1101.h>
#include <ccpacket.h>

CC1101 cc1101;

const int dataReadyPin = 2;
const int chipSelectPin = 10;
...
SPI.begin();
pinMode(dataReadyPin, INPUT);
pinMode(chipSelectPin, OUTPUT);
// Call your config options before you initiate your radio
cc1101.cc11xx_cfg.CS_pin = chipSelectPin;
cc1101.cc11xx_cfg.GDO0_pin = dataReadyPin;

cc1101.init();
...

Features:

  • Arduino code to get everything running
  • Full SPI Support
  • Ability to define Chip Select, GDO0, and GDO2 pins in the sketch.

Beta right now:

  • Receiving packets >64 bytes

Known Working MCU

  • Teensy 3.1/3.2
  • Teensy 3.5/3.6
  • Teensy LC
  • Adafruit Feather M0
  • Espressif ESP32

Future:

  • Compatibility
  • Multiple CC110x modules (Maybe)
  • Trasmit packets >64 bytes

cc1101_full_spi's People

Contributors

sorscode avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pickeditmate

cc1101_full_spi's Issues

byte thing

Hi,
I am trying to use your code but line # 149 < byte thing[] = {0x20, 0x48, 0x69, 0x20, 0x50, 0x75, 0x6e, 0x6b}; > seems puzzling for me, I am trying to find out how the Hex registers in the byte thing array are related to the CC1101 default values or any other registers in the code in case if I want change or modify frequency registers on the SmartRF Studio.

Thank you in advance

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.