shunt_adc_resolution ) 23 print ( " mode: 0x %1X " % ina219. bus_adc_resolution ) 22 print ( " shunt_adc_resolution: 0x %1X " % ina219. gain ) 21 print ( " bus_adc_resolution: 0x %1X " % ina219. bus_voltage_range ) 20 print ( " gain: 0x %1X " % ina219. I2C () 12 13 ina219 = INA219 ( i2c_bus ) 14 15 print ( "ina219 test" ) 16 17 # display some of the advanced field (just to test) 18 print ( "Config register:" ) 19 print ( " bus_voltage_range: 0x %1X " % ina219. 1 # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries 2 # SPDX-License-Identifier: MIT 3 4 """Sample code and test for adafruit_ina219""" 5 6 import time 7 import board 8 from adafruit_ina219 import ADCResolution, BusVoltageRange, INA219 9 10 11 i2c_bus = board.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |