Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: snooze and teensy as a USB keyboard ?

  1. #1

    snooze and teensy as a USB keyboard ?

    Hi

    I would like to use a Teensy LC (or 3.2 or 3.6) as a keyboard device when connected to computer by usb and power efficient when not connected.
    Is this possible while retaining RAM?

    I don't mind if the user has to push a button to get a connection with the computer and that it goes back to no connection (and less power consumption) with a timer.

    (For simplicity I even could power it always by battery.)

    Alain

  2. #2
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    957
    Quote Originally Posted by AlainD View Post
    Hi

    I would like to use a Teensy LC (or 3.2 or 3.6) as a keyboard device when connected to computer by usb and power efficient when not connected.
    Is this possible while retaining RAM?

    I don't mind if the user has to push a button to get a connection with the computer and that it goes back to no connection (and less power consumption) with a timer.

    (For simplicity I even could power it always by battery.)

    Alain
    All the default low power modes in Snooze retain RAM.

  3. #3
    Quote Originally Posted by duff View Post
    All the default low power modes in Snooze retain RAM.
    Thanks, will it also be possible to get a USB keyboard working after sleeping?
    Is it worth testing?

    Alain

  4. #4
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    957
    Quote Originally Posted by AlainD View Post
    Thanks, will it also be possible to get a USB keyboard working after sleeping?
    Is it worth testing?

    Alain
    I haven't tried the USB keyboard with Snooze but I think all the wakeups methods should work, I would put in a good 2 sec delay after waking for the usb to reconnect but there could be other issues let me know what you find out.

  5. #5
    Quote Originally Posted by duff View Post
    I haven't tried the USB keyboard with Snooze but I think all the wakeups methods should work, I would put in a good 2 sec delay after waking for the usb to reconnect but there could be other issues let me know what you find out.
    Hi I did some tests and for me those where rather good. All tests ran on a 3.2 at 24Mhz powered by USB connected to a win10 laptop. Snooze only digital input and timer.
    - USB keyboard recovers after deepSleep and hibernate, but not after sleep.
    - a delay(500) before keyboard print statements is needed (400 wasn't enough), I will at least double it for production use.
    - a delay(10) is needed after the last println statement before going to deepsleep/hibernate again.
    - If shorter delays are used the first/last characters don't arrive at the computer, but I don't see other problems.

    Alain

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •