Support for Touch Alarm by microdev1 · Pull Request #3850 · adafruit/circuitpython · GitHub
Skip to content

Support for Touch Alarm#3850

Merged
jepler merged 7 commits into
adafruit:mainfrom
microdev1:touch-s2
Dec 30, 2020
Merged

Support for Touch Alarm#3850
jepler merged 7 commits into
adafruit:mainfrom
microdev1:touch-s2

Conversation

@microdev1

Copy link
Copy Markdown
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

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

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.

Comment thread ports/esp32s2/common-hal/alarm/__init__.c Outdated
Comment thread ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c Outdated
@microdev1 microdev1 requested a review from tannewt December 30, 2020 17:34
Comment thread ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c Outdated
@microdev1 microdev1 requested a review from tannewt December 30, 2020 21:17

@jepler jepler left a comment

Copy link
Copy Markdown

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

dglaude commented Jan 2, 2021

Copy link
Copy Markdown

@dglaude

dglaude commented Jan 2, 2021

Copy link
Copy Markdown

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
Copy Markdown
Collaborator Author

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