Add access with W1-Kernelmodule
[owTools.git] / src / main.cpp
index 7c28e12..8bc4452 100755 (executable)
@@ -476,6 +476,12 @@ int main(int argc, char *argv[]) {
                        printf("\033[1;31mGPIO works with Raspberry PI only \033[0m\n");
                }
        }  else
+       if(adapter.find("W1")!=std::string::npos) {
+               owi=new owW1Interface();
+               if (owi->InitAdapter(0)) {
+                       printf("Use W1-Kernel 1-Wire functions on /sys/bus/w1\n");
+               } else printf("No W1-Kernel module found!!\n");
+       } else 
 #endif
        if (adapter.find("ARDUINO") != std::string::npos) {
                owi = new owARDUINOInterface();