!!! This is what happens when waiting too long for parts to be delivered on another project !!!
“36 touch sensor Teensy” is possible. I only did 20, pictured below because:
1. Lazy. The Teensy 3.1 has twelve touch sensor pins, nine through the hole already plugged into my breadboard, three solder pads on the bottom of its PCB.
2. I didn't have a space set up for soldering right now.
3. “Just because.” This was a fun experiment for me in Teensyduino for my Mouse Controller Project: http://hackaday.io/project/1125-Mouse-Controller-Project
Its a 4 x 5 matrix of nine pin inputs to make 20 touch sensor
“keys” (see table). Each key on the breadboard (noted in red)
is made up of two wires so close together that it is impossible to
unconsciously touch only one. It could be inspiration for a project
that requires many other input and outputs, has limited space, and
also needs a protected touch pad; like a CNC machine for hamsters.
Touch Sensor Matrix:
Pin#
1
2
3
4
5
A
B
C
D
6
E
F
G
H
7
I
J
K
L
8
M
N
O
P
9
Q
R
S
T
Key
Combo
Key
Combo
A
1 5
T
4 9
B
2 5
S
3 9
C
3 5
R
2 9
D
4 5
Q
1 9
E
1 6
P
4 8
F
2 6
O
3 8
G
3 6
N
2 8
H
4 6
M
1 8
I
1 7
L
4 7
J
2 7
K
3 7
Board Layout
Pinouts
Matrix#
Pinouts
Matrix#
0
1
1
2
.
.
23
9
.
.
22
8
.
.
21
.
.
.
20
.
.
.
19
7
.
.
18
6
.
.
17
5
.
.
16
4
.
.
15
3
Sorry the video is terrible; I'm still waiting to be rich so I can
get better video equipment. I have been praying for my ship to come
in, but just recently realized that I'm landlocked :(
Sketchy code:
I gave up on my original “easy to follow” code because it got
frustrating. I started over out of anger to brute force it, and the
main loop came out all at once as one line. If you squint hard and tilt your head to the right, (when spaced correctly in
an editor) the
shape of the main loop looks like the mountain skyline where I live
and I wonder if this is a repressed Freudian sketch to some other
problem.
Voids warranties:
/* Touch Sensor Matrix Test on Teensy 3.1 Top 9 touch sensor pins, no bottom solder pads. 4x5 matrix, 5 row 4 column = 20 touch key combinations. */ const int pins = 9, across = 4, down = 5; int touchPin[pins] = {0, 1, 15, 16, 17, 18, 19, 22, 23}; int read1[pins], base[pins]; char touchKeyValue[20] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T'}; boolean touched = false; int sensitivity = 140; int column, row, c;
I was going to give you a SKULL only for the tagline under project's title, but then I wanted to give you 2 - 1 for the tagline and 1 for the project itself, but sorry - hackaday.io platform allows us to give only 1 :D but you have to know - this 1 now actually means 2 :D haha ... I'll look the project closely when i have the time, but I have to say move to pure ANSI C w/o that abstraction level of 10000+ ;-) every *uino is abstraction lvl over 9000 ;) GL !!!
I was going to give you a SKULL only for the tagline under project's title, but then I wanted to give you 2 - 1 for the tagline and 1 for the project itself, but sorry - hackaday.io platform allows us to give only 1 :D but you have to know - this 1 now actually means 2 :D haha ... I'll look the project closely when i have the time, but I have to say move to pure ANSI C w/o that abstraction level of 10000+ ;-) every *uino is abstraction lvl over 9000 ;) GL !!!