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: mbed
Revision 0:a4fdcf8d64df, committed 2020-02-05
- Comitter:
- perlatecnica
- Date:
- Wed Feb 05 17:10:52 2020 +0000
- Commit message:
- v1.0
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r a4fdcf8d64df main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Feb 05 17:10:52 2020 +0000 @@ -0,0 +1,41 @@ +/* Copyright (c) 2019 Perlatecnica + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/**************************************************** +* RAPID PROTOTYPING WITH NUCLEO * +* Example Code 01: Serial * +* Author: Mauro D'Angelo * +* Organization: Perlatecnica * +***************************************************** +* Serial Client configuration * +* 9600 bauds, 8-bit data, no parity * +*****************************************************/ + +#include "mbed.h" + +// It creates an instance of the class Serial. 'pc' is the name of the variable and assign the TX and RX pin to it +Serial pc(USBTX, USBRX); + +// Entry point +int main() { + // Print to the serial console a string + pc.printf("Hello World !\r\n"); + pc.printf("Here I'm !\r\n"); + pc.printf("It works !\r\n"); +} + +// OBSERVE THAT ONCE THE MESSAGES HAVE BEEN PRINTED, NOTHING ELSE HAPPENS + +// EXERCISE: Modify the printed messages \ No newline at end of file
diff -r 000000000000 -r a4fdcf8d64df mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Feb 05 17:10:52 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file