Skip to content

#407: Add MKR1010 support #413

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

Closed
wants to merge 1 commit into from
Closed

#407: Add MKR1010 support #413

wants to merge 1 commit into from

Conversation

dowlingw
Copy link

To address #407

@soundanalogous
Copy link
Member

This will enable a sketch to compile for this board, but I don't think it will enable WiFi support. For that you'd also have to edit wifiConfig.h

@soundanalogous
Copy link
Member

Hummm, looking at the MKR 1010, I see it's ESP32 based. I'm not sure how it's architected so I'm not sure exactly what it will take to get it to work over WiFi with Firmata. It's probably more complicated than updating wifiConfig.h.

@dowlingw
Copy link
Author

Thanks for that, I've spotted another omission also (total number of pins, though I'm not 100% sure how that's supposed to be counted).

I had a look at the WiFi config and it looks like there's already some support for ESP32 based WiFi, my read was that the platform.h provides some #defines that wificonfig.h will see and automatically include support for.

I'll double check and have a look - super new to Arduino in general so not 100% confident.

@soundanalogous
Copy link
Member

TOTAL_PINS is a bit tricky. It's actually the highest addressable digital pin number. Early on this was always just count of digital pins + count of analog pins (because all analog pins could also be configured as digital pins). As new boards have been introduced over the years, this is not always so simple anymore. So if the highest digital pin number (per the Arduino numbering scheme which likely differs from the pin numbers on the microcontroller itself) is say "60" then TOTAL_PINS should be set to 60 and IS_PIN_DIGITAL needs to filter out any pins in the range of 0 to 60 that are not actually configurable as digital input or output pins.

@soundanalogous
Copy link
Member

soundanalogous commented Dec 27, 2018

Regarding WiFi support. If the MKR 1010 uses the WiFi101.h library, then changing 34 in wifiConfig to:

#if (defined(ARDUINO_SAMD_MKR1000) || defined(ARDUINO_SAMD_MKRWIFI1010)) && !defined(WIFI_101)

It may work. Worth a try at least. If you need a Firmata client that supports the WiFi transport, see firmata.js and johnny-five.js. I have some examples for using both of those clients with WiFi here (see the network folder in both the firmata-js and johnny-five folders. Sorry there's not a ton of documentation on using Firmata over WiFi and it can be a bit testy.

@dowlingw
Copy link
Author

dowlingw commented Jun 4, 2019

Sorry guys, life things happened - closing as #418 sailed on through :)

@dowlingw dowlingw closed this Jun 4, 2019
@dowlingw dowlingw deleted the feature/407-mkr1010wifi branch June 4, 2019 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants