4 years, 10 months ago.  This question has been closed. Reason: Off Topic

Connecting UART Barcode Scanner with stm32f072rb nucleo board

Hello all,

I'm trying to figure out how to connect a UART barcode scanner with my stm32f072rb microcontroller. This is the barcode scanner that I am using: https://www.waveshare.com/wiki/Barcode_Scanner_Module

I'm trying to use the UART interface and I have been able to connect the cables correctly to the pins on the board(VCC to 5v, GND to GND, TXD to PA_10, RXD to PA_9). I have tried using example code on mbed's Serial API of passing data from an external UART device to the PC Serial monitor but I am not able to get anything to display to my serial monitor.

If anyone can help me out/give me some guidance where to look or send me a simple program that can output the barcode to the serial monitor via UART communication that would be greatly appreciated, thank you!

1 Answer

4 years, 10 months ago.

Hi,

Connect wire from scanner TxD to RxD on board and scanner RxD to TxD on board and test again.

Best Regards.

Hi Vladimir,

Thank you for a quick response. I have tried disconnecting and reconnecting again and then running the program, but still nothing has worked. I don’t believe wiring is the issue here.

Update: I figured it out, for some reason my compiler wasn't working with the imported program, all I had to do was delete the program and reimport it into mbed and I was able to pass the data from my barcode scanner to my laptop's serial terminal.

posted by Shane F 28 Jun 2019