Skip to content

Conversation

@jacobrosenthal
Copy link
Contributor

Spark.io support

@blakejakopovic
Copy link

I'd like to see Spark Core support also. 👍 Thanks @jacobrosenthal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work as it does with the other boards defined in this file. The Spark's PWM support is available on D0, D1, A0, A1, A4, A5, A6 and A7.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will work as long as the spark core firmware defines digitalPinHasPWM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

#define IS_PIN_PWM(p)           ((p) == 0 || (p) == 1 || ((p) >= 10 && (p) <= 17))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally the equivalent of an arduino variant pins_arduino.h file should be added to spark/core-firmware. Here's an example from the standard arduino variant: https://github.com/arduino/Arduino/blob/master/hardware/arduino/variants/standard/pins_arduino.h

@soundanalogous
Copy link
Member

Is there a spark core port to Arduino?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning behind this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spark (and maybe others) don't support any random positive number as a truth value. @rwaldron is attempting to push a fix upstream https://github.com/spark/core-firmware/issues/247 so it may not be necessary

@soundanalogous
Copy link
Member

This pull request needs to be submitted against the dev branch, not master. I don't accept pull requests to master unless it's just a readme update or something like that.

@soundanalogous soundanalogous added this to the 2.4 milestone Aug 1, 2014
@jacobrosenthal
Copy link
Contributor Author

What to do with this mess now.

I can revert the bitmask lines, but we seem no closer to an agreed upon Spark #ifdef

Another issue Ive found is Spark has swapped their input/output enum

https://github.com/spark/core-firmware/issues/282

@soundanalogous
Copy link
Member

The best solution is if Spark implements the Arduino Stream interface. This would be a smart move for them in terms of Arduino compatibility. That would eliminate the need for the Spark #ifndef in Firmata.cpp if I update Firmata.cpp to include Stream.h rather than HardwareSerial.h.

@jacobrosenthal
Copy link
Contributor Author

Seems like they do:

https://github.com/spark/core-firmware/blob/9b01d795ecaaf657399dc4888f30f3898d91d74a/inc/spark_wiring_stream.h

heres it being used

https://github.com/spark/core-firmware/blob/9b01d795ecaaf657399dc4888f30f3898d91d74a/inc/spark_wiring_usbserial.h

On Mon, Sep 1, 2014 at 7:54 PM, Jeff Hoefs [email protected] wrote:

compatibility. That would eliminate the need for the Spark #ifndef in
Firmata.cpp if I update Firmata.cpp to include Stream.h rather than

@soundanalogous
Copy link
Member

If I merge this: #144

It will eliminate the need for any reference to Spark in Firmata.cpp. However it's going to break pretty much everything anyone has made with Firmata that relies on HardwareSerial so I'm not sure when is a good time to release it.

@jacobrosenthal
Copy link
Contributor Author

That seems like a admirable goal, but in the meantime Id love to get the
define for now.

I dont think I need the digital write change anymore since it was accepted
upstream.

Im testing the rest of the Boards entry to make sure its good for stuff
other than digital write and read.

Ill submit against dev soon.

On Mon, Sep 1, 2014 at 8:14 PM, Jeff Hoefs [email protected] wrote:

ase it.

@soundanalogous
Copy link
Member

For now, I would rather create a separate version of Firmata for Spark firmata/spark than make exceptions for the Arduino version of Firmata to conform with Spark. Once Spark is fully arduino compatible (like a Teensy is for example) then it will be a non issue just to use the firmata/arduino repo for Spark boards.

@soundanalogous
Copy link
Member

@jacobrosenthal
Copy link
Contributor Author

We're over at https://github.com/firmata/spark now. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants