CircuitBrains Deluxe with Arduino

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
dwmj1950
 
Posts: 3
Joined: Wed Jan 04, 2023 8:39 pm

CircuitBrains Deluxe with Arduino

Post by dwmj1950 »

Hi,
If I am reading the overall description of the CircuitBrains Deluxe correctly, it says that the bootloader is compatible with Arduino platform. I've downloaded Arduino IDE 2.0.3 and installed the Arduino SAMD and the Adafruit SAMD board packages. In the Adafruit boards I don't see "CircuitBrains" either Basic or Deluxe. I've tried the Metro M4, but it did not work.

Where can I get the board package for the "CircuitBrains Deluxe"?

Or what do I need to do to get it working with the Arduino IDE?

Thanks,
Don

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: CircuitBrains Deluxe with Arduino

Post by adafruit_support_mike »

We're just a reseller for the CircuitBrains Deluxe, so there won't be a variant for it in our SAMD boards Arduino core.

Looking through the product pages (ours and other vendors) and the Github repo, I don't see any mention of the Arduino programming environment. Could you post a link to the page you're thinking about please?

User avatar
dwmj1950
 
Posts: 3
Joined: Wed Jan 04, 2023 8:39 pm

Re: CircuitBrains Deluxe with Arduino

Post by dwmj1950 »

Hi Mike,

Thanks for responding. I did not appreciate that Adafruit is a reseller of the CircuitBrains Deluxe. I assumed it was a partnership and was being actively supported by Adafruit...

Having said that, on the Adafruit product description page for the CircuitBrains Deluxe:

https://www.adafruit.com/product/4802

There is a link to CircuitPython.

When you click on the link and further navigate you get:

https://circuitpython.org/board/circuit ... deluxe_m4/

On that page, near the bottom of the right hand column is a section entitled "Update UF2 Bootloader":

"Update UF2 Bootloader
Latest version: v3.14.0

The bootloader allows you to load CircuitPython, MakeCode, and Arduino programs.
The bootloader is not CircuitPython....."

This is the reference to Arduino.

Then after Arduino IDE 2.0.3 is set up with both the Arduino and Adafruit SAMD packages installed,
I select ( since the CircuitBrains Deluxe uses the same MCU ):
(I see many Adafruit "variants", but I think this is the closest to the CircuitBrains Deluxe". )

Adafruit Metro M4 (SAMD51)

But it did not work as I expected...

But I did ordered and just received the "Metro M4 Express (SAMD51)" board.

So I'll do some experimenting with that...


One question:
When I am uploading the compiled code from the Arduino IDE to the SAMD51, should the board be in "BOOT:" mode or "CIRCUITPY:" mode? Both modes provide a USB serial port.

Thanks
Don

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: CircuitBrains Deluxe with Arduino

Post by adafruit_support_mike »

dwmj1950 wrote: Mon Jan 09, 2023 8:49 pm The bootloader allows you to load CircuitPython, MakeCode, and Arduino programs.
The bootloader is not CircuitPython....."
That looks like boilerplate that will appear on every page, describing the UF2 bootloader's capabilities rather than saying all the options are actually supported.
dwmj1950 wrote: Mon Jan 09, 2023 8:49 pm Then after Arduino IDE 2.0.3 is set up with both the Arduino and Adafruit SAMD packages installed,
I select ( since the CircuitBrains Deluxe uses the same MCU ):
(I see many Adafruit "variants", but I think this is the closest to the CircuitBrains Deluxe". )

Adafruit Metro M4 (SAMD51)

But it did not work as I expected...
Yeah, that won't work.

The variant files tell the Arduino IDE how to map physical pins on the microcontroller to pins at the edge of the PCB.. which pins are used, how to identify them in code, and what features are supported for each pin.

If you can't find a variant directory for the CircuitBrains Deluxe, the Arduino IDE's convenience functions like digitalWrite() and analogRead() won't work. They specifically check data structures defined in the variant files before they do anything useful.

User avatar
dwmj1950
 
Posts: 3
Joined: Wed Jan 04, 2023 8:39 pm

Re: CircuitBrains Deluxe with Arduino

Post by dwmj1950 »

OK, Thanks again.

Then I'll need to make my own variant file.
It must be an ASCII text file.
What is the format?

Thanks

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: CircuitBrains Deluxe with Arduino

Post by adafruit_support_mike »

Take a look at the files in some of the existing SAMD51 variant directories:

https://github.com/adafruit/ArduinoCore ... s/metro_m4
https://github.com/adafruit/ArduinoCore ... feather_m4
https://github.com/adafruit/ArduinoCore ... sybitsy_m4

It's basically a table that maps the pin numbers you use in code to physical pins, plus a list of features each pin is allowed/able to use.

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

Return to “Arduino”