Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seeed-studio/mt3620_grove_shield
C library, Azure Sphere, MT3620 Grove Shield, I2C, Analog, SC18IM700, AD7992, Visual Studio 2017
https://github.com/seeed-studio/mt3620_grove_shield
azure-sphere grove shield
Last synced: 22 days ago
JSON representation
C library, Azure Sphere, MT3620 Grove Shield, I2C, Analog, SC18IM700, AD7992, Visual Studio 2017
- Host: GitHub
- URL: https://github.com/seeed-studio/mt3620_grove_shield
- Owner: Seeed-Studio
- License: mit
- Created: 2018-10-17T12:26:54.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-31T00:10:34.000Z (over 3 years ago)
- Last Synced: 2023-03-11T21:19:18.572Z (almost 2 years ago)
- Topics: azure-sphere, grove, shield
- Language: C
- Homepage:
- Size: 5.69 MB
- Stars: 21
- Watchers: 16
- Forks: 24
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About Azure Sphere MT3620 Grove Shield Library
This is library for Azure Sphere MT3620 Grove Shield, the shield enhences Azure Sphere by adding I2C interface and Analog input.
## Requirements
- Operation Systems - Windows 10 or Ubuntu 18.04
- Developer Tools: Visual Studio [Visual Studio Community/Professional/Enterprise](https://visualstudio.microsoft.com/downloads/) or [Visual Studio Code](https://code.visualstudio.com/)
- Hardware - [Azure Sphere](https://www.seeedstudio.com/Azure-Sphere-MT3620-Development-Kit-US-Version-p-3052.html), [MT3620 Grove Shield](https://www.seeedstudio.com/MT3620-Grove-Shield-p-3145.html)## Create a MT3620 application
Review the [Azure Sphere documentation](https://docs.microsoft.com/en-au/azure-sphere/) for the guide to setting up the developer tools and Azure Sphere SDK on Windows 10 or Ubuntu 18.04.
## MT3620 Grove Shield App Manifest
Select __app_manifest.json__ in the application project, add the below attributions, so that we can use the peripherals that MT3620 Grove Shield would use.
```JSON
"Capabilities": {
"Gpio": [ 8, 9, 10, 15, 16, 17, 18, 19, 20, 12, 13, 0, 1, 4, 5, 57, 58, 11, 14, 48 ],
"Uart": [ "ISU0", "ISU3" ],
"AllowedApplicationConnections": []
}
```When using a hardware definition file, you must use an identifier for __app_manifest.json__.
```JSON
"Capabilities": {
"Gpio": [ "$MT3620_GPIO8", "$MT3620_GPIO9", "$MT3620_GPIO10", "$MT3620_GPIO15", "$MT3620_GPIO16", "$MT3620_GPIO17", "$MT3620_GPIO18", "$MT3620_GPIO19", "$MT3620_GPIO20", "$MT3620_GPIO12", "$MT3620_GPIO13", "$MT3620_GPIO0", "$MT3620_GPIO1", "$MT3620_GPIO4", "$MT3620_GPIO5", "$MT3620_GPIO57", "$MT3620_GPIO58", "$MT3620_GPIO11", "$MT3620_GPIO14", "$MT3620_GPIO48" ],
"Uart": [ "$MT3620_ISU0_UART", "$MT3620_ISU3_UART" ],
"AllowedApplicationConnections": []
}
```[Here](https://docs.microsoft.com/en-us/azure-sphere/app-development/manage-hardware-dependencies) for details of the hardware definition file.
## Some available header files
- Grove.h
- Sensors/Grove4DigitDisplay.h
- Sensors/GroveRelay.h
- Sensors/GroveTempHumiBaroBME280.h
- Sensors/GroveTempHumiSHT31.h
- Sensors/GroveAD7992.h
- Sensors/GroveOledDisplay96x96.h
- Sensors/GroveRelay.h
- Sensors/GroveRotaryAngleSensor.h
- Sensors/GroveLEDButton.h
- Sensors/GroveLightSensor.h## Usage of the library, see Example - Temp and Huminidy SHT31
1. Add headers
```C
#include "Grove.h"
#include "Sensors/GroveTempHumiSHT31.h"
```2. Initialize the shield in main() function
```C
int i2cFd;
GroveShield_Initialize(&i2cFd, 115200); // baudrate - 9600,14400,19200,115200,230400
```1. Initialize and instantiation
```C
void* sht31 = GroveTempHumiSHT31_Open(i2cFd);
```4. Read temp and humidiy from the sensor
```C
GroveTempHumiSHT31_Read(sht31);
float temp = GroveTempHumiSHT31_GetTemperature(sht31);
float humi = GroveTempHumiSHT31_GetHumidity(sht31);
```