Adafruit ItsyBitsy M0 Express convert to Arduino

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

Being totally new to Arduino, I have a Adafruit ItsyBitsy M0 Express that has Python on it. The Adafruit product page states that this can be converted to Arduino. To be clear, I do NOT want python since it is far too slow, and I want native Arduino on the board. How do I accomplish this? Thank you.

User avatar
jerryn
 
Posts: 1868
Joined: Sat Sep 14, 2013 9:05 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by jerryn »

Just follow the guide here https://learn.adafruit.com/introducing- ... y-m0/setup
When you upload an Arduino sketch, it will overwrite CIrcuitPython.

User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

Thank you. That was directly to the point and of course it worked as you described.

User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

I have found what appears to be a documentation error on the ItsyBitsy M0 circuit board. I tried driving the DotStar on that circuit board using the ItsyBitsyM4Onboard example but it didn't work. I suspected that the SPI data and clock pin definitions were incorrect for the M0 version, so I examined the ItsyBitsyM0 circuit board as well as the schematic. While the circuit board and schematic appeared to agree that the M0 pins #1 and #2 drive the on board DotStar, using the schematic as a guide pin #1 should be the SPI clock and pin #2 should be the SPI data. However this did nothing to change the DotStar and neither did reversing that pin order. The only combination that I found that worked is using pin #40 for the SPI clock and pin #41 for the SPI data. To put it mildly, this seems bizarre since the circuit board and the schematic appear to agree. The ItsyBitsy M0 schematic is located at:
https://cdn-learn.adafruit.com/assets/a ... 1644006910
What am I misinterpreting here? Thank you.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by adafruit_support_carter »

Seems like pin numbering confusion. Physical vs. "Arduino". The physical pins 1 and 2 are used:

pins.png
pins.png (67.46 KiB) Viewed 257 times


but the Arduino definition is defined in this table, and PA00/PA01 are the 40/41 entry:

https://github.com/adafruit/ArduinoCore ... p#L99-L100

To make things easier, most boards have definitions PIN_DOTSTAR_DATA and PIN_DOTSTAR_CLK for the DotStar pins:

https://github.com/adafruit/ArduinoCore ... .h#L84-L85

User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

Thank you. I have updated my sketch to use PIN_DOTSTAR_DATA and PIN_DOTSTAR_CLK and it works fine. I would recommend making changes to the ItsyBitsyM4Onboard DotStar example sketch to make it much more universal.

Also, please note that the LPS35HW library located @ https://github.com/pilotak/LPS35HW cannot compile since neither include "LPS35HW.h" nor "MeteoFunctions.h" and their associated CPP files appear to exist anywhere that I can find. These included header files are quoted instead of being in brackets and hence are apparently not part of the normal Arduino IDE library. Thank you.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by adafruit_support_carter »

Please open an issue with pilotak for compile time errors with their library:
https://github.com/pilotak/LPS35HW/issues

User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

I had to jump through some hoops to sign up for a GetHub account, but I did that and opened an issue as per your request. Thank you.

User avatar
Zetopan
 
Posts: 7
Joined: Sun Oct 09, 2022 3:35 am

Re: Adafruit ItsyBitsy M0 Express convert to Arduino

Post by Zetopan »

Carter, and others:

"Please open an issue with pilotak for compile time errors with their library: ..."

I did that but it was not productive and I have since resolved the issue. Anytime that you see include files with quoted instead of bracketed file names (e.g. #include "filename" instead of #include <filename>) that is a giveaway that the alternative PlatformIO IDE was used for the compile instead of the Arduino IDE. Likewise, the quoted include files are located under the PlatformIO branch at GetHub. Please consider this issue closed.

Locked
Please be positive and constructive with your questions and comments.

Return to “Itsy Bitsy Boards”