Skip to content

Support for Touch Alarm #3850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 30, 2020
Merged

Support for Touch Alarm #3850

merged 7 commits into from
Dec 30, 2020

Conversation

microdev1
Copy link
Collaborator

This PR adds support for setting a Touch Alarm.

Port(s) supported: (as of this PR)

  • esp32s2

Test Code:

import time
import alarm
import digitalio
from board import *

led = digitalio.DigitalInOut(LED)
led.direction = digitalio.Direction.OUTPUT
led.value = True

time.sleep(5)

print("WakeAlarm :- ", alarm.wake_alarm)
print()

alarm.exit_and_deep_sleep_until_alarms(alarm.touch.TouchAlarm(IO1))

@tannewt tannewt self-requested a review December 22, 2020 02:18
@tannewt tannewt added enhancement espressif applies to multiple Espressif chips power labels Dec 22, 2020
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR! Just a couple comments.

I wish my pin alarm PR was already in. I heard you hit the same issue I did. I hope we can figure it out soon.

@microdev1 microdev1 requested a review from tannewt December 30, 2020 17:34
@microdev1 microdev1 requested a review from tannewt December 30, 2020 21:17
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tannewt 's requested changes seem to have been addressed. Merging so we can have this in beta3.

@jepler jepler dismissed tannewt’s stale review December 30, 2020 22:25

microdev addressed the changes

@jepler jepler merged commit 5698b8b into adafruit:main Dec 30, 2020
@microdev1 microdev1 deleted the touch-s2 branch December 31, 2020 06:29
@dglaude
Copy link

dglaude commented Jan 2, 2021

I tested this feature with the ESP32S2.
It seems that my board wakeup twice in a raw when I touch.
Basically it made this code blink the blue LED twice in a raw for 5 seconds (even with a single touch of the pin).
This is tested with 6.1.0-beta3.

@dglaude
Copy link

dglaude commented Jan 2, 2021

Ok, the double trigger on touch only seems to occur with the USB connected to computer, but not when on a power supply. So that would be on fake sleep path.

Also wake-up speed on touch seems much faster on fake sleep than on real sleep... understandable but should it be better faked?

@microdev1
Copy link
Collaborator Author

Hi @dglaude Thanks for testing this out. Can you please open an issue for this. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement espressif applies to multiple Espressif chips power
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants