Skip to content

Commit 6c6024d

Browse files
rschieferjosesimoesEllerbach
authored
updated ina219 to work with nano (#192)
* updated ina219 to work with nano * fixed nupsec * updated ina219 to work with nano * fixed nupsec * Fixed nfproj Co-authored-by: José Simões <[email protected]> Co-authored-by: Laurent Ellerbach <[email protected]>
1 parent 6faa846 commit 6c6024d

22 files changed

+218
-120
lines changed

Diff for: src/devices_generated/Ina219/Ina219.cs renamed to devices/Ina219/Ina219.cs

+21-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Buffers.Binary;
6-
using System.Collections.Generic;
76
using System.Device;
87
using System.Device.I2c;
98
using System.Device.Model;
@@ -26,20 +25,24 @@ public class Ina219 : IDisposable
2625
{
2726
// These values are the datasheet defined delays in micro seconds between requesting a Current or Power value from the INA219 and the ADC sampling having completed
2827
// along with any conversions.
29-
private static readonly Dictionary<Ina219AdcResolutionOrSamples, int> s_readDelays = new()
28+
private static int s_readDelays(Ina219AdcResolutionOrSamples adc)
3029
{
31-
{ Ina219AdcResolutionOrSamples.Adc9Bit, 84 },
32-
{ Ina219AdcResolutionOrSamples.Adc10Bit, 148 },
33-
{ Ina219AdcResolutionOrSamples.Adc11Bit, 276 },
34-
{ Ina219AdcResolutionOrSamples.Adc12Bit, 532 },
35-
{ Ina219AdcResolutionOrSamples.Adc2Sample, 1006 },
36-
{ Ina219AdcResolutionOrSamples.Adc4Sample, 2130 },
37-
{ Ina219AdcResolutionOrSamples.Adc8Sample, 4260 },
38-
{ Ina219AdcResolutionOrSamples.Adc16Sample, 8510 },
39-
{ Ina219AdcResolutionOrSamples.Adc32Sample, 17020 },
40-
{ Ina219AdcResolutionOrSamples.Adc64Sample, 34050 },
41-
{ Ina219AdcResolutionOrSamples.Adc128Sample, 68100 }
42-
};
30+
switch(adc)
31+
{
32+
case Ina219AdcResolutionOrSamples.Adc9Bit: return 84;
33+
case Ina219AdcResolutionOrSamples.Adc10Bit: return 148;
34+
case Ina219AdcResolutionOrSamples.Adc11Bit: return 276;
35+
case Ina219AdcResolutionOrSamples.Adc12Bit: return 532;
36+
case Ina219AdcResolutionOrSamples.Adc2Sample: return 1006;
37+
case Ina219AdcResolutionOrSamples.Adc4Sample: return 2130;
38+
case Ina219AdcResolutionOrSamples.Adc8Sample: return 4260;
39+
case Ina219AdcResolutionOrSamples.Adc16Sample: return 8510;
40+
case Ina219AdcResolutionOrSamples.Adc32Sample: return 17020;
41+
case Ina219AdcResolutionOrSamples.Adc64Sample: return 34050;
42+
case Ina219AdcResolutionOrSamples.Adc128Sample: return 68100;
43+
default: return -1;
44+
}
45+
}
4346

4447
private I2cDevice _i2cDevice;
4548
private bool _disposeI2cDevice = false;
@@ -241,15 +244,15 @@ public void Dispose()
241244
/// <returns>The shunt potential difference</returns>
242245
// read the shunt voltage. LSB = 10uV then convert to Volts
243246
[Telemetry("ShuntVoltage")]
244-
public ElectricPotential ReadShuntVoltage() => ElectricPotential.FromVolts(ReadRegister(Ina219Register.ShuntVoltage, s_readDelays[(Ina219AdcResolutionOrSamples)_shuntAdcResSamp]) * 10.0 / 1000000.0);
247+
public ElectricPotential ReadShuntVoltage() => ElectricPotential.FromVolts(ReadRegister(Ina219Register.ShuntVoltage, s_readDelays(_shuntAdcResSamp)) * 10.0 / 1000000.0);
245248

246249
/// <summary>
247250
/// Read the measured Bus voltage.
248251
/// </summary>
249252
/// <returns>The Bus potential (voltage)</returns>
250253
// read the bus voltage. LSB = 4mV then convert to Volts
251254
[Telemetry("BusVoltage")]
252-
public ElectricPotential ReadBusVoltage() => ElectricPotential.FromVolts(((short)ReadRegister(Ina219Register.BusVoltage, s_readDelays[_busAdcResSamp]) >> 3) * 4 / 1000.0);
255+
public ElectricPotential ReadBusVoltage() => ElectricPotential.FromVolts(((short)ReadRegister(Ina219Register.BusVoltage, s_readDelays(_busAdcResSamp)) >> 3) * 4 / 1000.0);
253256

254257
/// <summary>
255258
/// Read the calculated current through the INA219.
@@ -267,7 +270,7 @@ public ElectricCurrent ReadCurrent()
267270
// whenever needed.
268271
SetCalibration(_calibrationValue, _currentLsb);
269272

270-
return ElectricCurrent.FromAmperes(ReadRegister(Ina219Register.Current, s_readDelays[(Ina219AdcResolutionOrSamples)_shuntAdcResSamp]) * _currentLsb);
273+
return ElectricCurrent.FromAmperes(ReadRegister(Ina219Register.Current, s_readDelays(_shuntAdcResSamp)) * _currentLsb);
271274
}
272275

273276
/// <summary>
@@ -286,7 +289,7 @@ public Power ReadPower()
286289
// whenever needed.
287290
SetCalibration(_calibrationValue, _currentLsb);
288291

289-
return Power.FromWatts(ReadRegister(Ina219Register.Power, s_readDelays[(Ina219AdcResolutionOrSamples)_shuntAdcResSamp]) * _currentLsb * 20);
292+
return Power.FromWatts(ReadRegister(Ina219Register.Power, s_readDelays(_shuntAdcResSamp)) * _currentLsb * 20);
290293
}
291294

292295
/// <summary>

Diff for: devices/Ina219/Ina219.fzz

41.9 KB
Binary file not shown.

Diff for: src/devices_generated/Ina219/Ina219.nfproj renamed to devices/Ina219/Ina219.nfproj

+46-14
Original file line numberDiff line numberDiff line change
@@ -18,50 +18,82 @@
1818
<DocumentationFile>bin\$(Configuration)\Iot.Device.Ina219.xml</DocumentationFile>
1919
<LangVersion>9.0</LangVersion>
2020
</PropertyGroup>
21+
<PropertyGroup>
22+
<SignAssembly>true</SignAssembly>
23+
</PropertyGroup>
24+
<PropertyGroup>
25+
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
26+
</PropertyGroup>
27+
<PropertyGroup>
28+
<DelaySign>false</DelaySign>
29+
</PropertyGroup>
2130
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
2231
<ItemGroup>
23-
<Reference Include="mscorlib">
24-
<HintPath>packages\nanoFramework.CoreLibrary.1.10.4-preview.11\lib\mscorlib.dll</HintPath>
32+
<Reference Include="mscorlib, Version=1.10.5.4, Culture=neutral, PublicKeyToken=c07d481e9758c731">
33+
<HintPath>packages\nanoFramework.CoreLibrary.1.10.5\lib\mscorlib.dll</HintPath>
2534
<Private>True</Private>
35+
<SpecificVersion>True</SpecificVersion>
2636
</Reference>
2737
<Reference Include="System.Device.I2c">
28-
<HintPath>packages\nanoFramework.System.Device.I2c.1.0.1-preview.33\lib\System.Device.I2c.dll</HintPath>
38+
<HintPath>packages\nanoFramework.System.Device.I2c.1.0.1\lib\System.Device.I2c.dll</HintPath>
39+
<Private>True</Private>
40+
</Reference>
41+
<Reference Include="System.Device.Model">
42+
<HintPath>packages\nanoFramework.System.Device.Model.1.0.176\lib\System.Device.Model.dll</HintPath>
43+
<Private>True</Private>
44+
</Reference>
45+
<Reference Include="System.Buffers.Binary.BinaryPrimitives">
46+
<HintPath>packages\nanoFramework.System.Buffers.Binary.BinaryPrimitives.1.0.160\lib\System.Buffers.Binary.dll</HintPath>
2947
<Private>True</Private>
3048
</Reference>
49+
<Reference Include="UnitsNet.RelativeHumidity">
50+
<HintPath>packages\UnitsNet.nanoFramework.RelativeHumidity.4.92.0\lib\UnitsNet.RelativeHumidity.dll</HintPath>
51+
<Private>True</Private>
52+
</Reference>
53+
<Reference Include="UnitsNet.Temperature">
54+
<HintPath>packages\UnitsNet.nanoFramework.Temperature.4.92.0\lib\UnitsNet.Temperature.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
57+
<Reference Include="System.Math">
58+
<HintPath>packages\nanoFramework.System.Math.1.4.0-preview.7\lib\System.Math.dll</HintPath>
59+
</Reference>
3160
<Reference Include="UnitsNet.ElectricPotential">
32-
<HintPath>packages\UnitsNet.nanoFramework.ElectricPotential.4.92.0\lib\UnitsNet.ElectricPotential.dll</HintPath>
61+
<HintPath>packages\UnitsNet.nanoFramework.ElectricPotential.4.102.0\lib\UnitsNet.ElectricPotential.dll</HintPath>
3362
<Private>True</Private>
3463
</Reference>
3564
<Reference Include="UnitsNet.ElectricCurrent">
36-
<HintPath>packages\UnitsNet.nanoFramework.ElectricCurrent.4.92.0\lib\UnitsNet.ElectricCurrent.dll</HintPath>
65+
<HintPath>packages\UnitsNet.nanoFramework.ElectricCurrent.4.102.0\lib\UnitsNet.ElectricCurrent.dll</HintPath>
3766
<Private>True</Private>
3867
</Reference>
68+
<Reference Include="UnitsNet.Power">
69+
<HintPath>packages\UnitsNet.nanoFramework.Power.4.102.0\lib\UnitsNet.Power.dll</HintPath>
70+
<Private>True</Private>
71+
</Reference>
72+
<Reference Include="System.Diagnostics.Stopwatch, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
73+
<HintPath>packages\nanoFramework.System.Diagnostics.Stopwatch.1.0.160\lib\System.Diagnostics.Stopwatch.dll</HintPath>
74+
<Private>True</Private>
75+
<SpecificVersion>True</SpecificVersion>
76+
</Reference>
3977
</ItemGroup>
4078
<ItemGroup>
4179
<None Include="packages.config" />
4280
<Compile Include="*.cs" />
43-
<Compile Include="..\Common\System\Device\DelayHelper.cs" Link="DelayHelper.cs" />
4481
<None Include="README.md" />
4582
</ItemGroup>
4683
<ItemGroup>
4784
<Compile Include="Properties\AssemblyInfo.cs" />
48-
<Compile Include="*.cs" />
49-
<None Include="*.md" />
5085
</ItemGroup>
5186
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
52-
<Import Project="..\..src\BinaryPrimitives\BinaryPrimitives.projitems" Label="Shared" />
53-
<Import Project="..\..\src\System.Device.Model\System.Device.Model.projitems" Label="Shared" />
54-
<Import Project="..\..\src\System.Runtime.CompilerService\System.Runtime.CompilerService.projitems" Label="Shared" />
5587
<ProjectExtensions>
5688
<ProjectCapabilities>
5789
<ProjectConfigurationsDeclaredAsItems />
5890
</ProjectCapabilities>
5991
</ProjectExtensions>
6092
<Import Project="packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets" Condition="Exists('packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets')" />
61-
<Target Name = "EnsureNuGetPackageBuildImports" BeforeTargets = "PrepareForBuild">
93+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
6294
<PropertyGroup>
6395
<ErrorText> This project references NuGet package(s) that are missing on this computer.Enable NuGet Package Restore to download them.For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.The missing file is {0}.</ErrorText>
6496
</PropertyGroup>
65-
<Error Condition = "!Exists('packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets')" Text = "$([System.String]::Format('$(ErrorText)', 'packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets'))" />
97+
<Error Condition="!Exists('packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Nerdbank.GitVersioning.3.4.194\build\Nerdbank.GitVersioning.targets'))" />
6698
</Target>
67-
</Project>
99+
</Project>

