Where are the .h for an MKR1010?

Hi,
as I am a very old programmer (67) with a very long experience of C but new to MKR, I would like to know where I can find .h files with the 2.0 IDE.

In fact, I would like to have the list of such items as LED_BUILTIN, OUTPUT, HIGH, LOW, ....

Is there a .h file containing (having) a list of the MKR1010 pins ?

TIA
Jean in France

You can find the location of boards packages in Arduino IDE Preferences as the location of the preferences.txt file at the bottom of the Preferences dialog. It is clickable and opens the folder. There find the arduino/samd boards package in packages folder.

Thank you for your answer.
I found a preferences.txt in the 'old' IDE directory but there is none in the 2.0 IDE directory. Opening the preference pad in the menu only shows few parameters !

I read the documentation and what I understand is : there are only few predefined constants : LED_BULTIN, LOW; HIGH, INPUT, INPUT_PULLUP, and OUTPUT. Is that right ?

If I want to name the MKR1010 board's pins, I must do it myself; there is no standard .h file ?

TIA
Jean

both IDE use the same location for board platform packages.
on Windows it is
C:\Users\<username>\AppData\Local\Arduino15

Hi @jeanmaurice

Arduino IDE 2.x has a nice feature you might find very useful for answering this sort of question. You can right click on any code you want to find the source of and then select Go to Definition from the context menu. This will open the file that contains the definition in a tab in the Arduino IDE editor. Alternatively, you can select Peek > Peek Definition from that context menu if you want to show the definition in a "peek" inside the file you currently have selected in the editor (it is hard to explain the "peek" UI in text, but if you give it a try you will see what it is.

My personal preference is for Go to Definition, since I find the "peek" to be too "busy", but I'm sure it is subjective.

I find Go to Definition to be a very valuable learning tool. I think it is one of the most important advancements made in Arduino IDE 2.x.

1 Like

Agreed!!

Better yet they provide a .pdf showing the pins and all the functions each is capable of: https://content.arduino.cc/assets/Pinout-MKRwifi1010_latest.pdf

Go to Definition is what I needed !
The PDF is very useful too.

But I have another problem : in the directory where is stored variant.h, there are two other files : pins_arduino.h and variant.cpp. I can open those files in Notepad but I can't open them within Arduino IDE 2.0 !! Why ?

Jean

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.