Coder Social home page Coder Social logo

mnpwmlib's Introduction

MNPWMLib

A PWM library for Arduino mkr wifi 1010.
Supports generating a Normal PWM (aka single slope, aka Fast PWM) signal on any digital pin D0 - D9.
Based off a 48Mhz clock.
User can optionally provide a callback routine to be called when PWM duty limit hit.
User can optionally provide a callback routine to be called each time the PWM top value is reached.
User supplies a prescalar, top and duty value.
Library has a function to calculate best prescalar and top values if needed.

Note: this code uses attachInterruptParam. There is a known issue in the arduino 1.8.13 release for SAMD where this function is in the standard include libraries but not included in the actual libraries that are linked. This will cause an unresolved linkage error.
This has a fix but is not yet released, see:
arduino/ArduinoCore-samd#667
arduino/ArduinoCore-samd#624

To fix this either wait for the next release and check it is resolved or pro tem replace the Winterrupts.cpp file with the fixed version.

The resolved version can be found here:
https://github.com/arduino/ArduinoCore-samd/blob/9a67d2d1ffa281328ba6965fe6d9f6245e18df5c/cores/arduino/WInterrupts.c

Assuming you have installed arduino for your own user, this should replace the version installed as part of 1.8.13 on your local machine at
C:\Users\[your username]\AppData\Local\Arduino15\packages\arduino\hardware\samd\1.8.13\cores\arduino

mnpwmlib's People

Contributors

naylom avatar

Watchers

 avatar

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.