Git Product home page Git Product logo

arduino-softtimer's People

Contributors

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

arduino-softtimer's Issues

STATE_ON Redefinition

Debouncer.h and BlinkTask.h define STATE_ON to different values.

In file included from****:9:0:
***/Arduino/libraries/SoftTimer/src/Debouncer.h:41:0: warning: "STATE_ON" redefined
 #define STATE_ON 2
 ^
In file included from ***/Arduino/libraries/SoftTimer/src/Heartbeat.h:31:0,
                 from****:7:
/***/Arduino/libraries/SoftTimer/src/BlinkTask.h:35:0: note: this is the location of the previous definition
 #define STATE_ON   1

Problem - Task taskCycle( 100, Cycle) throws error: Cycle not declared in this scope

Environment:
SoftTimer v3.1.0, PciManager 2.1.0, Arduino 1.6.7

My code:

include <PciManager.h>

include <PciListenerImp.h>

include <PciListener.h>

include <Adafruit_MotorShield.h>

include <stdlib.h>

include <Wire.h>

include "utility/Adafruit_PWMServodriver.h"

include <SoftTimer.h>

....
Task taskCycle( 100, Cycle); // This line throws the error
...

void setup() {
...
SoftTimer.add(&taskCycle);
}
void Cycle(Task* me)
{
... Either my code, or I just comment it all out, it doesn't matter.
}

If I run the same program in a different environment, it works
Arduino 1.6.1, I can't find the version# for PciManager or for SoftTimer on the pc it runs on, they're both 2014 versions.

Any suggestions?

Strange compile error with SoftTimer6Debounce1

when using SoftTimer6Debounce1 either from the Examples folder or pasted from github, I get the following compile error (verbose) - shown at the end of this message.
However, if I move the onPressed() function to above the "Debouncer" line, it compiles fine.
Oddly, I do not get the same error on the onReleased() function.

Any ideas?

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Greg\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Greg\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Greg\Documents\Arduino\libraries" -fqbn=arduino:avr:leonardo -vid-pid=0X2341_0X8036 -ide-version=10609 -build-path "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\examples\SoftTimer6Debouncer1\SoftTimer6Debouncer1.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\Greg\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\Greg\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\Greg\Documents\Arduino\libraries" -fqbn=arduino:avr:leonardo -vid-pid=0X2341_0X8036 -ide-version=10609 -build-path "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\examples\SoftTimer6Debouncer1\SoftTimer6Debouncer1.ino"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src\PciListenerImp.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src\PciListenerImp2.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src\PciManager.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\BlinkTask.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\Debouncer.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\DelayRun.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\Dimmer.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\FrequencyTask.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\Heartbeat.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\Rotary.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\SoftPwmTask.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\SoftTimer.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\Task.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src\TonePlayer.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10609 -DARDUINO_AVR_LEONARDO -DARDUINO_ARCH_AVR  -DUSB_VID=0x2341 -DUSB_PID=0x8036 '-DUSB_MANUFACTURER="Unknown"' '-DUSB_PRODUCT="Arduino Leonardo"' "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" "-IC:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\leonardo" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master\src" "-IC:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master\src" "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp" -o "C:\Users\Greg\AppData\Local\Temp\buildaadc362bdf274423cf36f8a56937bf07.tmp\sketch\SoftTimer6Debouncer1.ino.cpp.o"
SoftTimer6Debouncer1:8: error: 'onPressed' was not declared in this scope

 Debouncer debouncer(INPUT_PIN, MODE_CLOSE_ON_PUSH, onPressed, onReleased);

                                                    ^

SoftTimer6Debouncer1:8: error: 'onReleased' was not declared in this scope

 Debouncer debouncer(INPUT_PIN, MODE_CLOSE_ON_PUSH, onPressed, onReleased);

                                                               ^

Using library arduino-pcimanager-master at version 2.1.0 in folder: C:\Users\Greg\Documents\Arduino\libraries\arduino-pcimanager-master 
Using library arduino-softtimer-master at version 3.1.0 in folder: C:\Users\Greg\Documents\Arduino\libraries\arduino-softtimer-master 
exit status 1
'onPressed' was not declared in this scope

Need PciManager Library

What steps will reproduce the problem?
1. I down loaded the Softtimer library 
2. Next when every I run the examples but kep getting complier errors

Solution
There errors were resolved by down loading the PciManager library

Original issue reported on code.google.com by [email protected] on 13 Dec 2012 at 1:22

ESP8266 NodeMcu Soft WDT reset error

Code from examples, but with Serial.println

#include <SoftTimer.h>

// -- Define method signature.
void callBack1(Task* me);
void callBack2(Task* me);

Task t1(2000, callBack1);
Task t2(1111, callBack2);

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

SoftTimer.add(&t1);
SoftTimer.add(&t2);
}

void callBack1(Task* me) {
Serial.println("callBack1");
}
void callBack2(Task* me) {
Serial.println("callBack2");
}

Output:
callBack1
callBack2
callBack2
callBack1
callBack2

Soft WDT reset

ctx: cont
sp: 3ffef1c0 end: 3ffef3b0 offset: 01b0

stack>>>
3ffef370: feefeffe 3ffee290 3ffee27c 40201d51
3ffef380: 3fffdad0 00000000 3ffee380 40201d67
3ffef390: feefeffe feefeffe 3ffee380 40202140
3ffef3a0: feefeffe feefeffe 3ffee390 40100114
<<<stack<<<
�3⸮⸮⸮�⸮

SoftTimer - TinyZero and SAMD21 Support

Hi there,

I'm currently developing a project for which the Protothreading SoftTimer uses is ideal. The simplicity of SoftTimer is highly important in this code's design process to me. However, after setting up the code SoftTimer requires, I receive the error at the end of this post. I'm using a TinyZero board, a highly miniaturized version of the Arduino Zero (this is the link to the TinyZero's product site - https://tinycircuits.com/products/tinyzero-processor?variant=21137366515796). As part of my testing process before reporting, I tested both my project code and the included SoftTimer1Task example code - I believe both reported the same error. I have two questions:

Is SoftTimer compatible with SAMD21-based processors? If not, what would be a good SAMD21-compatible alternative library?

Is there anything I can do on my end to rectify these errors?

Thank you in advance for any help you can provide!

ERROR LOG:

Arduino: 1.8.19 (Windows Store 1.8.57.0) (Windows 10), Board: "TinyZero, Default"

In file included from C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\cores\arduino/delay.h:23:0,

             from C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\cores\arduino/Arduino.h:81,

             from C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\BlinkTask.h:30,

             from C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\BlinkTask.cpp:27:

C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\BlinkTask.cpp: In member function 'virtual void BlinkTask::init()':

C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\variants\tinyzero/variant.h:65:55: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

#define portOutputRegister(port) ( &(port->OUT.reg) )

                                                   ^

C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\BlinkTask.cpp:46:25: note: in expansion of macro 'portOutputRegister'

this->_portRegister = portOutputRegister(digitalPinToPort(this->_outPin));

                     ^~~~~~~~~~~~~~~~~~

In file included from C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\cores\arduino/delay.h:23:0,

             from C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\cores\arduino/Arduino.h:81,

             from C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\SoftTimer.h:30,

             from C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\FrequencyTask.cpp:27:

C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\FrequencyTask.cpp: In constructor 'FrequencyTask::FrequencyTask(int, float)':

C:\Users\isaac\Documents\ArduinoData\packages\TinyCircuits\hardware\samd\1.1.0\variants\tinyzero/variant.h:65:55: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

#define portOutputRegister(port) ( &(port->OUT.reg) )

                                                   ^

C:\Users\isaac\Documents\Arduino\libraries\SoftTimer\src\FrequencyTask.cpp:35:19: note: in expansion of macro 'portOutputRegister'

_portRegister = portOutputRegister(digitalPinToPort(outPin));

               ^~~~~~~~~~~~~~~~~~

exit status 1

Error compiling for board TinyZero.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

SoftTimer6Rotary example

Would it be possible to publish SoftTimer6Rotary example with changes that makes compilations possible in latest Arduino version. I tried including function declarations "void callBack(Task* me);" but I could not make it compile. Compiler comes with error message:
exit status 1
invalid conversion from 'void ()(Task)' to 'void ()(short int, Rotary)' [-fpermissive]

Quick Start Guide code not working

I copied the Quick Start Guide code and downloaded the latest versions of both the SoftTimer and PciManager libraries; however, compilation throws an error about turnOn not being declared:

error: 'turnOn' was not declared in this scope

 Task taskOn(2000, turnOn);

                   ^~~~~~
error: 'turnOff' was not declared in this scope

 Task taskOff(1111, turnOff);

                    ^~~~~~~

In function 'void turnOn(Task*)':