Diff for: src/devices_generated/Ina219/Ina219.nuspec renamed to devices/Ina219/Ina219.nuspec

+13-7
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,29 @@
55
<version>$version$</version>
66
<title>nanoFramework.Iot.Device.Ina219</title>
77
<authors>nanoFramework project contributors</authors>
8-
<owners>nanoFramework,dotnetfoundation</owners>
8+
<owners>nanoFramework project contributors,dotnetfoundation</owners>
99
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1010
<license type="file">LICENSE.md</license>
1111
<releaseNotes>
1212
</releaseNotes>
13-
<readme>docs\README.md</readme>
1413
<developmentDependency>false</developmentDependency>
1514
<projectUrl>https://github.com/nanoframework/nanoFramework.IoT.Device</projectUrl>
15+
<iconUrl>https://secure.gravatar.com/avatar/97d0e092247f0716db6d4b47b7d1d1ad</iconUrl>
1616
<icon>images\nf-logo.png</icon>
1717
<repository type="git" url="https://github.com/nanoframework/nanoFramework.IoT.Device" commit="$commit$" />
1818
<copyright>Copyright (c) .NET Foundation and Contributors</copyright>
1919
<description>This package includes the .NET IoT Core binding Iot.Device.Ina219 for .NET nanoFramework C# projects.</description>
2020
<summary>Iot.Device.Ina219 assembly for .NET nanoFramework C# projects</summary>
2121
<tags>nanoFramework C# csharp netmf netnf Iot.Device.Ina219</tags>
2222
<dependencies>
23-
<dependency id="nanoFramework.CoreLibrary" version="1.10.4-preview.11" />
23+
<dependency id="nanoFramework.CoreLibrary" version="1.10.5" />
24+
<dependency id="nanoFramework.System.Device.I2c" version="1.0.1" />
25+
<dependency id="nanoFramework.System.Buffers.Binary.BinaryPrimitives" version="1.0.160" />
26+
<dependency id="nanoFramework.System.Device.Model" version="1.0.176" />
27+
<dependency id="UnitsNet.nanoFramework.ElectricPotential" version="4.102.0" />
28+
<dependency id="UnitsNet.nanoFramework.ElectricCurrent" version="4.102.0" />
29+
<dependency id="UnitsNet.nanoFramework.Power" version="4.102.0" />
30+
<dependency id="nanoFramework.System.Diagnostics.Stopwatch" version="1.0.160" />
2431
</dependencies>
2532
</metadata>
2633
<files>
@@ -29,9 +36,8 @@
2936
<file src="bin\Release\Iot.Device.Ina219.pdbx" target="lib\Iot.Device.Ina219.pdbx" />
3037
<file src="bin\Release\Iot.Device.Ina219.pe" target="lib\Iot.Device.Ina219.pe" />
3138
<file src="bin\Release\Iot.Device.Ina219.xml" target="lib\Iot.Device.Ina219.xml" />
32-
33-
<file src="README.md" target="docs\" />
34-
<file src="..\assets\nf-logo.png" target="images" />
35-
<file src="..\LICENSE.md" target="" />
39+
<file src="readme.md" target="" />
40+
<file src="..\..\assets\nf-logo.png" target="images" />
41+
<file src="..\..\LICENSE.md" target="" />
3642
</files>
3743
</package>

