driver module

async driver.checkRficCard(text, LEDObj, dbObj, loop)

Checks if student number exists in database and returns True if it exists in database, and False otherwise. Green LED toggled in True case, Red toggled in False case

Parameters
  • text (String) – The student number

  • LEDObj (LED) – Object of LED class

  • dbObj (db) – Database object from db class with functions for accessing remote database

  • loop (asyncio application) – Main event loop to be used to run coroutines concurrenlty]

Returns

True if student number exists in database, and false otherwise

Return type

boolean

async driver.checkTemp(tempObj, LEDObj, loop)

Samples temperature reading and returns it, and also flashes RED or GREEN LED based on weather the temp reading is higher than threshold.

Parameters
  • tempObj (temp) – Object from Temp class

  • LEDObj (LED) – Object from LED class

  • loop (asyncio application) – Main event loop to be used to run coroutines concurrenlty

Returns

Temperature value of target object

Return type

float