Documentation ¶
Overview ¶
Copyright 2017 Sebastien Soudan
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const ( V6_144 = iota V4_096 = iota V2_048 = iota V1_024 = iota V0_512 = iota V0_256 = iota )
const ( RangeMask = 0x0E00 RangeShift = 9 )
const ( ConversionRegister = 0x0 ConfigRegister = 0x1 )
const ( StartReadFlag = 0x8000 BusyMask = 0x8000 SingleEnded = 0x4000 ChannelMask = uint16(0x3000) ChannelShift = 12 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ADS1015 ¶
type ADS1015 struct {
// contains filtered or unexported fields
}
func (ADS1015) GetResult ¶
GetResult returns the current reading on a channel, scaled by the current scaler and presented as a floating point number.
func (*ADS1015) SetRange ¶
func (a *ADS1015) SetRange(r VoltageRange) error
SetRange sets the voltage range
type VoltageRange ¶
type VoltageRange uint16