To program your Petduino you do this via the Arduino IDE so before you begin, you’ll want to head over to the Arduino website and make sure you have the latest version installed.
With the Arduino IDE installed, you’ll now want to install the Petduino library.
The Petduino library is a code library that makes it easier for you to program your Petduino without having to know low level commands to control the various Petduino components.
The Petduino library itself is based upon another Arduino library, LedControl, which is a library for controlling the LED matrix we use on the Petduino.
To start with then, head over to the LedControl release page and download the latest zip file (as of writing, this was v1.0.6).
To validate that the library has installed correctly, go to Sketch > Include LIbrary… and you should now see an entry for Petduino.
Before you connect your Petduino, we’ll first need to make sure we have the right drivers installed.
In order to keep the cost of the Petduino low, we actually use an Arduino Nano clone microcontroller. Because the Arduino boards are open source, it means anyone is allowed to reproduce them, as long as they don’t use the official Arduino brand name when they do. What this means though is that other companies can actually make them cheaper by using slightly cheaper, but equally as performant components. One side effect of this though is that some boards may require additional drivers than those that come pre-installed with the Arduino IDE.
The microcontroller that comes with the Petduino is actually based on the CH340G chipset (a popular chip for Arduino clones) so before you connect your Petduino, you’ll want to head here and install the latest driver for this chip.
Once your drivers are installed, you should then be able to connect your Petduino by connecting one end of your USB cable to your Petduino and the other to your PC as pictured.
Once connected, you should then be able to select the Arduino Nano board from the boards menu, followed by the port number of your Petduino from the port menu.
With the library installed you can now checkout the various examples that come with the Petduino library to see how to use the library to interact with your Petduinos components.
To load an example sketch onto your Petduino, go to File > Examples > Petduino and select one of the various examples to try then click the Upload button to upload it to your Petduino.