// SPDX-License-Identifier: Apache-2.0 // Copyright (c) 2012-2024 Scott Penrose and WII5 Buoy contributors // // This file is part of WII5 Buoy firmware. // See LICENSE for full terms. /** * @file wii5_buoy.ino * @brief Arduino sketch entry point: setup() and loop() for the WII5 buoy firmware. */ #include "WII5.h" #include "WII5Controller.h" void setup () { // Put everthing we can into safe PIN mode (including driving high/low) wii5Setup.beginSafe(); // Move to Setup - e.g. beginSafe(); (including safe pins below with proper names and #ifdef) SerialConsole.begin(SerialConsole_Baud); #ifdef WAITBOOT_HALFSECOND SerialConsole.println(F("# WII5: Waiting for 1/2 seconds in boot mode, to allow ICSP")); SerialConsole.flush(); delay(500); #endif // Blocking call - 3 seconds wii5Setup.bootbeep(); // Do first always... wii5Setup.begin(); // Normal WII startup wii5Controller.begin(); } void loop() { wii5Controller.loop(); }