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.
main.cpp
00001 00002 // Bye www.emcu.it 00003 // Tested on NUCLEO_L152RE 00004 // for more info see here: http://www.emcu.it/NUCLEOevaBoards/U2andL152/U2andL152.html#How_to_use_USART2 00005 // 00006 // This program send a character via USART2 and via USB (Virtual Com) 00007 // USART2 is connected to STLINK that send data via USB. 00008 // ATTENTION: 00009 // For connect USART2 to D1/TX and D0/RX it is necessary do a bridge on SB63 and SB62 that are on the rear of NUCLEO_L152RE board. 00010 // I suggest to use TeraTerm to connect the NUCLEO via CN1 (USB) 00011 // Configure TeraTerm with these parameters: 00012 // Baud: 9600 - Data: 8bit - Parity: None - Stop: 1bit - Flow Control: None 00013 00014 #include "mbed.h" 00015 00016 Serial pc(SERIAL_TX, SERIAL_RX); // tx, rx USB Virtual COM 00017 00018 00019 int main() { 00020 while(1) { 00021 00022 if(pc.readable()) { 00023 pc.putc(pc.getc()); 00024 } 00025 00026 wait(0.1); 00027 pc.printf("E"); 00028 00029 } 00030 }
Generated on Mon Jul 18 2022 02:32:06 by
1.7.2