Coder Social home page Coder Social logo

wildernesslabs / meadow.core Goto Github PK

View Code? Open in Web Editor NEW
29.0 9.0 8.0 8.27 MB

Meadow BCL

Home Page: https://www.wildernesslabs.co

License: Apache License 2.0

C# 98.99% C 1.00% Dockerfile 0.01% Shell 0.01%
dotnet embedded hardware iot meadow csharp

meadow.core's Introduction

NuGet Badge Stable

iot, dotnet, meadow, meadow-core

Meadow.Core

Welcome to the Meadow Core library GitHub repository! This library is the foundation of the Meadow platform and provides a powerful set of tools for creating connected devices. The Meadow Core library includes APIs for common protocols such as SPI, I2C, and UART, as well as APIs for networking, storage, and more. The library is written in C# and is designed to work with the Meadow F7 Microcontroller. With Meadow Core, you can quickly and easily build connected devices that are powerful, reliable, and secure. Join our community and start building with Meadow Core today!

Repositories

Dependencies

If this repo is cloned, it will only build if the following repositories are cloned and stored at the same folder level:

  1. Meadow.Units contains a strong unitization into the entire stack of Meadow.
  2. Meadow.Logging a lightweight logging library for embedded hardware.
  3. Meadow.Contracts contains the interfaces used by the entire Meadow stack.
  4. Meadow.Modbus is a .NET assembly that provides Modbus RTU and TCP as well as Modbus TCP server capabilities.
  5. MQTTnet is a high performance .NET library for MQTT based communication.

Samples

Additionally, you might want to check out our repos with tons of samples with different levels of complexity and hardware requirements:

  1. Meadow.Core.Samples has all our sample projects that cover every feature Meadow has to offer with no extra peripherals required.
  2. Meadow.Project.Samples has en extensive collection of Meadow Projects using Meadow.Foundation, our peripheral driver and hardware control libraries to make .NET IoT development plug-and-play.
  3. Meadow.ProjectLab.Samples contains project samples for the breadboardless rapid prototyping board Project Lab.
  4. Meadow.Desktop.Samples contains project samples for Meadow.Windows and Meadow.Linux.

Unified GPIO Architecture

Peripherals Must Support Pin and Port

All peripherals must be able to be constructed with an IPin along with a device with the capabilities to configure a proper port (digital IO, analog, PWM, etc.) and a specific type of port such as IDigitalOutputPort, IPwmPort, IAnalogInputPort, etc.

Analog Example

public class AnalogSensor 
{
   protected IAnalogInputPort AnalogInputPort  { get; set; }

   public AnalogSensor (IAnalogInputController device, IPin pin)
     : this (device.CreateAnalogInputPort(pin)) { }

   public AnalogSensor (IAnalogInputPort analogInputPort) 
   { 
      AnalogInputPort = analogInputPort;
   }
}

Digital Example

public class Led 
{
   protected IDigitalOutputPort DigitalOutputPort { get; set; }

   public Led (IDigitalOutputController device, IPin pin)
   : this(device.CreateDigitalOutputPort(pin)) { }

   public Led (IDigitalPort digitalOutputPort) 
   {
      DigitalOutputPort = digitalOutputPort;
   }
}

PWM Example

public class PwmLed 
{
   protected IPwmPort PwmPort { get; set; }

   public PwmLed (IPwmOutputController device, IPin pin) 
      : this (device.CreatePwmPort(pin)) {  }

   public PwmLed (IPwmPort pwmPort) 
   {  
      PwmPort = pwmPort;
   }
}

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.