Created Tue, 05 May 2015 08:31:24 +0000 by Tayeb
Tue, 05 May 2015 08:31:24 +0000
Am I missing something or am I wrong in assuming that there's no chipKIT compatible Firmata? Correct? Or is there Arduino Firmata that is compatible and compiles for chipKIT? When in doubt, and even for testing code, I use many times UECIDE, but it seems for example Standard Firmata does not compile.
Tue, 05 May 2015 11:56:12 +0000
Salut, I just tried to compile the Standard Firmata using the boards arduino Uno, ChipKit Uno32 and Max32. Worked fine on my side. It failed for ChipKit DP32. This is due to the compile directives in the boards definition file of firmata: UECIDE\cores\chipKIT\libraries\Firmata/Boards.h:291:2: error: #error "Please edit Boards.h with a hardware abstraction for this board"
I assume you use a board other than the Uno32 or Max32.
Ciao, Mathias
Tue, 05 May 2015 15:27:12 +0000
Thank you Gaston. I am trying to install in uC32.
In fact compiles for Uno32. The problem resides with uC32 with following error:
..\Documents\UECIDE\libraries\Firmata/Boards.h:354:2: error: #error "Please edit Boards.h with a hardware abstraction for this board"
How do I overcome the error?
Tue, 05 May 2015 18:49:24 +0000
Salut,
I added the following in the file boards.h at line 289 (right before the comment // anything else)
#elif defined(_BOARD_UC32_)
#define TOTAL_ANALOG_PINS 12
#define TOTAL_PINS 47 // 30 digital + 12 analog two digital are unuseable in firmata due to analog configuration (41 and 42)
#define VERSION_BLINK_PIN 13 // alternative LED2: 43
#define IS_PIN_DIGITAL(p) (((p) >= 2 && (p) <= 45)) // alternative to 40: 45
#define IS_PIN_ANALOG(p) ((p) >= 14 && (p) <= 25)
#define IS_PIN_PWM(p) IS_PIN_DIGITAL(p)
#define IS_PIN_SERVO(p) (((p) >= 2 && (p) <= 13 && (p) - 2 < MAX_SERVOS) || (((p) >= 26 && (p) <= 38 && (p) - 14 < MAX_SERVOS)))
#define IS_PIN_I2C(p) (0)
#define PIN_TO_DIGITAL(p) (p)
#define PIN_TO_ANALOG(p) ((p) - 14)
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
#define PIN_TO_SERVO(p) (p)<=13 ? (p)-2 : (p)-14
I took the numbers from the board.h file of the uC32 definition. Looks ok to me, but I may be wrong
Ciao, Mathias
Tue, 05 May 2015 21:19:00 +0000
Thanks a lot Mathias. I had been looking at the code and was thinking copying Uno32's code. Nevertheless a special gratitude. Ciao
Wed, 06 May 2015 17:54:21 +0000
I have already uploaded Firmata in uC32 without any compilation errors. Haven't tested yet.