def makeIRSeekerSensor(port): try: s = ev3dev.Sensor(address=port, driver_name='ht-nxt-ir-seek-v2') except (AttributeError, OSError): logger.info('no ir seeker v2 sensor connected to port [%s]', port) s = None return s
def makeCompassSensor(port): try: s = ev3dev.Sensor(address=port, driver_name='ht-nxt-compass') except (AttributeError, OSError): logger.info('no compass sensor connected to port [%s]', port) s = None return s
def makeHTColorSensorV2(port): try: s = ev3dev.Sensor(address=port, driver_name='ht-nxt-color-v2') except (AttributeError, OSError): logger.info('no hitechnic color sensor v2 connected to port [%s]', port) s = None return s