New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chip kit support #210
Chip kit support #210
Conversation
…D, FubarinoMini, UNO32, uC32, DP32, WF32, WiFire. MAX32, chipKIT Pi. * Created a new StandardFirmataChipKIT sketch with chipKIT specific code in it * Updated Board.h to include definitions for all of the new boards
break; | ||
case PWM: | ||
if (IS_PIN_PWM(pin)) | ||
servoWrite(PIN_TO_PWM(pin), value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without SoftPWMServo.h that library does the chipKIT have no PWM functionality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we have our own version of Servo.h that works just fine on some pins. But SoftPWMServo works on every pin, thus it's a better choice for Firmata, I feel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And our version of analog output (PWM output) also works just fine, but again can only be done with a small number of pins. SoftPWMServo allows us to do PWM (Analog output) and Servo on all pins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok this will work fine then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have looked at this first: https://github.com/chipKIT32/chipKIT32-MAX/blob/master/hardware/pic32/libraries/SoftPWMServo/SoftPWMServo.h. I think everything should work. Ignore my comments.
It looks like this may need more work. You should test servo support against a popular Firmata client library like johnny-five. I know @rwaldron is eager to get chipKIT support for johnny-five so maybe he is also available to do some testing here. I don't have any chipKIT boards to test with myself so I'll be relying on you to ensure it's working well with popular client libraries. |
Excellent suggestion. I've been going through every johnny-five Servo based example (that I have hardware for - i.e. not the I2C based expander ones) and everything works great, with one minor exception. The only API call I can find that doesn't seem to do what it's supposed to is servo.stop(). I'll figure out why that's not working, and then update the PR. Every other servo API in johnny-five seems to work identically on chipKIT and Arduino boards. |
@EmbeddedMan is it possible to use an Arduino ethernet shield with a chipKIT board? |
|
||
See file LICENSE.txt for further informations on licensing terms. | ||
|
||
Last updated by Jeff Hoefs: April 11, 2015 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add your name and the date here since you will be the most recent updater :)
Keep in mind that
|
Ohhh! In that case, stop is working great. :-) I thought servo.stop(); Let me do some more testing, and I'll let you know if the everything is On Sat, Aug 8, 2015 at 8:55 PM, Rick Waldron notifications@github.com
|
Tested with johnny-five for Servo compatibility - works exactly like Arduino Firmata. All tests pass.
OK, I've done more testing comparing my PR chipKIT version of StandardFirmata with the normal Arduino version, with respect to the Servo API. I can find no differences. Stop() appears to work exactly the same on both boards. I've also updated StandardFirmataChipKIT.ino with my name. Are there any other things you'd like to see fixed before moving forward with the PR? (Oh, and I believe that there are some folks who have gotten the Arduino Ethernet shield to work with a chipKIT board, but I've never tried it, and it sounds like it takes some hardware modifications to the shield to get it to work.) |
I think this is good to go then. I'll merge it and then make some minor changes as I want to pull in some changes I made in the v2.5beta1 branch (basically everything except the addition of SET_DIGITAL_PIN_VALUE feature which requires the bump from 2.4 to 2.5). After I make those changes I can tag a new release (Firmata 2.4.4) and it will show up for users in the Arduino IDE library manager. |
Who should I credit in the release notes for the contribution? Yourself and Rick Anderson? I'm not sure what the extend of the collaboration is on the ChipKIT side. |
Jeff, Thanks for asking. It should be me, Rick Anderson and Keith Vogel. *Brian On Sun, Aug 9, 2015 at 1:08 PM, Jeff Hoefs notifications@github.com wrote:
|
How soon will ChipKIT support be available in the Arduino Board manager? |
Jeff, we're not sure. It's one of the things Rick is currently working on, *Brian On Sun, Aug 9, 2015 at 1:16 PM, Jeff Hoefs notifications@github.com wrote:
|
Okay, so until then you just merge Firmata master into MPIDE? |
Yup, I just took care of putting my latest files in there, and when you do On Sun, Aug 9, 2015 at 1:21 PM, Jeff Hoefs notifications@github.com wrote:
|
Done! https://github.com/firmata/arduino/releases/tag/v2.4.4 Let me know if I should change anything in the first couple of sentences regarding how people can start using Firmata with ChipKIT. |
Jeff, that looks fantastic. My only suggestion would be to say something *Brian On Sun, Aug 9, 2015 at 2:54 PM, Jeff Hoefs notifications@github.com wrote:
|
Looks like the default download for OS X is 20140821. |
Should the instructions say to download one of the 20150802 test releases from the top of this list? |
Jeff, Well, users should probably download the latest test release, whatever *Brian On Sun, Aug 9, 2015 at 3:14 PM, Jeff Hoefs notifications@github.com wrote:
|
And yes, the state of chipKIT releases - at this point in time - is not *Brian On Sun, Aug 9, 2015 at 3:25 PM, Brian Schmalz brian@schmalzhaus.com wrote:
|
You got it :) |
Adding chipKIT board support to Firmata.