Skip to content

Commit cddcf0f

Browse files
author
Ernesto E. Lopez C
authored
Merge pull request #34 from arduino-libraries/AEK-269
Aek 2
2 parents 1a4fb71 + e8719cb commit cddcf0f

File tree

9 files changed

+39
-4
lines changed

9 files changed

+39
-4
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
#include <ArduinoMotorCarrier.h>
3+
4+
//Variable to store the battery voltage
5+
float batteryVoltage;
6+
7+
// the setup function runs once when you press reset or power the board
8+
void setup() {
9+
Serial.begin(115200);
10+
//while (!Serial);
11+
12+
if (controller.begin())
13+
{
14+
Serial.print("Nano Motor Shield connected, firmware version ");
15+
Serial.println(controller.getFWVersion());
16+
}
17+
else
18+
{
19+
Serial.println("Couldn't connect! Is the red led blinking? You may need to update the firmware with FWUpdater sketch");
20+
while (1);
21+
}
22+
}
23+
24+
// the loop function runs over and over again forever
25+
void loop() {
26+
27+
batteryVoltage = battery.getRaw()/236.0;
28+
Serial.print("Battery voltage: ");
29+
Serial.print(batteryVoltage,3);
30+
//Serial.println("V");
31+
Serial.print("V, Raw ");
32+
Serial.println(battery.getRaw());
33+
delay(5000); //wait for a few seconds
34+
35+
}

library.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name=ArduinoMotorCarrier
2-
version=2.0.0
2+
version=2.0.1
33
author=Arduino
44
maintainer=Arduino <[email protected]>
5-
sentence=Allows use of the Arduino Motor Carrier
6-
paragraph=
5+
sentence=Allows use of the Arduino Motor Carrier
6+
paragraph=(Nano and MKR version)
77
category=Signal Input/Output
8-
url=https://www.arduino.cc/en/Reference/MKRMotorCarrier
8+
url=https://www.arduino.cc/reference/en/libraries/ArduinoMotorCarrier/
99
architectures=samd
1010
includes=ArduinoMotorCarrier.h

0 commit comments

Comments
 (0)