Commit 7f9e12d5 authored by PhiBo's avatar PhiBo 🚀

* - Initial commit

parents
Changelog
=========
0.x ([master](https://git.dinotools.org/arduino/power-test))
------------------------------------------------------------
This version is not yet released and is under development.
0.1.0 (2019-08-20)
------------------
* Initial release
Power Test
==========
Small tool to test power usage of an Aruino board.
Requirements
------------
* Arduino IDE
* [LowPower](https://github.com/rocketscream/Low-Power) library from RocketScream
Install
-------
Clone the repository.
```
cd ~/Arduino
git clone https://git.dinotools.org/arduino/power-test.git
```
Open the power-test project from the Sketchbook menu in the Arduino IDE.
License
-------
MIT
#include <LowPower.h>
/*
Power Test
*/
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
// Builtin LED on and wait 4 seconds
digitalWrite(LED_BUILTIN, HIGH);
delay(4000);
// Builtin LED off and wait 4 seconds
digitalWrite(LED_BUILTIN, LOW);
delay(4000);
// Blink 2 times and wait 4 seconds in powerDown mode
for(uint8_t i=0; i < 2; i++) {
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}
LowPower.powerDown(SLEEP_4S, ADC_OFF, BOD_OFF);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment