Class Ads1115.Sim
An ADS1115 that is not there, for a bus with nothing plugged in.
public static class Ads1115.Sim
- Inheritance
-
Ads1115.Sim
- Inherited Members
Remarks
A conversion comes back as a count of the range the gain selects, so Reporting(byte, Pga, float) takes the same gain a driver is given. The part keeps whatever configuration a driver writes, so a conversion a driver starts reads as finished.
Fields
Volts
The voltage Part(byte) reports: half a 3.3 V supply.
public const float Volts = 1.65
Field Value
Methods
Part(byte)
Makes a part reading Volts at the range a driver starts with.
public static WordPart Part(byte address)
Parameters
addressbyteThe address it answers to.
Returns
- WordPart
The part, to put on a simulated bus.
Reporting(byte, Pga, float)
Makes a part that reads what it is asked to at the range a driver converts at.
public static WordPart Reporting(byte address, Ads1115.Pga gain, float volts)
Parameters
addressbyteThe address it answers to.
gainAds1115.PgaThe range the driver converts at.
voltsfloatThe voltage it reports, held to the range.
Returns
- WordPart
The part, to put on a simulated bus.