Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSoftSerial
Diff: 3_main.cpp
- Revision:
- 1:14d1cec89444
- Parent:
- 0:98865e300cd5
diff -r 98865e300cd5 -r 14d1cec89444 3_main.cpp
--- a/3_main.cpp Sun May 10 08:15:36 2020 +0000
+++ b/3_main.cpp Tue May 12 05:42:35 2020 +0000
@@ -10,7 +10,7 @@
* http://www7b.biglobe.ne.jp/~kenjia/
* https://os.mbed.com/users/kenjiArai/
* Created: May 9th, 2020
- * Revised: May 10th, 2020
+ * Revised: May 11th, 2020
*/
/*
@@ -33,17 +33,22 @@
#error "Cannot run on OS2"
#endif
+#define BAUD 9600
+//#define BAUD 14400
+//#define BAUD 19200 // No continuous transmission
+//#define BAUD 38400 // NOT SUCCESS!!
+
// Constructor ----------------------------------------------------------------
#if defined(TARGET_NUCLEO_L432KC)
DigitalOut test_point(D12);
-Serial ser(D5, D4, 9600);
+Serial ser(D5, D4, BAUD);
BufferedSoftSerial dev(D6,D3);
#elif defined(TARGET_NUCLEO_F446RE)
DigitalOut test_point(A0);
-Serial ser(D8, D2, 9600);
+Serial ser(D8, D2, BAUD);
BufferedSoftSerial dev(D4,D3);
#endif
-Serial pc(USBTX,USBRX, 9600);
+Serial pc(USBTX,USBRX, BAUD);
// RAM ------------------------------------------------------------------------
@@ -61,6 +66,7 @@
int main()
{
+ dev.baud(BAUD);
// Start tasks
osThreadCreate(osThread(pc2dev), NULL);
osThreadCreate(osThread(dev2pc), NULL);