Git Product home page Git Product logo

mt3620_grove_shield's Introduction

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

Create a MT3620 application

Review the Azure Sphere documentation 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.

"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.

"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 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
#include "Grove.h"
#include "Sensors/GroveTempHumiSHT31.h"
  1. Initialize the shield in main() function
int i2cFd;
GroveShield_Initialize(&i2cFd, 115200); // baudrate - 9600,14400,19200,115200,230400 
  1. Initialize and instantiation
void* sht31 = GroveTempHumiSHT31_Open(i2cFd);
  1. Read temp and humidiy from the sensor
GroveTempHumiSHT31_Read(sht31);
float temp = GroveTempHumiSHT31_GetTemperature(sht31);
float humi = GroveTempHumiSHT31_GetHumidity(sht31);

mt3620_grove_shield's People

Contributors

felipebalbi avatar gloveboxes avatar lanselambor avatar matsujirushi avatar pillar1989 avatar workshopshed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mt3620_grove_shield's Issues

app_manifest.json in OLED sample

I had to modify the app_manifest of OLED sample for Grove I2C to work well. Specifically, the Gpio list is missing entry '1'. This change made the sample work for me.

Azure Sphere real-time capable MT3620_Grove_Shield library

Hi everybody

While developing with the MT3620 Sphere kit, I noticed the MT3620_Grove_Shield library does not work on real-time apps.

This in very important for us, as we need to connect peripherals to the RT core and send them via intercore-communication to the HL core. This is however impossible for me to implement on my own...

Is there an example of how to use the Light sensor in a Real-Time app or are there plans to create a Real-Time capable MT3620_Grove_Shield library?

Best regards,
Ben

app_manifest.json URL

The app_manifest.json file contains a URL, when I first saw the code, "SeeedIoTHubTest.azure-devices.net" I thought it might be calling home. Probably best to drop this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.