-
Notifications
You must be signed in to change notification settings - Fork 0
[T CODE 0] UART
yudada31 edited this page Apr 8, 2019
·
3 revisions
This is a very simple tutorial that shows how to setup UART.
The main objective to setup a universal asynchronous receiver-transmitter (UART) is to print some variables and helps us to debug.
- A stm32.
- A computer.
Simply declare: Serial pc(SERIAL_TX, SERIAL_RX, 115200);
as a global variable.
And whenever you want to print something in your code: pc.printf("Put your output here");
.
This works like a basic printf in C.
First, connect your stm32 and type mbed detect
to get the port that your stm32 is connected to. It should look like /dev/ttyACM0.
Then, on a new terminal type screen <your port> 115200
and you should see the output of your code.
- Home
- [History]
- [Tutorials]
- [TOOL]
- [MECA]
- [CODE]
- [ELEC]
- [MAKE]
- 3D Modeling
- Laser cutting
- 3D Printing
- CNC Extrusion
- [Tools 101]
- [Articles]
- [Type of motors]
- [Type of sensors]
- [Choice of microcontroller]
- [Eurobot 2019 Strategy]
- [Ressources]
- [Cloud]
- [Other Repositories]
- [Youtube Channels]
- [Miscellaneous]