The novelty here is the pin numbering, matching that of the Clicker2 board. You will notice that some pin numbers are missing — there’s nothing wrong with this, it’s only to keep the matching I mentioned above.

But I have found also some minor issues: some analog pins are incorrectly defined. For example, to read the state of the AN pins of the click sockets you will have to use the pin number, without the “A” — like analogRead(69); for example.

Another thing is reading the battery voltage. If you look on the Clicker2 schematic, you’ll find that you have to set BATT SENSE ENABLE pin low before reading the BATTERY VOLTAGE pin. I do recommend to set the BATT SENSE ENABLE back high after the reading, as this will prevent discharging of the battery through the sensing resistors.

As for programming in Arduino IDE, all you need is to connect the Clicker2 board using the USB port. When uploading the sketch, when the *** Enter programming mode now. *** message appears on the screen you have to press the reset button on the Clicker2 board, This brings up the bootloader and the sketch can be uploaded. This is the only difference as compared with Arduino Uno boards. I also mention here that Serial.print() works using the USB port.

Another thing is that now the MikroElektronika Buggy becomes fully compatible with the Arduino IDE. Of course, an in-depth post regarding the new ways to program the Buggy will follow soon

Alternate pin names

A quick update on this post [3 November 2016]: As pointed out by Matt Jenkins from Majenko Technologies, there’s an alternate set of pin definitions for the Clicker2 board, the format being “PIN_xxx”, where “xxx” is the pin name (written on the board). The click sockets also have their own pin definitions, of type “PIN_Cy_xxx”.

If you prefer this way of addressing the pins, here’s an updated pin map: