Skip to content

Commit

Permalink
case information added
Browse files Browse the repository at this point in the history
  • Loading branch information
B-G-T committed Feb 5, 2022
1 parent cf19e6b commit ccb7838
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions TouchKey.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include "DigiKeyboard.h"
#include <CapacitiveSensor.h>

#define SECRET "this is a secret\n"

#define BuildInLED 1 // internal LED at PB1

CapacitiveSensor cs = CapacitiveSensor(2,0); // PB2 is output pin, PB0 is sensor pin

void setup()
{
pinMode(BuildInLED, OUTPUT);
digitalWrite(BuildInLED, LOW);
}

void loop()
{
long input = cs.capacitiveSensor(30);

if (input > 200) {
digitalWrite(BuildInLED, HIGH);
DigiKeyboard.print(SECRET);
DigiKeyboard.delay(1000);

while (cs.capacitiveSensor(30) > 100) {
}

digitalWrite(BuildInLED, LOW);
}

DigiKeyboard.delay(100);
}
Binary file added case/TouchKey-Case.f3d
Binary file not shown.
Binary file added case/assembled.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added case/overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ccb7838

Please sign in to comment.