Assuming that `usbIsPresent()` exists and works fine, 
the control would be : 

``` 
if (usbIsPresent()):
     doSomething ... 
```