Diff for: devices/Ina219/Ina219.png

158 KB
Loading

Diff for: devices/Ina219/Ina219.sln

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.31613.86
4+
MinimumVisualStudioVersion = 15.0.26124.0
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{0D478BAB-AFEA-4AF1-866C-E3AC32E11C5A}"
6+
EndProject
7+
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "Ina219.Samples", "samples\Ina219.Samples.nfproj", "{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}"
8+
EndProject
9+
Project("{11A8DD76-328B-46DF-9F39-F559912D0360}") = "Ina219", "Ina219.nfproj", "{B6CCC350-F739-17FD-CD00-45080F7DC9DB}"
10+
EndProject
11+
Global
12+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
13+
Debug|Any CPU = Debug|Any CPU
14+
Debug|x64 = Debug|x64
15+
Debug|x86 = Debug|x86
16+
Release|Any CPU = Release|Any CPU
17+
Release|x64 = Release|x64
18+
Release|x86 = Release|x86
19+
EndGlobalSection
20+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
21+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
22+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|Any CPU.Build.0 = Debug|Any CPU
23+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|x64.ActiveCfg = Debug|Any CPU
24+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|x64.Build.0 = Debug|Any CPU
25+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|x86.ActiveCfg = Debug|Any CPU
26+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Debug|x86.Build.0 = Debug|Any CPU
27+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|Any CPU.ActiveCfg = Release|Any CPU
28+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|x64.ActiveCfg = Release|Any CPU
30+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|x64.Build.0 = Release|Any CPU
31+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|x86.ActiveCfg = Release|Any CPU
32+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456}.Release|x86.Build.0 = Release|Any CPU
33+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|x64.ActiveCfg = Debug|Any CPU
36+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|x64.Build.0 = Debug|Any CPU
37+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|x86.ActiveCfg = Debug|Any CPU
38+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Debug|x86.Build.0 = Debug|Any CPU
39+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|x64.ActiveCfg = Release|Any CPU
42+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|x64.Build.0 = Release|Any CPU
43+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|x86.ActiveCfg = Release|Any CPU
44+
{B6CCC350-F739-17FD-CD00-45080F7DC9DB}.Release|x86.Build.0 = Release|Any CPU
45+
EndGlobalSection
46+
GlobalSection(SolutionProperties) = preSolution
47+
HideSolutionNode = FALSE
48+
EndGlobalSection
49+
GlobalSection(NestedProjects) = preSolution
50+
{A9A1A6D6-C30A-7911-C4E4-63AE0A28F456} = {0D478BAB-AFEA-4AF1-866C-E3AC32E11C5A}
51+
EndGlobalSection
52+
GlobalSection(ExtensibilityGlobals) = postSolution
53+
SolutionGuid = {380E67F7-D17E-418A-9E95-C97B1FB2219C}
54+
EndGlobalSection
55+
EndGlobal
File renamed without changes.

