GithubHelp home page GithubHelp logo

metro-arduino-wiring's People

Contributors

thomasfredericks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

metro-arduino-wiring's Issues

warning: extra tokens at end of #ifdef directive

When compiling in Arduino IDE 1.6.11, I receive the following error:

Metro.cpp:41:16: warning: extra tokens at end of #ifdef directive

#ifdef NOCATCH-UP

This issue appears to be resolved by changing #ifdef NOCATCH-UP to#ifdef NOCATCH_UP.

#ifdef NOCATCH-UP explanation

Could someone explain me what does it mean this define NOCATCH-UP and what happen in not defined? Below is part of code which I can't understnd.
#ifdef NOCATCH-UP
previous_millis = now ;
#else
previous_millis += interval_millis ;
#endif

Missing Metro::reset() in the example code

The library and example code is very brief and clear. But I think the Metro::reset() should be called once at the begaining of every example. Maybe in setup().

IMHO, the consequence of not calling Metro::reset() is not severe as the code repeats the HIGH/LOW sequence anyway. But not initilizing previous_millis by calling Metro::reset() causes the first round of the loop being excuted immediately rather than waiting for 250ms.

Or the constructor function could initialize previous_millis by calling Metro::reset().

parameter does not work for metro (1 * 60 * 1000) ... metro (1.0 * 60 * 1000) works fine

please try the following code:

# include // Include Metro library # define METROWITHDOT 1.0 // in minutes # define METROWITHOUTDOT 1 // in minutes

Metro metroHeartbeat = Metro(1000);

Metro metroWithDotDefine = Metro(METROWITHDOT * 60 * 1000); // works
Metro metroWithOutDotDefine = Metro(METROWITHOUTDOT * 60 * 1000); // does not work
Metro metroWithDot = Metro(1.0 * 60 * 1000); // works
Metro metroWithOutDot = Metro(1 * 60 * 1000); // does not work
Metro metro1MinuteWithDot = Metro (60000.0); // works
Metro metro1MinuteWithOutDot = Metro (60000); // works

int counter = 1;

void setup()
{
Serial.begin(9600);
}

void loop()
{
if (metroHeartbeat.check() == 1)
{
Serial.print("Heartbeat: ");
Serial.println(counter, DEC);
counter++;
}

if (metroWithDotDefine.check() == 1)
{
Serial.println("MetroWithDotDefine_____triggered");
}

if (metroWithOutDotDefine.check() == 1)
{
Serial.println("METROWITHOUTDOTDEFINE_TRIGGERED");
}

if (metroWithDot.check() == 1)
{
Serial.println("MetroWithDot___________triggered");
}

if (metroWithOutDot.check() == 1)
{
Serial.println("METROWITHOUTDOT________TRIGGERED");
}

if (metro1MinuteWithDot.check() == 1)
{
Serial.println("Metro1MinuteWithDot____triggered");
}

if (metro1MinuteWithOutDot.check() == 1)
{
Serial.println("Metro1MinuteWithOutDot_triggered");
}
}

i never see any serial printout in capital letters ;(

can you confirm?

Henning

Library not loading

Tried to load the .zip library into Wiring and get the following error:
Specified folder/zip file does not contain a valid library

I'm using the latest version of Metro-Arduino-Wiring-master

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.