Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Modified BAT example including stm32pwr library #51

Open
wants to merge 2 commits into
base: battery-feat
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
bat library.

This example allows you to get Battery Voltage Value of Primo
board. Please download ArduinoLowPower library from library manager,
disabling STM32 enter to standby mode to avoid Primo board enter to
standby mode when Primo board is powered only by battery.
board, disabling STM32 enter to standby mode when Primo board is powered
only by battery.
Primo board is able to send voltage value over serial port or BLE serial,
Create UART service compatible with Nordic's *nRF Toolbox* and Adafruit's
*Bluefruit LE* iOS/Android apps. You can also use another board with
Expand All @@ -20,7 +19,7 @@
#include <BLEPeripheral.h>
#include <BLESerial.h>
#include <Wire.h>
#include <ArduinoLowPower.h>
#include <stm32pwr.h>
#include <bat.h>


Expand All @@ -38,7 +37,7 @@ void setup() {
// start BLE serial
bleSerial.begin();
// disable STM32 enter to standby mode
LowPower.disableStm32Standby();
stm32pwr.disableStandbyMode();
// initialize the LED pin as an output
pinMode(LED_BUILTIN, OUTPUT);
}
Expand Down