Using Teensy Encoder Library for Fubarino

Post Reply
cb725
Posts: 7
Joined: Wed Nov 01, 2017 2:26 pm

Using Teensy Encoder Library for Fubarino

Post by cb725 » Mon Nov 13, 2017 7:24 pm

I have been using the Teensy for a few different projects, but I do have to say that I am a bigger fan of the Fubarino. In saying this, I am trying to make the Encoder library from the Teensy site work with the Fubarino.

The problem I am having is that to use any board with this library, the board must be set up in the interrupt_pins header file. For example, the UNO32 from chipKit is included with the following format.

Code: Select all

// Chipkit Uno32 - attachInterrupt may not support CHANGE option
#elif defined(__PIC32MX__) && defined(_BOARD_UNO_)
  #define CORE_NUM_INTERRUPT	5
  #define CORE_INT0_PIN		38
  #define CORE_INT1_PIN		2
  #define CORE_INT2_PIN		7
  #define CORE_INT3_PIN		8
  #define CORE_INT4_PIN		35
I would like to add the Fubarino as an option as well, but have not been successful in doing so. The following is what I have, but compiling it still gives me an error saying that the board is not recognized.

Code: Select all

// Fubarino Mini
#elif defined(__PIC32MX__) && defined(_BOARD_FUBARINO_MINI__) <---------I am guessing I have the board name wrong and or the the PIC32 wrong as well
    #define CORE_NUM_INTERRUPT	5
    #define CORE_INT0_PIN       24
    #define CORE_INT1_PIN	3
    #define CORE_INT2_PIN	0
    #define CORE_INT3_PIN	6
    #define CORE_INT4_PIN	4
Any help, would be greatly appreciated.

cb

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Using Teensy Encoder Library for Fubarino

Post by EmbeddedMan » Mon Nov 13, 2017 9:20 pm

I think what you want is

Code: Select all

_BOARD_FUBARINO_MINI_
(Only one underscore at end)

Give that a try.

P.S. You can find the board defines in the boards.txt file. Each board has a section, and the *.build.board= line will tell you the name of the define just for that board.

*Brian

cb725
Posts: 7
Joined: Wed Nov 01, 2017 2:26 pm

Re: Using Teensy Encoder Library for Fubarino

Post by cb725 » Mon Nov 13, 2017 9:58 pm

Thanks Brian. I was looking for that the text file, but wasn't quite sure where it was.

cb

Post Reply