From 77f6d83bacff4911efc219c25ae9678afd381262 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sun, 19 Aug 2012 21:31:31 +0200 Subject: [PATCH] Change serial speed from 115200 to 57600 With non-blinkenlight setups, 115200 communication is not reliable at all. About 26kbaud should be enough bandwidth anyway. --- arduino/controlled/controlled.ino | 2 +- host/ledbar.c | 2 +- host_python/send_to_serial.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arduino/controlled/controlled.ino b/arduino/controlled/controlled.ino index 3be3479..7118ee7 100644 --- a/arduino/controlled/controlled.ino +++ b/arduino/controlled/controlled.ino @@ -7,7 +7,7 @@ int wait = 10; void setup() { - Serial.begin(115200); + Serial.begin(57600); int i = 0, led = 0; for (i = 0; i < NUM_TLCS; i++) lb[i].begin(B1100000 | i); diff --git a/host/ledbar.c b/host/ledbar.c index ca40ec5..7168054 100644 --- a/host/ledbar.c +++ b/host/ledbar.c @@ -341,7 +341,7 @@ int main(int argc, char* argv[]) if (fp) { struct termios t; tcgetattr(fileno(fp), &t); - cfsetspeed(&t, B115200); + cfsetspeed(&t, B57600); tcsetattr(fileno(fp), TCSADRAIN, &t); sleep(2); } diff --git a/host_python/send_to_serial.py b/host_python/send_to_serial.py index fe7d587..6941b29 100755 --- a/host_python/send_to_serial.py +++ b/host_python/send_to_serial.py @@ -23,7 +23,7 @@ def main(): except getopt.GetOptError: print_usage() return 1 - speed = 115200 + speed = 57600 number = 20 show_help = False for k, v in opts: