10 Best tech gadgets you need in your life

Enhance your leisure time, get more creative at work, feel safer indoors, and more with our list of the best tech gadgets for everyday use. We crafted a list of some must-have tech that you can…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Code Arduino to sleep mode

Hey there!!! How are you doing? I’m good, Thanks.

Arduino already has library to do sleep mode. We can just go to Arduino IDE / Tools / Manage Libraries…. Do searching for “Arduino Low Power” and install it.

Sleep mode can be entered by just one command. We can wake up Arduino by either timeout or external interrupt.

Let’s go.

Go to Arduino IDE / File / Examples / Arduino Low Power / TimedWakeup.

This example does a loop to blink LED (1 Hz) for 1 time and sleep for 2 seconds.

Go to Arduino IDE / File / Examples / Arduino Low Power / ExternalWakeup.

This example needs 1 push button connected to pin #8. It blinks LED (1 Hz) for “N” times and then goes to sleep until button is pushed.

When button is pushed, Arduino will wakeup and increase “N” number by 1 so LED will blink 2 times for this loop and then sleep until button is pushed again.

Add a comment

Related posts:

Know What Brown Noise is and its Benefits

Noise is a form of stress. It can be a serious problem in the workplace, particularly if employees are exposed to high levels of noise over long periods of time. However, some studies show that…

My Gig Experience

Before entering university, I had never been to a gig before. Because I’m not a fan of it, so I didn’t even think that I would go to a concert performace in my life. However, after I experienced…

When we made music

When you and I made music together There was nothing more eminent When you were the flute and I was the mouth, as you just grew into me, a seed in essence, as I moaned ever so manly Sung ever so…