Diff for: src/devices_generated/Ina219/README.md renamed to devices/Ina219/README.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,19 @@ This binding is intended to support both the A and B grades of the INA219. The g
1515

1616
* [INA219 Datasheet](http://www.ti.com/lit/ds/symlink/ina219.pdf)
1717

18+
## Board
19+
20+
![image](./Ina219.png)
21+
22+
1823
## Usage
1924

2025
```csharp
21-
const byte Adafruit_Ina219_I2cAddress = 0x40;
22-
const byte Adafruit_Ina219_I2cBus = 0x1;
26+
const byte Ina219_I2cAddress = 0x40;
27+
const byte Ina219_I2cBus = 0x1;
2328

2429
// create an INA219 device on I2C bus 1 addressing channel 64
25-
using (Ina219 device = new Ina219(new I2cConnectionSettings(Adafruit_Ina219_I2cBus, Adafruit_Ina219_I2cAddress)))
30+
using (Ina219 device = new Ina219(new I2cConnectionSettings(Ina219_I2cBus, Ina219_I2cAddress)))
2631
{
2732
// reset the device
2833
device.Reset();
@@ -43,7 +48,7 @@ using (Ina219 device = new Ina219(new I2cConnectionSettings(Adafruit_Ina219_I2cB
4348

4449
### Notes
4550

46-
This sample uses an Adafruit INA219 breakout board and monitors a LED wired into the 3.3 volts supply with a 150 ohm current limiting resistor. It prints the bus voltage, shunt voltage, current and power every second.
51+
This sample uses an INA219 breakout board and monitors a LED wired into the 3.3 volts supply with a 150 ohm current limiting resistor. It prints the bus voltage, shunt voltage, current and power every second.
4752

4853
The configuration and calibration is determinined as follows.
4954

@@ -53,5 +58,3 @@ at 5mV. Given this we can use a shunt voltage range of +/- 40mV
5358
* The maximum possible current would then be 40mV / 0.1 = 400mA
5459
* With a 400mA maximum current and a range of the ADC of 15bits then the LSB of the current would be 400mA/32767 = 12.2207 microamps. We will chose 12.2uA as a round number.
5560
* From the [INA219 Datasheet](http://www.ti.com/lit/ds/symlink/ina219.pdf) the calibration register should be set at 0.04096/(currentLSB * shunt resistance) = 33574 = 0x8326
56-
57-
![circuit](Ina219.Sample_bb.png)
File renamed without changes.

Diff for: devices/Ina219/packages.config

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="nanoFramework.CoreLibrary" version="1.10.5" targetFramework="netnanoframework10" />
4+
<package id="nanoFramework.System.Device.I2c" version="1.0.1" targetFramework="netnanoframework10" />
5+
<package id="nanoFramework.System.Buffers.Binary.BinaryPrimitives" version="1.0.160" targetFramework="netnanoframework10" />
6+
<package id="nanoFramework.System.Device.Model" version="1.0.176" targetFramework="netnanoframework10" />
7+
<package id="UnitsNet.nanoFramework.ElectricPotential" version="4.102.0" targetFramework="netnanoframework10" />
8+
<package id="UnitsNet.nanoFramework.ElectricCurrent" version="4.102.0" targetFramework="netnanoframework10" />
9+
<package id="UnitsNet.nanoFramework.Power" version="4.102.0" targetFramework="netnanoframework10" />
10+
<package id="nanoFramework.System.Diagnostics.Stopwatch" version="1.0.160" targetFramework="netnanoframework10" />
11+
<package id="Nerdbank.GitVersioning" version="3.4.194" developmentDependency="true" targetFramework="netnanoframework10" />
12+
</packages>

0 commit comments

Comments
 (0)