Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
aareyes
Smart-Battery-Module-Info_For_Arduino
Commits
d5d12ae3
Commit
d5d12ae3
authored
Feb 09, 2019
by
Armin
Browse files
use LED_BUILTIN
parent
72a44477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
9 deletions
+3
-9
.cproject
.cproject
+0
-3
src/SBMInfo/SBMInfo.ino
src/SBMInfo/SBMInfo.ino
+3
-6
No files found.
.cproject
View file @
d5d12ae3
...
@@ -76,9 +76,6 @@
...
@@ -76,9 +76,6 @@
<tool
id=
"de.innot.avreclipse.tool.avrdude.app.release.440173151"
name=
"AVRDude"
superClass=
"de.innot.avreclipse.tool.avrdude.app.release"
/>
<tool
id=
"de.innot.avreclipse.tool.avrdude.app.release.440173151"
name=
"AVRDude"
superClass=
"de.innot.avreclipse.tool.avrdude.app.release"
/>
</toolChain>
</toolChain>
</folderInfo>
</folderInfo>
<sourceEntries>
<entry
excluding=
"src/SBMInfo.cpp|src/lib/SoftwareWire.cpp"
flags=
"VALUE_WORKSPACE_PATH|RESOLVED"
kind=
"sourcePath"
name=
""
/>
</sourceEntries>
</configuration>
</configuration>
</storageModule>
</storageModule>
<storageModule
moduleId=
"org.eclipse.cdt.core.externalSettings"
/>
<storageModule
moduleId=
"org.eclipse.cdt.core.externalSettings"
/>
...
...
src/SBMInfo/SBMInfo.ino
View file @
d5d12ae3
...
@@ -65,9 +65,6 @@ void TogglePin(uint8_t aPinNr);
...
@@ -65,9 +65,6 @@ void TogglePin(uint8_t aPinNr);
int
readWord
(
uint8_t
aFunction
);
int
readWord
(
uint8_t
aFunction
);
void
writeWord
(
uint8_t
aFunction
,
uint16_t
aValue
);
void
writeWord
(
uint8_t
aFunction
,
uint16_t
aValue
);
// Pin 13 has an LED connected on most Arduino boards.
const
int
LED_PIN
=
13
;
/*
/*
* Command definitions
* Command definitions
*/
*/
...
@@ -172,7 +169,7 @@ BQ20Z70_PackVoltage, Pack_Voltage, &printVoltage } };
...
@@ -172,7 +169,7 @@ BQ20Z70_PackVoltage, Pack_Voltage, &printVoltage } };
void
setup
()
{
void
setup
()
{
// initialize the digital pin as an output.
// initialize the digital pin as an output.
pinMode
(
LED_
P
IN
,
OUTPUT
);
pinMode
(
LED_
BUILT
IN
,
OUTPUT
);
// Shutdown SPI, timers, and ADC
// Shutdown SPI, timers, and ADC
PRR
=
(
1
<<
PRSPI
)
|
(
1
<<
PRTIM1
)
|
(
1
<<
PRTIM2
)
|
(
1
<<
PRADC
);
PRR
=
(
1
<<
PRSPI
)
|
(
1
<<
PRTIM1
)
|
(
1
<<
PRTIM2
)
|
(
1
<<
PRADC
);
...
@@ -205,7 +202,7 @@ void setup() {
...
@@ -205,7 +202,7 @@ void setup() {
do
{
do
{
tDeviceAttached
=
scanForAttachedI2CDevice
();
tDeviceAttached
=
scanForAttachedI2CDevice
();
delay
(
500
);
delay
(
500
);
TogglePin
(
LED_
P
IN
);
TogglePin
(
LED_
BUILT
IN
);
}
while
(
tDeviceAttached
<
0
);
}
while
(
tDeviceAttached
<
0
);
}
}
...
@@ -213,7 +210,7 @@ void setup() {
...
@@ -213,7 +210,7 @@ void setup() {
do
{
do
{
tVoltage
=
readWord
(
VOLTAGE
);
tVoltage
=
readWord
(
VOLTAGE
);
delay
(
500
);
delay
(
500
);
TogglePin
(
LED_
P
IN
);
TogglePin
(
LED_
BUILT
IN
);
}
while
(
tVoltage
==
0xFFFF
);
}
while
(
tVoltage
==
0xFFFF
);
Serial
.
println
(
F
(
"
\r\n
*** STATIC INFO ***"
));
Serial
.
println
(
F
(
"
\r\n
*** STATIC INFO ***"
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment