From debb69a636e538366da23946c057d3552615f48c Mon Sep 17 00:00:00 2001 From: shrkey Date: Sun, 9 Oct 2016 20:14:29 +0100 Subject: [PATCH] detect test --- darkwater/DW640.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/darkwater/DW640.cpp b/darkwater/DW640.cpp index 27a0716..a6cf62e 100644 --- a/darkwater/DW640.cpp +++ b/darkwater/DW640.cpp @@ -44,6 +44,13 @@ DW640::DW640(uint8_t address) { */ void DW640::initialize() { this->pwm = new PCA9685( this->devAddr ); + if (!testConnection() ) { + printf("No 640 board found\n"); + return 0; + } + + this->pwm->setFrequency( 100 ); + } /** Verify the I2C connection.