Add files via upload

This commit is contained in:
Frank Adams 2020-04-19 08:56:30 -07:00 committed by GitHub
parent ad1786fb2d
commit e34f6104a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 6 deletions

View file

@ -9,6 +9,8 @@
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
// This program is only for French keyboards that will be connected to a French computer via USB.
// A French keyboard requires the shift key when typing numbers.
// It will determine how a laptop keyboard matrix is wired using a Teensy 3.2 on an FPC daughterboard. // It will determine how a laptop keyboard matrix is wired using a Teensy 3.2 on an FPC daughterboard.
// Open an editor on a computer and load or create a file that lists every key // Open an editor on a computer and load or create a file that lists every key
// on the laptop keyboard that will be tested. Connect the FPC cable of the test keyboard // on the laptop keyboard that will be tested. Connect the FPC cable of the test keyboard
@ -17,7 +19,7 @@
// before any keys are pressed, these pin numbers are shorted together and must be fixed. // before any keys are pressed, these pin numbers are shorted together and must be fixed.
// Press each key one by one on the test keyboard as listed on the editor screen. When a key // Press each key one by one on the test keyboard as listed on the editor screen. When a key
// is pressed on the test keyboard, the program detects which two pins on the FPC connector // is pressed on the test keyboard, the program detects which two pins on the FPC connector
// were connected. Those two pin numbers are sent over USB (separated by a TAB) and displayed // were connected. Those two pin numbers are sent over USB (shifted for French computers) and separated by a TAB for display
// on the editor. After sending the numbers, a DOWN ARROW is sent over USB to prepare for // on the editor. After sending the numbers, a DOWN ARROW is sent over USB to prepare for
// the next key. Once all keys on the test keyboard have been pressed, the file in // the next key. Once all keys on the test keyboard have been pressed, the file in
// the editor can be saved to create a row-column matrix. // the editor can be saved to create a row-column matrix.
@ -29,7 +31,8 @@
// //
// Revision History // Revision History
// Rev 1.00 - Nov 18, 2018 - Original Release // Rev 1.00 - Nov 18, 2018 - Original Release
// Rev 1.1 - March 31, 2020 - French keyboard version sends shifted numbers // Rev 1.1 - March 31, 2020 - French Version sends shifted numbers
// Rev 1.2 - April 19, 2020 - Use min_pin in botto up loop
// //
// Load an array with the Teensy 3.2 I/O numbers that correspond to FPC pins 1 thru 34. // Load an array with the Teensy 3.2 I/O numbers that correspond to FPC pins 1 thru 34.
int con_pin[] = {23, 0, 22, 1, 21, 2, 20, 3, 19, 4, 18, 5, 17, 6, 24, 7, 25, 8, 33, 9, 26, 10, 27, 11, 28, 12, 32, 31, 30, 29, 16, 15, 14, 13}; int con_pin[] = {23, 0, 22, 1, 21, 2, 20, 3, 19, 4, 18, 5, 17, 6, 24, 7, 25, 8, 33, 9, 26, 10, 27, 11, 28, 12, 32, 31, 30, 29, 16, 15, 14, 13};
@ -74,6 +77,7 @@ void go_0(int pin)
// Function to send numbers over USB for display on an editor // Function to send numbers over USB for display on an editor
void usb_num(int num) // the numbers 0 thru 33 are sent over usb as 1 thru 34 void usb_num(int num) // the numbers 0 thru 33 are sent over usb as 1 thru 34
{ {
Keyboard.set_modifier(MODIFIERKEY_SHIFT); // ***********Numbers are shifted for French keyboard*************
switch (num) { switch (num) {
case 0: case 0:
Keyboard.set_key1(key_1); Keyboard.set_key1(key_1);
@ -299,6 +303,7 @@ void usb_num(int num) // the numbers 0 thru 33 are sent over usb as 1 thru 34
delay(20); delay(20);
Keyboard.set_key1(0); // clear out the key slots Keyboard.set_key1(0); // clear out the key slots
Keyboard.set_key2(0); Keyboard.set_key2(0);
Keyboard.set_modifier(0); // *****shift must be releaseed for French keyboard*********************
Keyboard.send_now(); Keyboard.send_now();
delay(20); delay(20);
Keyboard.set_key1(key_tab); // Tab over to position for next number Keyboard.set_key1(key_tab); // Tab over to position for next number
@ -333,7 +338,7 @@ void loop() {
// //
// ***********Bottom up Test************ // ***********Bottom up Test************
// //
for (int i=0; i<max_pin-1; i++) { // outer loop pin for (int i=min_pin-1; i<max_pin-1; i++) { // outer loop pin
go_0(con_pin[i]); // make the outer loop pin an output and send this pin low go_0(con_pin[i]); // make the outer loop pin an output and send this pin low
for (int j=i+1; j<max_pin; j++) { // inner loop pin for (int j=i+1; j<max_pin; j++) { // inner loop pin
delayMicroseconds(10); // give time to let the signals settle out delayMicroseconds(10); // give time to let the signals settle out

View file

@ -32,6 +32,7 @@
// Revision History // Revision History
// Rev 1.00 - Feb 25, 2020 - Original Release // Rev 1.00 - Feb 25, 2020 - Original Release
// Rev 1.1 - March 31, 2020 - French Version sends shifted numbers // Rev 1.1 - March 31, 2020 - French Version sends shifted numbers
// Rev 1.2 - April 19, 2020 - Use min_pin in botto up loop
// //
// Load an array with the Teensy 4.0 I/O numbers that correspond to FPC pins 1 thru 34. // Load an array with the Teensy 4.0 I/O numbers that correspond to FPC pins 1 thru 34.
int con_pin[] = {23, 0, 22, 1, 21, 2, 20, 3, 19, 4, 18, 5, 17, 6, 29, 7, 31, 8, 33, 9, 32, 10, 30, 11, 28, 12, 27, 26, 25, 24, 16, 15, 14, 13}; int con_pin[] = {23, 0, 22, 1, 21, 2, 20, 3, 19, 4, 18, 5, 17, 6, 29, 7, 31, 8, 33, 9, 32, 10, 30, 11, 28, 12, 27, 26, 25, 24, 16, 15, 14, 13};
@ -337,7 +338,7 @@ void loop() {
// //
// ***********Bottom up Test************ // ***********Bottom up Test************
// //
for (int i=0; i<max_pin-1; i++) { // outer loop pin for (int i=min_pin-1; i<max_pin-1; i++) { // outer loop pin
go_0(con_pin[i]); // make the outer loop pin an output and send this pin low go_0(con_pin[i]); // make the outer loop pin an output and send this pin low
for (int j=i+1; j<max_pin; j++) { // inner loop pin for (int j=i+1; j<max_pin; j++) { // inner loop pin
delayMicroseconds(10); // give time to let the signals settle out delayMicroseconds(10); // give time to let the signals settle out

View file

@ -29,7 +29,8 @@
// //
// Revision History // Revision History
// Rev 1.00 - Nov 18, 2018 - Original Release // Rev 1.00 - Nov 18, 2018 - Original Release
// Rev 1.1 - March 31, 2020 - French keyboard version sends shifted numbers // Rev 1.1 - March 31, 2020 - French Version sends shifted numbers
// Rev 1.2 - April 19, 2020 - Use min_pin in botto up loop
// //
// Load an array with the Teensy LC I/O numbers that correspond to FPC pins 1 thru 26. // Load an array with the Teensy LC I/O numbers that correspond to FPC pins 1 thru 26.
int con_pin[] = {23, 0, 22, 1, 24, 2, 21, 3, 25, 4, 20, 5, 19, 6, 18, 7, 17, 8, 16, 9, 15, 10, 14, 11, 26, 12}; // I/O 13 is for the LED int con_pin[] = {23, 0, 22, 1, 24, 2, 21, 3, 25, 4, 20, 5, 19, 6, 18, 7, 17, 8, 16, 9, 15, 10, 14, 11, 26, 12}; // I/O 13 is for the LED
@ -333,7 +334,7 @@ void loop() {
// //
// ***********Bottom up Test************ // ***********Bottom up Test************
// //
for (int i=0; i<max_pin-1; i++) { // outer loop pin for (int i=min_pin-1; i<max_pin-1; i++) { // outer loop pin
go_0(con_pin[i]); // make the outer loop pin an output and send this pin low go_0(con_pin[i]); // make the outer loop pin an output and send this pin low
for (int j=i+1; j<max_pin; j++) { // inner loop pin for (int j=i+1; j<max_pin; j++) { // inner loop pin
delayMicroseconds(10); // give time to let the signals settle out delayMicroseconds(10); // give time to let the signals settle out