Archived
1
0

rename print_microseconds_per_scan() to printMicrosecondsPerScan, rename print_scans_per_second() to printScansPerSecond

This commit is contained in:
wolfv6 2016-11-12 14:42:10 -07:00
parent e9e74634a4
commit 46988319a1
6 changed files with 11 additions and 11 deletions

View File

@ -107,6 +107,6 @@ void loop()
row_R1.process();
scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
}

View File

@ -121,6 +121,6 @@ void loop()
row_R1.process();
scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
}

View File

@ -12,10 +12,10 @@ Follow these step to tune DELAY_MICROSECONDS for maximum scan rate for a given S
Intantiate DELAY_MICROSECONDS in your sketch:
ScanDelay scanDelay(1000);
Add this to the sketch's loop() function:
debug.print_microseconds_per_scan();
debug.printMicrosecondsPerScan();
Compile and load the sketch into the microcontroller; microseconds_per_scan is printed every second.
Adjust the value of DELAY_MICROSECONDS and repeat until:
debug.print_microseconds_per_scan() <= DEBOUNCE_TIME / SAMPLE_COUNT_MACRO
debug.printMicrosecondsPerScan() <= DEBOUNCE_TIME / SAMPLE_COUNT_MACRO
DEBOUNCE_TIME can be obtained from the switch's datasheet. Some switch bounce times are:
Cherry MX specifies 5msec bounce time http://www.cherrycorp.com/english/switches/key/mx.htm

View File

@ -114,6 +114,6 @@ void loop()
row_R1.process();
scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
}

View File

@ -150,6 +150,6 @@ void loop()
row_R1.process();
scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
}

View File

@ -70,7 +70,7 @@ For Forward Current, use the smaller of:
current capacity of output pin If = 20 mA
continuous Forward Current of LED If = 30 mA
minimum current limiting restiance is R = (Vs - Vf) / If = 55 Ohms
minimum current limiting resistance is R = (Vs - Vf) / If = 55 Ohms
```
Add a safety margin for resistor tolerances (1%, 2%, 5%, 10%), and round up to a standard value.
http://www.rfcafe.com/references/electrical/resistor-values.htm