Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Configuration Register MSB[7] OS field OsField = 7 OsWNoEffect OS = 0b0 // W OsWStartSingleConversion OS = 0b1 // W / reset OsRPerformingConversion OS = 0b0 // R OsRConversionReady OS = 0b1 // R // Configuration Register MSB[6:4] MUX field MuxField Mux = 4 MuxA0A1 Mux = 0b000 //reset MuxA0A3 Mux = 0b001 MuxA1A3 Mux = 0b010 MuxA2A3 Mux = 0b011 MuxA0GND Mux = 0b100 MuxA1GND Mux = 0b101 MuxA2GND Mux = 0b110 MuxA3GND Mux = 0b111 // Configuration Register MSB[3:1] PGA (Gain field) PGAField = 1 PGA6144 PGA = 0b000 PGA6144Scale = 187.5 / 1000000 PGA4096 PGA = 0b001 PGA4096Scale = 125 / 1000000 PGA2048 PGA = 0b010 //reset PGA2048Scale = 62.5 / 1000000 PGA1024 PGA = 0b011 PGA1024Scale = 31.25 / 1000000 PGA512 PGA = 0b100 PGA512Scale = 15.625 / 1000000 PGA256 PGA = 0b101 PGA256Scale = 7.8125 / 1000000 // Configuration Register MSB[0] Mode ModeField = 0 ModeContinuous Mode = 0 ModeSingle Mode = 1 //reset // Configuration Register LSB[7:5] Data Rate DRField = 5 SPS8 DR = 0b000 SPS16 DR = 0b001 SPS32 DR = 0b010 SPS64 DR = 0b011 SPS128 DR = 0b100 //reset SPS250 DR = 0b101 SPS475 DR = 0b110 SPS860 DR = 0b111 // Configuration Register LSB[4] Comp Mode CMField = 4 CMTraditional CM = 0b0 //reset CMWindowComparator CM = 0b1 // Configuration Register LSB[3] Comp polarity CPField = 3 CPActiveLow CP = 0b0 //reset CPActiveHigh CP = 0b1 // Configuration Register LSB[2] Latching comparator LCField = 2 LCNon LC = 0b0 //reset LCYes LC = 0b1 // Configuration Register LSB[1:0] Comparator queue QField = 0 QOne Queue = 0b00 QTwo Queue = 0b01 QFour Queue = 0b10 QDisable Queue = 0b11 //reset )
Variables ¶
This section is empty.
Functions ¶
func ReadAnalog ¶
ReadAnalog function read conversion register en return result in volt
func ReadConversionRegister ¶
ReadConversionRegister function is deprecated en is replaced by ReadAnalog function
Types ¶
type Ads1115 ¶
type Configuration ¶
Click to show internal directories.
Click to hide internal directories.