<MONOSTICK>
<MONOSTICK>
Board BEHAVIOR for MONOSTICK. It includes procedures for controlling the built-in watchdog timer and lighting LEDs.
constants
The following definitions will be available
It can be accessed as MONOSTICK::PIN_LED
.
Initialize hardware
Each pin is initialized as shown in the code above.
Watchdog Timer
Resets the external watchdog timer at startup, sleep wakeup, and after a certain period of time after startup.
Watchdog timer timeout is 1 second.
MONOSTICK does not normally run applications that sleep, in which case it sets MONOSTICK::PIN_WDT_EN
to HIGH before sleeping.
Methods
set_led()
LED (red, yellow) control.
Do not call this method if you do not want to control with board BEHAVIOR.
The yellow LED (MONOSTICK::PIN_LED_YELLOW
) is the SPIMISO pin (semiconductor pin name DO1). This board BEHAVIOR does not include methods and procedures for lighting by PWM control. If necessary, the following description is made.
Do not call
set_led_yellow()
.Initialize PWM output separately after startup; the SPIMISO pin corresponds to PWM3 in the App_Twelite standard application and can be controlled by the Timer3 class object.
The PWM output is initialized separately after sleep recovery. At that time, the output setting of DO1 is canceled.
Before setting PWM, cancel the output setting of DO1. \1}
pinMode(PIN_LED_YELLOW, DISABLE_OUTPUT);
The yellow LED (MONOSTICK::PIN_LED_YELLOW
) cannot be turned on during sleep.
mode
takes the following parameters. The tick
specifies the lighting time [ms], please refer to the description of mode
for details.
The setting before the return to sleep is maintained after the return to sleep.
最終更新