Browse Source

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

tags/v0.6.4
wolfv6 7 years ago
parent
commit
46988319a1

+ 2
- 2
examples/IOE_PCA9655E_development/PCA9655E_5_keybrd/keybrd_PCA9655E.ino View File

row_R1.process(); row_R1.process();


scanDelay.delay(); scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
} }

+ 2
- 2
examples/keybrd_MCP23018/keybrd_MCP23018.ino View File

row_R1.process(); row_R1.process();


scanDelay.delay(); scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
} }

+ 2
- 2
src/ScanDelay.h View File

Intantiate DELAY_MICROSECONDS in your sketch: Intantiate DELAY_MICROSECONDS in your sketch:
ScanDelay scanDelay(1000); ScanDelay scanDelay(1000);
Add this to the sketch's loop() function: 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. Compile and load the sketch into the microcontroller; microseconds_per_scan is printed every second.
Adjust the value of DELAY_MICROSECONDS and repeat until: 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: 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 Cherry MX specifies 5msec bounce time http://www.cherrycorp.com/english/switches/key/mx.htm

+ 2
- 2
tutorials/keybrd_4c_split_keyboard_with_IOE/keybrd_4c_split_keyboard_with_IOE.ino View File

row_R1.process(); row_R1.process();


scanDelay.delay(); scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
} }

+ 2
- 2
tutorials/keybrd_5b_LED_on_IOE/keybrd_5b_LED_on_IOE.ino View File

row_R1.process(); row_R1.process();


scanDelay.delay(); scanDelay.delay();
//debug.print_scans_per_second();
//debug.print_microseconds_per_scan();
//debug.printScansPerSecond();
//debug.printMicrosecondsPerScan();
} }

+ 1
- 1
tutorials/tutorial_5a_LED_on_uC.md View File

current capacity of output pin If = 20 mA current capacity of output pin If = 20 mA
continuous Forward Current of LED If = 30 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. 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 http://www.rfcafe.com/references/electrical/resistor-values.htm