def duerQuery(queryCode): ''' ''' BLINKER_LOG('DuerOS Query codes: ', queryCode) if queryCode == BLINKER_CMD_QUERY_TIME_NUMBER: BLINKER_LOG("DuerOS Query time") BlinkerDuerOS.time(millis()) BlinkerDuerOS.print() else: BlinkerDuerOS.time(millis()) BlinkerDuerOS.print()
def duerQuery(queryCode): ''' ''' BLINKER_LOG('DuerOS Query codes: ', queryCode) if queryCode == BLINKER_CMD_QUERY_AQI_NUMBER : BLINKER_LOG("DuerOS Query AQI") BlinkerDuerOS.aqi(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_CO2_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.co2(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_PM10_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.pm10(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_PM25_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.pm25(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_HUMI_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.humi(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_TEMP_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.temp(20) BlinkerDuerOS.print() elif queryCode == BLINKER_CMD_QUERY_TIME_NUMBER : BLINKER_LOG("DuerOS Query CO2") BlinkerDuerOS.time(millis()) BlinkerDuerOS.print() else : BlinkerDuerOS.temp(20) BlinkerDuerOS.humi(20) BlinkerDuerOS.pm25(20) BlinkerDuerOS.print()