braydenanderson2014 / C-Arduino-Libraries

This repository contains C++ and Arduino Libraries that are lightweight and easy to use. All libraries were created/mimicked by me and chatgpt.
Apache License 2.0
13 stars 0 forks source link

Timer Library does not appear to be functioning #67

Closed braydenanderson2014 closed 5 months ago

braydenanderson2014 commented 6 months ago

Describe the Issue When using wokwi simulator, the timer code does not seem to be working correctly. Random characters show up; Library Name and Version: Name: Timer (SimpleArduinoTimer) Version: 1.0.4 (Platformio)

Environment:

Library Source:

Expected Behavior Timer should not prevent code execution on the arduino. All Serial.println statements should print their contents.

Actual Behavior Random characters print, code does not appear to be working.

To Reproduce Steps to reproduce the behavior:

  1. Include library '...'
  2. Initialize the library '...'
  3. See error

Error Message & Code Snippet NA

#include <Arduino.h>

#include "SimpleArduinoTimer.h"

Timer timer;
//SDList <String> strings(10, "pagefile.dat");
//ArrayList <String> list = ArrayList<String>(ArrayList<String>::DYNAMIC, 10);
void setup(){
  while(!Serial){}
  delay(1000);
  Serial.println("Begining Timer");
  timer.debug = false;
  timer.setTargetMinutes(5);
  timer.start();
  while(!timer.hasReachedTarget()){
    if(timer.checkTimer(10000)){
      Serial.println(timer.remainingTime() + " minutes Remain");
    }
  }
  Serial.println("Timer is complete");
}

void loop(){

}

Additional Context Add any other context about the problem here.

braydenanderson2014 commented 5 months ago

Issue patched in Timer V1.0.6 (Arduino Version V1.0.1-BETA)... Both Versions have now been published to their respective platforms. (Arduino library Manager, and Platformio).. However it may take some time for Arduino Library Manager to detect the change.