Code Monkey home page Code Monkey logo

particle-onewire's Introduction

OneWire

A port of the PJRC OneWire library for Arduino to work for both the Particle Core and Photon

How it works

The Arduino library used defines for these and directly manipulated the bits/ports/masks for maximum speed. Tidwelltimj switched to using functions in the initial port, using the source from the Core firmware for digitalWrite(), etc., but removed the various safety checks for speed.

The main action of the port is in Particle-OneWire.h where the various fast versions of digitalWrite, digitalRead and pinMode are defined.

The port to the Photon moved these functions to the header file in the hopes that the compiler will inline them.

Areas for improvement

The way it is right now seems to work in a very basic test with 1 DS18B20 temperature sensor, but it's not clear if the current port is fast enough for all uses.

There is a discussion of fast writes on the particle forums, but it doesn't discuss fast reads or pinmode changes, so if there is a problem with the library being too slow, the first place to look into improving is the reads and pinmode changes.

Contributors

The initial port to the Core was done by paste by TIDWELLTIMJ. The initial paste was separated separated into multiple files by krvarma.

Initial support for the Photon was done by Brendan Albano. cdrodriguez fixed some issues with the Core and formatted the library for Web IDE use.

particle-onewire's People

Contributors

cdrodriguez avatar balbano 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.