TiLDA MK4/sensors: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
|  (Created page with "Coming soon ... how to read the sensors supported in the tilda.Sensors module") | No edit summary | ||
| Line 1: | Line 1: | ||
| Coming soon ... how to read the sensors supported in the tilda.Sensors module | Coming soon ... how to read the sensors supported in the tilda.Sensors module | ||
| Let's get started. | |||
| <pre> | |||
| >>> from tilda import Sensors | |||
| >>> dir(Sensors) | |||
| ['__class__', '__name__', 'BAT_ADAPTER_24', 'BAT_DONE_CHARGING', 'BAT_FAST_CHARGING', 'BAT_NOT_CHARGING', 'BAT_NO_INPUT', 'BAT_OTG', 'BAT_PRE_CHARGING', 'BAT_USB_HOST', '_raw_bq', 'get_charge_status', 'get_hdc_humidity', 'get_hdc_temperature', 'get_lux', 'get_tmp_temperature', 'get_vbus_connected', 'sample_rate'] | |||
| >>> Sensors.get_charge_status() | |||
| 0 | |||
| >>> Sensors.get_charge_status() | |||
| 2 | |||
| >>> Sensors.BAT_FAST_CHARGING | |||
| 2 | |||
| </pre> | |||
Revision as of 18:03, 29 August 2018
Coming soon ... how to read the sensors supported in the tilda.Sensors module
Let's get started.
>>> from tilda import Sensors >>> dir(Sensors) ['__class__', '__name__', 'BAT_ADAPTER_24', 'BAT_DONE_CHARGING', 'BAT_FAST_CHARGING', 'BAT_NOT_CHARGING', 'BAT_NO_INPUT', 'BAT_OTG', 'BAT_PRE_CHARGING', 'BAT_USB_HOST', '_raw_bq', 'get_charge_status', 'get_hdc_humidity', 'get_hdc_temperature', 'get_lux', 'get_tmp_temperature', 'get_vbus_connected', 'sample_rate'] >>> Sensors.get_charge_status() 0 >>> Sensors.get_charge_status() 2 >>> Sensors.BAT_FAST_CHARGING 2