The Wattuino RC (Robot Controller) is based on the SAMW25, a module that combines a SAMD21 microcontroller (ARM Cortex-M0+ core) with a WINC1500 WiFi chipset. The board further contains two Allegro A3909 motor drivers to control four DC motors that consume up to 1A per phase. Seven pins that can be used as either digital or analog input or output are available via JST PH headers. S1 provides a MOSFET that can switch currents up to 2A. SPI, UART and I2C are available on respective JST PH headers. All inputs are 5V tolerant, but keep in mind that analog measurements use 3.3 Volt as reference.
To be able to upload sketches to your Wattuino RC the Arduino IDE 1.8 or higher is required. Use File > Preferences to add the following board support URL:
https://github.com/watterott/Arduino-Boards/raw/master/package_watterott_index.json
When done, use Tools > Boards > Boards Manager to open the board support management. First install the package Arduino SAMD Boards (provided by Arduino) – it contains the compiler for the ARM Cortex M0+ target. When done, install the Watterott SAMD Boards, this one contains the pin mapping of the Wattuino RC.
To test compiler and sketch upload, open File > Examples > 01.Basics > Blink,
compile it without modifications and upload it.
Pin ID 36 for the LED located close to the reset switch does not have to be explicitly specified,
since it is defined by the macro LED_BUILTIN
.
The USB port that is used for uploading sketches (programs) can be used as normal serial port for status or debugging messages.
Like other boards that implement the interface Serial
over USB partially within software the port is only available after opening a connection.
This example code leaves the setup function when a USB connection is established and opened in the Arduinos Serial Monitor.
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello World!");
delay(1000);
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
}
The port Serial1
provides a hardware UART (marked as RX1/TX1 in the pinout diagram) that can be used without those restrictions.