Skip to content

se5a/T3Libs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T3Libs

While looking around for a more powerful alternative to an Arduino I found the new Teensy 3.0 on Kickstarter. I've already some experience with ATmega and ATtiny in the Arduino IDE. To use the Teensy in my existing environment I started to write a RFM12B driver. It's actually my first Arduino library.

I'm not yet sure how this will evolve. I do have plans for my Teensy 3.0 but time is limited... Thanks for your interest and please send feedback.

Thomas

======== ##RFM12_T3##

Overview

A Teensy 3.0 library to communicate wirelessly using a HopeRF RFM12B module. The on-air protocol is compatible with the one used on JeeNodes. I actually developed it to exchange some messages with JeeNode clones.

Features

  • Completely compatible with JeeNodes
  • Mature interrupt handling based on RFM12B state
  • Very fast interrupt handling
  • Uses hardware CRC unit to calculate and verify CRCs
  • Creative use of the DRSSI bit allows a rough estimate of the signal strength (getDRSSI())
  • Reports AFC offset while receiving data (getAFCOffset())

Disadvantages

  • Driver assumes it's the only one doing SPI. Using anything else with SPI will most likely break stuff.
  • Driver assumes no one uses hardware CRC unit. Use it and stuff will break.

Must likely there are some more problems hiding. See github issues.

Required Files

Just clone this repository to your Arduino Sketches/libraries folder or copy the following two files in your own Sketch folder to make it work:

  • RF12_T3.h
  • RF12_T3.cpp

Current State

The driver is work-in-progress, a 0.something version. I'm able to send and receive data from other wireless nodes and internal error handling is improving fast. There is still room for improvements but the driver is working stable. The external interface will most likely change a bit soon.

se5a's version: In an attempt to make the IRQ pin easier to change, I've made these changes to the library: RF12_T3.h: created #define IRQPIN and used IRQPIN where the irq pin was referenced renamed irqLine4 to irqLineT3 renamed _handleIrq4 to _handleIrqT3 RF12_T3.cpp: renamed _handleIrq4 to _handleIrqT3 rf12_t3_demo.ino: renamed irqLine4 to irqLineT3

To change the IRQ pin to ie 25, all that is required is to change the #define IRQPIN 4 to #define IRQPIN 25

Wiring

._______.          .------.
|Teensy |          |RFM12b|
|     13o---SCK----oSCK   |
|     12o---MISO---oSDO   |
|     11o---MOSI---oSDI   |
|     10o---CS-----oSEL   |
|      4o---IRQ----oIRQ   |
'.......'          '......'

Don't forget power and ground :-)

Where To Get The Parts?

  • Teensy 3.0 (available soon)
  • RFM12b module (I highly recommend a breakout board as it has non-standard pin spacing)
  • I do recommend a solderless breadboard and some wires to connect the stuff.

Addition Informations

Most of the information about the RFM12B SPI interface I got from the german site www.mikrocontroller.net.

The internal working of the driver is heavily based on jcw's work on jeelib.

About

Libraries for Teensy 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 51.1%
  • C 30.2%
  • Other 18.7%