User Manual
37
cap_vol = my_pismart.capture_volume # get capture volume
my_pismart.capture_volume = 100 # set capture volume
cpu_temperature
CHeck the temperature of the Raspberry Pi's CPU, returning a float value.
cpu_temp = my_pismart.cpu_temperature # get cpu temperature
cpu_usage
CHeck the usage of the Raspberry Pi's CPU, returning a float value.
cpu_usage = my_pismart.cpu_usage # get cpu usage
adc.py
Read the value of ADC from the PiSmart bottom plate.
Create an instance, with a parameter for analog channels, an integer ranging between
[0\~4].
from pismart.adc import ADC
my_A0 = ADC(0) # creat adc use chn 0
my_A1 = ADC(1)
read()
Read the analog value of ports, return an integer analog value.
No parameters.
A0_val = my_A0.read() # get analog val ch.0
A1_val = my_A1.read()
channel
Check and set channels, assignable with values ranging between [0~4].
A0_chn = my_A0.channel # get channel
my_A0.channel = 4 # set channel
SunFounder