Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 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