-
Notifications
You must be signed in to change notification settings - Fork 0
Config files format
This file shouldn't be modified by the user: it contains informations needed by the program.
Here you can define every combination of Arduino IDE supported microcontrollers, with the respective code to reveal an error in case the user didn't select the right board from the Arduino IDE menu.
A microcontroller is defined by its name and its error checking code. Doing this makes the program also capable of recognising the microcontroller associated with the board while importing boards/ files.
Example:
###ATMega2560
#if !defined(__AVR_ATmega2560__)
#error Oops! Make sure you have 'Arduino Mega 2560' selected from the 'Tools -> Boards' menu.
#endif
Here you can define what pins every MK4duo board has, in other words what pins does the MK4duo firmware support and recognize.
A pin is identified by its MK4duo name. To add a pin you only have to add a line with its MK4duo name. Doing this makes the program also capable of recognize that pin while importing boards/ files. The order you give to the pin names is reflected both in the order in which they are shown inside the tables of the program and in the order in which they will be exported.
A section contains pins which have a similar role in the MK4duo firmware. It's used to better organize pins. You must specify also if the pins contained in that section are seen by the MK4duo firmware as digital or analog pins (generally only TEMPERATURE pins are considered analog). Remember: SECTION_NAME should NEVER contains spaces!!!
Be sure to follow this format:
###SECTION_NAME [digital]
PIN_NAME
PIN_NAME
PIN_NAME
[...]
###SECTION_NAME [analog]
PIN_NAME
[...]
Additionally, if you write something like this...
###SERVO_@ [digital] @@@ 0 3
SERVO@_PIN
...the program will replace the @'s with numbers from 0 to 3 (or whatever you will write) ONLY FOR THAT SECTION. This way, it will be just like you wrote this:
###SERVO_0 [digital]
SERVO0_PIN
###SERVO_1 [digital]
SERVO1_PIN
###SERVO_2 [digital]
SERVO2_PIN
###SERVO_3 [digital]
SERVO3_PIN