Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Fadecandy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scanlime
Fadecandy
Commits
c06adec4
Commit
c06adec4
authored
11 years ago
by
Micah Elizabeth Scott
Browse files
Options
Downloads
Patches
Plain Diff
serial_passthrough: Default to 115k baud
parent
86ef2c02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testjig/serial_passthrough/serial_passthrough.ino
+8
-4
8 additions, 4 deletions
testjig/serial_passthrough/serial_passthrough.ino
with
8 additions
and
4 deletions
testjig/serial_passthrough/serial_passthrough.ino
+
8
−
4
View file @
c06adec4
...
...
@@ -2,7 +2,7 @@
* Serial pass-through adapter.
*
* This bridges the Teensy's USB serial port to the Fadecandy board's serial
* interface at
96
00 baud. When the green button is held, we implement a simple
* interface at
1152
00 baud. When the green button is held, we implement a simple
* serial port loopback which will put the Fadecandy into bootloader mode.
*/
...
...
@@ -13,11 +13,13 @@ const unsigned ledPin = 13;
HardwareSerial
Uart
=
HardwareSerial
();
#define BAUD 115200
void
setup
()
{
pinMode
(
ledPin
,
OUTPUT
);
pinMode
(
buttonPin
,
INPUT_PULLUP
);
Serial
.
begin
(
9600
);
Serial
.
begin
(
BAUD
);
}
void
passthroughMode
()
...
...
@@ -26,7 +28,9 @@ void passthroughMode()
pinMode
(
txPin
,
OUTPUT
);
digitalWrite
(
ledPin
,
HIGH
);
// Input-to-output latency must be less than one character for the bootloader to detect this.
// This is only slow 9600 baud, but input-to-output latency must be less
// than one character for the bootloader to detect the loopback.
while
(
digitalRead
(
buttonPin
)
==
LOW
)
{
digitalWrite
(
txPin
,
digitalRead
(
rxPin
));
}
...
...
@@ -36,7 +40,7 @@ void passthroughMode()
void
loopbackMode
()
{
Uart
.
begin
(
9600
);
Uart
.
begin
(
BAUD
);
while
(
digitalRead
(
buttonPin
)
==
HIGH
)
{
if
(
Serial
.
available
())
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment