| 107 | } // namespace |
| 108 | |
| 109 | void init() |
| 110 | { |
| 111 | Serial.begin(SERIAL_BAUD_RATE); |
| 112 | Serial.systemDebugOutput(true); |
| 113 | Serial.setTxWait(false); |
| 114 | Serial.setTxBufferSize(1024); |
| 115 | |
| 116 | Serial.println(_F("Init Basic Servo Sample")); |
| 117 | System.setCpuFrequency(CpuCycleClockNormal::cpuFrequency()); |
| 118 | |
| 119 | #ifdef ARCH_HOST |
| 120 | setDigitalHooks(nullptr); |
| 121 | #endif |
| 122 | |
| 123 | // Set up two channels, one updating slowly the other more quickly |
| 124 | channels[0].begin(2, UPDATE_INTERVAL * 1.3); |
| 125 | channels[1].begin(4, UPDATE_INTERVAL); |
| 126 | channels[2].begin(5, UPDATE_INTERVAL * 0.5); |
| 127 | channels[3].begin(0, UPDATE_INTERVAL * 0.25); |
| 128 | } |
nothing calls this directly
no test coverage detected