Skip to content

Commit

Permalink
Merge pull request #34 from arduino-libraries/AEK-269
Browse files Browse the repository at this point in the history
Aek 2
  • Loading branch information
Ernesto E. Lopez C authored Jun 15, 2021
2 parents 1a4fb71 + e8719cb commit cddcf0f
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 4 deletions.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions examples/Nano/Battery_Charging/Battery_Charging.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

#include <ArduinoMotorCarrier.h>

//Variable to store the battery voltage
float batteryVoltage;

// the setup function runs once when you press reset or power the board
void setup() {
Serial.begin(115200);
//while (!Serial);

if (controller.begin())
{
Serial.print("Nano Motor Shield connected, firmware version ");
Serial.println(controller.getFWVersion());
}
else
{
Serial.println("Couldn't connect! Is the red led blinking? You may need to update the firmware with FWUpdater sketch");
while (1);
}
}

// the loop function runs over and over again forever
void loop() {

batteryVoltage = battery.getRaw()/236.0;
Serial.print("Battery voltage: ");
Serial.print(batteryVoltage,3);
//Serial.println("V");
Serial.print("V, Raw ");
Serial.println(battery.getRaw());
delay(5000); //wait for a few seconds

}
8 changes: 4 additions & 4 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name=ArduinoMotorCarrier
version=2.0.0
version=2.0.1
author=Arduino
maintainer=Arduino <info@arduino.cc>
sentence=Allows use of the Arduino Motor Carrier
paragraph=
sentence=Allows use of the Arduino Motor Carrier
paragraph=(Nano and MKR version)
category=Signal Input/Output
url=https://www.arduino.cc/en/Reference/MKRMotorCarrier
url=https://www.arduino.cc/reference/en/libraries/ArduinoMotorCarrier/
architectures=samd
includes=ArduinoMotorCarrier.h

0 comments on commit cddcf0f

Please sign in to comment.