-
Notifications
You must be signed in to change notification settings - Fork 0
Common_Lib
Haiqiang Xu edited this page Jun 7, 2018
·
1 revision
This library has a extern Common instance that facilitate its use in final projects.
- ReadKeyboard(): reads from computer's keyboard through the HardwareSerial terminal connected to Arduino whenever the user interacts with it. Use it when debugging needs user interaction through computer.
- PowerDownInt0(): calls LowPower library to make Arduino enter into PowerDown mode until Interrupt 0 is detected. This wake-up method is attached to Interrupt 0 which corresponds to I/O pin 2 on Uno/Nano and is detected when a LOW state is detected in this pin.
- PowerDownInt1(): same as previous method, but wake-up method is attached to Interrupt 1 which corresponds to I/O pin 3 on Uno/Nano.
- Sleep(period_t period): calls LowPower library to make Arduino enter into Idle mode with the period indicated interval. ADC and USART0 components are switched on and TIMER2, TIMER1, TIMER0, SPI and TWI are switched off.
- Sleep(int iPeriod): same as previous method, but with ms as parameter that will be converted to the corresponding period enum. Default value is 250ms.
Please, feel free to add any question or bug here
External Libraries