未验证 提交 d47bf98b 编写于 作者: D Dimitrios Maragkos 提交者: GitHub

Added automatic markdown link checking and fixed broken links (#1970)

* Changed src/devices/Mcp3008 to src/devices/Mcp3xxx

* Added markdown-link-check

* formatting

* fixed more broken links

* fixed more broken links

* TM1637 datasheet

* renamed config file and added ignore urls
上级 f100e3e4
{
"ignorePatterns": [
{ "pattern": "https://eu.industrial.panasonic.com/sites/default/pidseu/files/downloads/files/" },
{ "pattern": "https://www.akm.com/akm/en/file/datasheet/AK8963C.pdf" },
{ "pattern": "https://dotnet.myget.org/feed/dotnet-core/package/nuget/Iot.Device.Bindings" },
{ "pattern": "../.vscode/launch.json" },
{ "pattern": "../.vscode/tasks.json" },
{ "pattern": "http://url/image" },
{ "pattern": "https://dev.azure.com/dnceng/internal/_build\\?definitionId" },
{ "pattern": "https://www.pine64.org/\\?page_id=46823" },
{ "pattern": "http://ecee.colorado.edu/~mcclurel/Philips_I2C_IO_Expanders_AN469_2.pdf" },
{ "pattern": "https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/core/MPU-6886-000193%2Bv1.1_GHIC_en.pdf" }
]
}
......@@ -107,6 +107,13 @@ stages:
markdownlint -c $(System.DefaultWorkingDirectory)/.markdownlint.json $(System.DefaultWorkingDirectory)
displayName: 'Execute Markdownlint'
# Scan markdown files for dead links
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- powershell: |
npm install -g markdown-link-check
ls -r *.md | % { markdown-link-check -c $(System.DefaultWorkingDirectory)\.markdown-link-check.json $_.FullName; if (-Not $?) { throw "One of the links is wrong" } }
displayName: 'Execute markdown-link-check'
# Use utility script to run script command dependent on agent OS.
- script: build.cmd -ci -sign
-configuration $(_BuildConfig)
......
......@@ -7,7 +7,7 @@ See the following resources to get started.
This repository mainly contains two different components:
1. **System.Device.Gpio** library and tests which is the main library that has the implementation for protocols such as: GPIO, SPI, I2C, PWM. This library is fully supported by the dotnet team since it has the same level of support that dotnet/corefx does. All the code for the library lives under src/System.Device.Gpio. This library targets .NET Standard 2.0, and will work on both Windows and Linux. It's implementation consists of just IL code, so that means that it is supported across different platforms. In order to add new API to this library, an API Proposal would have to be submitted and approved first. [Here](https://github.com/dotnet/iot/issues/122) is an example of a how a good API proposal should look like.
1. **Iot.Device.Bindings** device bindings library. This is a collection of types which work as wrappers (or bindings) for devices and sensors which are able to talk to a microcontroller unit (or MCU like a Raspberry Pi for example) using the protocols supported by System.Device.Gpio. For example: [BME280](/src/devices/Bmxx80/README.md) is a temperature sensor which uses SPI and I2C in order to communicate with a MCU and is able to report the current temperature. Because the process of how to compute the temperature from the data is not trivial, we have a `Bme280` class which exposes friendly methods like `ReadTemperature()` which will internally use either SPI or I2C to get the current temperature value. In order to start adding a new binding, check out our [guide on how to contribute a new binding](/tools/templates/DeviceBindingTemplate/README.md). It is worth noting that even though all device bindings will be built and packaged as a single library (Iot.Device.Bindings), the code is split under src/devices on individual projects for easier development of a single binding and developer inner-loop.
1. **Iot.Device.Bindings** device bindings library. This is a collection of types which work as wrappers (or bindings) for devices and sensors which are able to talk to a microcontroller unit (or MCU like a Raspberry Pi for example) using the protocols supported by System.Device.Gpio. For example: [BME280](../src/devices/Bmxx80/README.md) is a temperature sensor which uses SPI and I2C in order to communicate with a MCU and is able to report the current temperature. Because the process of how to compute the temperature from the data is not trivial, we have a `Bme280` class which exposes friendly methods like `ReadTemperature()` which will internally use either SPI or I2C to get the current temperature value. In order to start adding a new binding, check out our [guide on how to contribute a new binding](../tools/templates/DeviceBindingTemplate/README.md). It is worth noting that even though all device bindings will be built and packaged as a single library (Iot.Device.Bindings), the code is split under src/devices on individual projects for easier development of a single binding and developer inner-loop.
## System.Device.* APIs
......
......@@ -6,7 +6,7 @@ FSR generates analog signal so it should be connected to analog input of a contr
## Detecting pressure/squeezing with Fsr408, Mcp3008 and Raspberry Pi
In below example MCP3008 Analog to Digital Converter used for converting FSR analog output into digital. Read value then can be used for calculating voltage, resistance and pressure force approxinmately. We need to create Mcp3008 instance depending on how you connected it to the controller, [please refer this for more about binding MCP3008](https://github.com/dotnet/iot/tree/main/src/devices/Mcp3008/samples)
In below example MCP3008 Analog to Digital Converter used for converting FSR analog output into digital. Read value then can be used for calculating voltage, resistance and pressure force approxinmately. We need to create Mcp3008 instance depending on how you connected it to the controller, [please refer this for more about binding MCP3008](https://github.com/dotnet/iot/tree/main/src/devices/Mcp3xxx/samples)
Code sample for [measuring pressure/squeezing with Fsr408 and ADC converter MCP3008](Program.cs#L24-L37):
......@@ -71,6 +71,6 @@ Here we are using pin 18 for input, if you are using different pin please update
The sample is based on following resources:
* [FSR data sheet](https://cdn-learn.adafruit.com/assets/assets/000/010/126/original/fsrguide.pdf)
* [Reading Analog Input from a Potentiometer](https://github.com/dotnet/iot/tree/main/src/devices/Mcp3008/samples)
* [Reading Analog Input from a Potentiometer](https://github.com/dotnet/iot/tree/main/src/devices/Mcp3xxx/samples)
* [Using an FSR](https://learn.adafruit.com/force-sensitive-resistor-fsr/using-an-fsr)
* [Basic Resistor Sensor Reading on Raspberry Pi](https://learn.adafruit.com/basic-resistor-sensor-reading-on-raspberry-pi)
......@@ -6,7 +6,7 @@
- RGB Matrix bonnet for Raspberry PI
- Raspberry PI with SD card
For different or similar but not identical setup please refer to [RGB LED Matrix docs](../../src/devices/RGBLedMatrix/README.md) and [sample](../../src/devices/RGBLedMatrix/samples/README.md) and the code will need to be modified to account for those changes.
For different or similar but not identical setup please refer to [RGB LED Matrix docs](../../src/devices/RGBLedMatrix/README.md) and [sample](../../src/devices/RGBLedMatrix/samples/Program.cs) and the code will need to be modified to account for those changes.
To setup autostart refer to [these instructions](../../Documentation/How-to-start-your-app-automatically-on-boot.md).
......
# More blinking lights, with hardware controls
This [sample](Program.cs) demonstrates blinking multiple LED on different schedules and controlling the LEDs from hardware controls. The sample builds on the [Blink an LED](../led-blink/README.md) and [Mcp3008](../../src/devices/Mcp3008/samples/README.md) samples.
This [sample](Program.cs) demonstrates blinking multiple LED on different schedules and controlling the LEDs from hardware controls. The sample builds on the [Blink an LED](../led-blink/README.md) and [Mcp3008](../../src/devices/Mcp3xxx/README.md) samples.
## Code
......
# AK8963 - Magnetometer
The AK8963 is a magnetometer that can be controlled either thru I2C either thru SPI. It is present in other sensors like the [MPU9250](../Mpu9250/README.md). This implementation fully supports the I2C mode and the usage thru the MPU9250. It does not support SPI.
The AK8963 is a magnetometer that can be controlled either thru I2C either thru SPI. It is present in other sensors like the [MPU9250](../Mpu6xxx9xxx/README.md). This implementation fully supports the I2C mode and the usage thru the MPU9250. It does not support SPI.
## Documentation
......@@ -8,7 +8,7 @@ Documentation for the AK8963 can be found [here](https://www.akm.com/akm/en/file
## Usage
You can find an example in the [sample](https://github.com/dotnet/iot/tree/main/src/devices/Ak8963/samples/ak8963.sample.cs) directory. Usage is straight forward including the possibility to have a calibration.
You can find an example in the [sample](./samples/Program.cs) directory. Usage is straight forward including the possibility to have a calibration.
```csharp
var mpui2CConnectionSettingmpus = new I2cConnectionSettings(1, Ak8963.Ak8963.DefaultI2cAddress);
......@@ -43,7 +43,7 @@ Console.WriteLine($"Mag Y = {ak8963.MagnometerBias.Y}");
Console.WriteLine($"Mag Z = {ak8963.MagnometerBias.Z}");
```
You will find a full example on how to extract raw data without calibration on the [MPU9250 sample](../Mpu9250/samples/Program.cs).
You will find a full example on how to extract raw data without calibration on the [MPU9250 sample](../Mpu6xxx9xxx/samples/Mpu9250/Program.cs).
If no calibration is performed, you will get a raw data cloud which looks like this:
......@@ -59,7 +59,7 @@ Once the calibration is done, you will be able to read the data with the bias co
## Using a different I2C interface
This sensor is used for example in the [MPU9250](../Mpu9250/README.md). The MPU9250 is in this case a master I2C controlling the secondary AK8963 I2C sensor. An abstract class is available to implement basic I2C operation:
This sensor is used for example in the [MPU9250](../Mpu6xxx9xxx/README.md). The MPU9250 is in this case a master I2C controlling the secondary AK8963 I2C sensor. An abstract class is available to implement basic I2C operation:
```csharp
public abstract class Ak8963I2cBase
......
......@@ -9,7 +9,7 @@ Documentation for the Bmm150 can be [found here](https://www.bosch-sensortec.com
## Usage
You can find an example in the [sample](./samples/Bmm150.sample.cs) directory. Usage is straight forward including the possibility to have a calibration.
You can find an example in the [sample](./samples/Program.cs) directory. Usage is straight forward including the possibility to have a calibration.
```csharp
I2cConnectionSettings mpui2CConnectionSettingmpus = new(1, Bmm150.DefaultI2cAddress);
......
......@@ -9,8 +9,8 @@ SPI and I2C can be used to communicate with the device (only I2C implemented so
The implementation supports the following devices:
- BMP280 temperature and barometric pressure sensor ([Datasheet](https://cdn-shop.adafruit.com/datasheets/BST-BMP280-DS001-11.pdf))
- BME280 temperature, barometric pressure and humidity sensor ([Datasheet](https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280-DS002.pdf))
- BME680 temperature, barometric pressure, humidity and VOC gas sensor ([Datasheet](https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME680-DS001.pdf))
- BME280 temperature, barometric pressure and humidity sensor ([Datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme280-ds002.pdf))
- BME680 temperature, barometric pressure, humidity and VOC gas sensor ([Datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf))
## Usage
......
......@@ -19,7 +19,7 @@ namespace Iot.Device.Bno055
{
/// <summary>
/// The default I2C Address, page 91 of the main documentation
/// https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BNO055-DS000.pdf
/// https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf
/// </summary>
public const byte DefaultI2cAddress = 0x28;
......
......@@ -8,7 +8,7 @@ All operations for a current usage has been developed. The individual interrupti
![BNO055](./BNO055.jpg)
BNO055 [datasheet](https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BNO055-DS000.pdf)
BNO055 [datasheet](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf)
You will find this device as ["Inertial Measurement Unit"](https://www.dexterindustries.com/product/imu-sensor/) or ["Adafruit BNO055 Absolute Orientation Sensor"](https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/overview)
......
......@@ -8,7 +8,7 @@ The [Raspberry Pi Build HAT](https://raspberrypi.com/products/build-hat) is an a
This binding used the following documentations:
- Raspberry Pi [Build HAT](https://www.raspberrypi.com/documentation/accessories/build-hat.htm) documentation.
- Raspberry Pi [Build HAT](https://www.raspberrypi.com/documentation/accessories/build-hat.html) documentation.
- Raspberry Pi Build HAT [Serial Protocol](https://datasheets.raspberrypi.com/build-hat/build-hat-serial-protocol.pdf).
- Raspberry Pi Build HAT [official python library](https://datasheets.raspberrypi.com/build-hat/build-hat-python-library.pdf).
- [Powered Up serial link protocol](https://www.philohome.com/wedo2reverse/protocol.htm) from Philo.
......
......@@ -16,7 +16,7 @@ This class has been tested with various American Express, Visa and Mastercard, m
Some resources to understand how to communicate with a Credit Card and how to get the data out of it:
- [The EMV tutorial](https://www.openscdp.org/scripts/tutorial/emv/index.html) from the OpenSCDP web site
- [A good list of EMV & NFC Tags](https://www.eftlab.co.uk/knowledge-base/145-emv-nfc-tags/) from EFTLab
- [A good list of EMV & NFC Tags](https://www.eftlab.co.uk/knowledge-base/complete-list-of-emv-nfc-tags) from EFTLab
- [A complete list of APDU response](https://www.eftlab.co.uk/knowledge-base/complete-list-of-apdu-responses/) from EFTLab
- [A simple TLV parser](https://www.emvlab.org/tlvutils/) from emvlab.org
- [Book with all the contact card specifications](https://www.emvco.com/emv-technologies/contact/) and [contactless](https://www.emvco.com/emv-technologies/contactless/) from EMVCo. Note that those are the official specifications. Main book used for this decoder is the contactless EMV 4.3 book 3.
......
......@@ -2,7 +2,7 @@
This library supports [NDEF messages](https://nfc-forum.org/product/nfc-data-exchange-format-ndef-technical-specification/). NDEF is composed of a message with records in it. Every record can be a know type or a specific type. This library fully support all root type of messages.
NDEF messages are used on Mifare Cards and is included into this library as well. You have a full example using 2 different NFC readers [PN532](../../Pn532/README.md) and [PN1850](../../Pn1850/README.md) build in.
NDEF messages are used on Mifare Cards and is included into this library as well. You have a full example using 2 different NFC readers [PN532](../../Pn532/README.md) and [PN5180](../../Pn5180/README.md) build in.
## Usage
......@@ -182,4 +182,4 @@ Console.WriteLine($"This card is{isForm} NDEF formatted");
## Card type supported
NDEF per se is fully independent of cards, so the class can be used independently. A [Mifare implementation](../Mifare) has been done. All Mifare 1K, 2K and 4K are supported. The Mifare 300 are not. Also all [Ultralight cards](../Utralight) are supported as well.
NDEF per se is fully independent of cards, so the class can be used independently. A [Mifare implementation](../Mifare) has been done. All Mifare 1K, 2K and 4K are supported. The Mifare 300 are not. Also all [Ultralight cards](../Ultralight) are supported as well.
......@@ -30,7 +30,7 @@ var nfc = Console.ReadKey();
Console.WriteLine();
if (nfc is not { KeyChar: '1' or '2' })
{
Console.WriteLine("Please chose either PN532 or PN1850");
Console.WriteLine("Please chose either PN532 or PN5180");
return;
}
......
......@@ -8,7 +8,7 @@ The Max31856 device is a SPI interface cold-junction compensated thermocouple to
## Documentation
* Max31856 [datasheet](https://datasheets.maximintegrated.com/en/ds/Max31856.pdf)
* Max31856 [datasheet](https://datasheets.maximintegrated.com/en/ds/MAX31856.pdf)
## Usage
......
......@@ -29,7 +29,7 @@ var mpui2CConnectionSettingmpus = new I2cConnectionSettings(1, Mpu9250.DefaultI2
using Mpu9250 mpu9250 = new Mpu9250(I2cDevice.Create(mpui2CConnectionSettingmpus), i2CDeviceAk8963: I2cDevice.Create(new I2cConnectionSettings(1, Ak8963.DefaultI2cAddress)));
```
You can find an example in the [sample](./samples/Program.cs) directory. Usage is straightforward including the possibility to have a calibration for all sub sensors.
You can find an example in the [sample](./samples/Mpu9250/Program.cs) directory. Usage is straightforward including the possibility to have a calibration for all sub sensors.
```csharp
var mpui2CConnectionSettingmpus = new I2cConnectionSettings(1, Mpu9250.DefaultI2cAddress);
......@@ -199,4 +199,4 @@ It is then up to you to transform them into the correct data. You can multiply y
The following fritzing diagram illustrates one way to wire up the MPU9250 with a Raspberry Pi using I2C.
![Raspberry Pi Breadboard diagram](./Mpu9250_bb.png)
![Raspberry Pi Breadboard diagram](./images/Mpu9250.png)
......@@ -4,7 +4,7 @@ SCD4x is a CO<sub>2</sub>, temperature & humidity sensor from Sensirion. This pr
## Documentation
- SCD4x [datasheet](https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9.5_CO2/Sensirion_CO2_Sensors_SCD4x_Datasheet.pdf)
- SCD4x [datasheet](https://sensirion.com/media/documents/E0F04247/631EF271/CD_DS_SCD40_SCD41_Datasheet_D1.pdf)
## Usage
......
......@@ -4,7 +4,7 @@ SHT4x is a temperature and humidity sensor from Sensirion. This project supports
## Documentation
- SHT40 [datasheet](https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHT4x_Datasheet.pdf)
- SHT40 [datasheet](https://sensirion.com/media/documents/33FD6951/624C4357/Datasheet_SHT4x.pdf)
## Usage
......
......@@ -5,7 +5,7 @@ To reduce power cosumption this project use capability of sensor to allow measur
## Documentation
- SHTC3 [datasheet](https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/2_Humidity_Sensors/Datasheets/Sensirion_Humidity_Sensors_SHTC3_Datasheet.pdf)
- SHTC3 [datasheet](https://sensirion.com/media/documents/643F9C8E/6164081E/Sensirion_Humidity_Sensors_SHTC3_Datasheet.pdf)
## Usage
......
......@@ -4,7 +4,7 @@ TM1637 is a segments display with 6 characters Led controler. It used a 2 wire i
## Documentation
- TM1637 [datasheet](http://olimex.cl/website_MCI/static/documents/Datasheet_TM1637.pdf)
- TM1637 [datasheet](https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/docs/datasheet/unit/digi_clock/TM1637.pdf)
### Device family
......
......@@ -4,8 +4,8 @@ The μFire ISE Probe Interface is an I²C sensor that can read a pH probe. Attac
## Documentation
- [µFire connections](https://www.ufire.co/docs/uFireIse/#connections)
- [µFire class functions](https://www.ufire.co/docs/uFireIse/api.html#class-functions)
- [µFire connections](https://www.ufire.co/docs/uFire_EC/#connections)
- [µFire class functions](https://www.ufire.co/docs/uFire_EC/api.html#class-functions)
## Usage
......
......@@ -72,7 +72,7 @@ void Rainbow(Ws28xx neo, int count, int iterations = 1)
***Note:***
Using the SK6812 is almost the same, but the alpha channel of the color is used for the white LED. This means that the predefined color definitions (like ```System.Drawing.Color.Red```) will not work correctly as they have the alpha channel set to 255 (0xFF). That will turn the white LED always on. See the [sample](samples/SK6812_Samples/Programs.cs) for the main differences to the above code.
Using the SK6812 is almost the same, but the alpha channel of the color is used for the white LED. This means that the predefined color definitions (like ```System.Drawing.Color.Red```) will not work correctly as they have the alpha channel set to 255 (0xFF). That will turn the white LED always on. See the [sample](samples/LEDStripSample/Program.cs) for the main differences to the above code.
Because ```System.Drawing.Color``` is a readonly struct, it's not possible to change the any channel directly. In order to correctly set Red, use ```Color.FromArgb(0, 255, 0, 0)```. For setting the white LED, use ```Color.FromArgb(255, 0, 0, 0)```. It's also possible to use an existing definition and remove the white channel like this:
```csharp
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册