Open VikingVoltage opened 3 years ago
I assume you're not using a Teensy board. Teensy's are the only boards I own and, unfortunately, the Arduino Web IDE doesn't support them so I have no way to test. The example compiles just fine on desktop v1.8.12 of Arduino. That may be because the elapsedMillis and elapesdMicros libraries are included by default for the Teensy addon. You may need to install those libraries manually for the Web IDE? I'm not sure how it works because, like I said, I can't use it.
Please let me know if you get this library working on a board other than a Teensy because it would be the first time that I know of.
Ah correct. I am using Arduino Uno.
I expect I'll eventually install the desktop version of Arduino's IDE. If I'm still hunting down ways to test out single pin capacitive touch sensing, and have success with your code on the Uno, I'll let you know. (I'm just doing some interim capacitive touch testing prior to the arrival of a chip with a dedicated capacitive sensing unit.)
Thanks for the reply and your time.
I am receiving the same errors regarding elapsedMillis and elapsedMicros when trying to compile any of the Flicker examples for both Arduino Leonardo (ATMEGA32u4) and Adafruit Feather M0 (ATSAMD21G18) in the standard Arduino IDE (V1.8).
Is this library only compatible with the Teensy? As I am unfamiliar with the Teensy - is there any hope for expanding the compatibility of Flicker to the most common Arduino architectures? Or is the fundamental functionality of Flicker based on Teensy-specific features?
elapsedMillis and elapsedMicros are the only things that I know are specific to Teensy. I guess I was just used to using them. They're convenient but I'm sure the job can get done without them. I'll update (or accept a pull request) as soon as I can.
I forked Flicker and made some changes to replace:
elapsedMillis
with millis()
elapsedMicros
with micros()
touchRead()
with analogRead()
My changes to the timing system should hopefully retain the original functionality (although currently untested), however, replacing touchRead()
with analogRead()
completely removes capacitive touch functionality. (touchRead()
is a Teensy specific function.)
I can imagine two different approaches to reincorporate capacitive touch. Either (1) build in a dependency to an additional library such as CapacitiveSensor or (2) allow the user to bring their own capacitive touch library and have the user pass the sensor reading into Flicker somehow... Option 2 seems like the better approach but I'm still trying to work out what would be the best way to implement it.
I'm a newbie to Arduino and very rusty on my code, but very comfortable in the embedded systems environment.
I'm running the Flicker code example on-off_stable.ino via Arduino's Web IDE.
I get the error: 'elapsedMillis' does not name a type
I saw the same error with 'elapsedMicro' on a different build attempt.
Using library flicker_1_0_4 at version 1.0.4 in folder: /home/builder/opt/libraries/latest/flicker_1_0_4 In file included from /tmp/854220816/on-off_stable/on-off_stable.ino:3:0: /home/builder/opt/libraries/latest/flicker_1_0_4/src/TouchSwitch.h:63:5: error: 'elapsedMillis' does not name a type elapsedMillis held_millis = 0;