warning: unused parameter 'me' [-Wunused-parameter]

 void turnOn(Task* me) {

                   ^~

In function 'void turnOff(Task*)':

warning: unused parameter 'me' [-Wunused-parameter]

 void turnOff(Task* me) {

                    ^~

Using library SoftTimer at version 3.2.0 in folder: C:\Users\Elijah\Documents\Arduino\libraries\SoftTimer 
Using library PciManager at version 2.1.4 in folder: C:\Users\Elijah\Documents\Arduino\libraries\PciManager 

exit status 1
'turnOn' was not declared in this scope

turnOn is definately defined, I copied the code from the example.

Compilition errors

Dear Sirs,
I have installed your latest version of arduino-softtimer at my Arduino (I tested in both 1.0.5-r2 and 1.6.4 running in Windows 7) but I get the following errors when try to get compile the example SoftTimer1Task.ino (but I get same errors on the others) :

In file included from C:\Users\mikek\[email protected]\Arduino-Latest Full\libraries\arduino_softtimer\Debouncer.cpp:28:
C:\Users\mikek\[email protected]\Arduino-Latest Full\libraries\arduino_softtimer/Debouncer.h:47: error: expected class-name before ',' token
C:\Users\mikek\[email protected]\Arduino-Latest Full\libraries\arduino_softtimer/Debouncer.h:72: error: ISO C++ forbids initialization of member 'debounceDelayMicros'
C:\Users\mikek\[email protected]\Arduino-Latest Full\libraries\arduino_softtimer/Debouncer.h:72: error: making 'debounceDelayMicros' static
C:\Users\mikek\[email protected]\Arduino-Latest Full\libraries\arduino_softtimer/Debouncer.h:72: error: ISO C++ forbids in-class initialization of non-const static member 'debounceDelayMicros'

What do you believe is wrong? What can I do in order to have this library working?

Thanks and Best Regards.

Could not load library

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

Compilation Error

After installing the latest version of both softtimer and Pci maneger using Arduino's "Manage Libraries..." , I receive the following error message on compilation :
#####################################################################
Arduino: 1.8.8 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

libraries\SoftTimer\SoftTimer.cpp.o (symbol from plugin): In function `SoftTimerClass::remove(Task*)':

(.text+0x0): multiple definition of `loop'

sketch\Main_IO.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here

c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.
#######################################################################

created from the simple following script:
########################################
#include <SoftTimer.h>
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
########################################

SoftTimer Error

I added both softtimer 3.1 and pcimanager 2.1.2 , although i get the pcilistener.h include error what should i do

Simple Delay

Hello,
My code has a lot of Delay()'s in it and looking to remove them so other callbacks can fire when needed.
Your library looks perfect for everything but my mental power cannot seem to figure out how to make a simple 3 second timer that does nothing. A callback is not really needed but created one that prints to the serial line, timer 1 callback fired...

For example, the Arduino needs to wait for devices to come online, 3 seconds is a good time. However, during that time the devices can be coming online and saying hello through a callback. The Delay() will miss these hello messages, correct?

I don't need/want this to fire every 3 seconds, only once.
Later make it a 10ms timer,
I can picture using 1 timer and changing its parameters when I need to use it.

There seems to be 2 ways to do it:

  1. Using the public variables provided by Task. - lastCallTimeMicros and periodMicros, nowMicros, and somewhere I read nowMicros set to mills() will reset it?

  2. Create 2 timers, using SoftTimer.add(task) and SoftTimer.remove(task) and a global variable that would be changed in the callback, TimerDone = true; for example, use a While loop until the global variable is set, clear it, reset timer?

I must be clearly missing something obvious here and have done too much reading. :)

Regression of Rotary encoder

I have been using this library for some years, thanks.

I recently found that when reflashing a device that I have had in operation for years, the rotary encoder stopped working. After some trial and error I found that it works great with SoftTimer up to version 3.1.5 but not with 3.2.0 which is the last available in Arduino Studio.

Symptoms with v3.2: Rotary encoder movement not being picked up at all, at least the callback is not called.

multiple definition of `loop'

When using a code like the following example, the library displays the 
following error:

SoftTimer\SoftTimer.cpp.o: In function `loop':
C:\Program Files (x86)\arduino\libraries\SoftTimer/SoftTimer.cpp:35: multiple 
definition of `loop'
sketch_apr14b.cpp.o:C:\Program Files (x86)\arduino/sketch_apr14b.ino:14: first 
defined here

#include <SoftTimer.h>
#include <BlinkTask.h>

#define LED_PIN 13

// -- On for 200ms off for 100ms, repeat it 2 times, sleep for 2000 ms and than 
start again.
BlinkTask heartbeat(LED_PIN, 200, 100, 2, 2000);

void setup() {
  heartbeat.start();
}

void loop(){
}

Original issue reported on code.google.com by [email protected] on 14 Apr 2013 at 10:27

Is any way to delete task?

Hello! Thanks for awesome lib.
I have a question. Can I stop or pause task for a while and start it again from another task?

SoftTimer1 Task - crashes

Hi,
I try to run this arduino sketch on my ESP8266, but the sketch crashes.....
Any ideas why?

#include <SoftTimer.h>

// -- Define method signature.
void callBack1(Task* me);
void callBack2(Task* me);

Task t1(1000, callBack1);
Task t2(5000, callBack2);

void setup() {
  Serial.begin(115200); 
  Serial.println("");
  SoftTimer.add(&t1);
  SoftTimer.add(&t2);
}

void callBack1(Task* me) {
  Serial.println("Task1");
}
void callBack2(Task* me) {
  Serial.println("Task2");
}

Serial log:

Task1
Task2
Task1
Task1
Task1

Soft WDT reset

ctx: cont 
sp: 3ffef1f0 end: 3ffef400 offset: 01b0

>>>stack>>>
3ffef3a0:  3ffe8468 0031d1a7 3ffee2cc 40201bef  
3ffef3b0:  3ffe8638 feefeffe 3ffee3b4 40201cf6  
3ffef3c0:  feefeffe 3ffee2e0 3ffee2b8 40201d59  
3ffef3d0:  3fffdad0 00000000 3ffee3d0 40201d6f  
3ffef3e0:  feefeffe feefeffe 3ffee3d0 40202148  
3ffef3f0:  feefeffe feefeffe 3ffee3e0 40100114  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v09f0c112
~ld
⸮

ESP32 support or examples

Can you identify a reason for me that this library won't work on an ESP32? It was difficult to get the ESP32 boards to even show in the Arduino IDE, and now that they do, your useful library doesn't seem to work for it. Esp recommends that ESP32 devices be programmed in their environment, which must be why they make them so hard to access in the Arduino IDE.

Can you enlighten me as to why I am getting my failure, please?

Everything was okay until...

C:\Users\debrucer\Documents\Arduino\libraries\SoftTimer\src\Debouncer.h:32:25: fatal error: PciListener.h: No such file or directory

compilation terminated.

Using library SoftTimer at version 3.1.3 in folder: C:\Users\debrucer\Documents\Arduino\libraries\SoftTimer
exit status 1
Error compiling for board ESP32 Dev Module.

Google Code will close!!

Have you got a plan to migrate this repository to another place? I would like 
to know the future of this project. Thanks!

Original issue reported on code.google.com by [email protected] on 27 Mar 2015 at 12:13

Compatibility with Arduino Zero boards

In testing with a Zero 32bit processor I get errors like this...
So it appears that this fine library is yet NOT compatible with this processor.

arduino-softtimer-master/src/BlinkTask.cpp:38:17: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
   _portRegister =  portOutputRegister(digitalPinToPort(outPin));

Enhancement Request: Add asynchronous AnalogScanner functionality

Arduino-Softtimer is a great and super useful library, that I have used in the past.

Lately, I am working on a project where I'd like to scan 12 analog channels on a Leonardo, apart from scanning digital pins (momentary push-buttons read with debounce), manage state of few LEDs, and push data over USB CDC to host.

There is this AnalogScanner library that lets one use an asynchronous approach to dealing with several analog channels, which might go very well with this library. Would it be possible to merge or build similar capability to AnalogScanner ?

SoftTimer7Heartbeat

error while compiling- myLoop was not declared in this scope. The following is the error message-

Arduino: 1.6.9 (Windows 10), Board: "Arduino Nano, ATmega328"

SoftTimer7Heartbeat:15: error: 'myLoop' was not declared in this scope

Task t1(0, myLoop);

        ^

exit status 1
'myLoop' was not declared in this scope

ESP8266 NodeMcu doesn't work with WiFi

I can't use wifi parallel with a soft timer lib. I can see console output with wifi status OK, but I can't ping ESP module. When I remove a soft timer lib from code, WiFi connection work fine, I can ping module.

`#include <SoftTimer.h>
#include <ESP8266WiFi.h>

// -- Define method signature.
void feedWatchdog(Task* me);
void callBack1(Task* me);
void callBack2(Task* me);

Task watchdogFeederTask(200, feedWatchdog);
Task t1(3000, callBack1);
Task t2(5000, callBack2);

char ssid[] = "ssid";
char wifiPass[] = "pass";

IPAddress ip(192, 168, 0, 8);
IPAddress gateway(192, 168, 0, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 0, 1);

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

//tasks
SoftTimer.add(&watchdogFeederTask);
SoftTimer.add(&t1);
SoftTimer.add(&t2);
}

void connectWiFi() {
WiFi.config(ip, gateway, subnet, dns);
WiFi.begin(ssid, wifiPass);

Serial.println("WiFi status:");
Serial.println(WiFi.status());

int wifiStatus = WiFi.status();

while (wifiStatus != WL_CONNECTED && wifiStatus != 6) {
delay(500);
Serial.print(".");
}
}

void feedWatchdog(Task* me) {
ESP.wdtFeed();
}

void callBack1(Task* me) {
Serial.println("callBack1");
}

void callBack2(Task* me) {
Serial.println("callBack2");
}
`

"SoftTimer6Debouncer1.ino" doesn't work

Hello,

the code doesn't react to a HIGH on Pin 3.
The "Ready." is shown in the Terminal, so the Communication should work.

What is the Problem?

Thanks!
Martin

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.