Skip to main content

DE2120 Barcode Scanner - Getting started (MicroPython)

MicroPython module

To install the MicroPython module, download it from the GitHub repository:

Soldered DE2120 Barcode Scanner MicroPython module

A MicroPython module for the Soldered DE2120 Barcode Scanner breakout

ℹ️

First time MicroPython user? For a detailed tutorial on how to get started with MicroPython, see this section of our docs:

Getting started with MicroPython

A comprehensive tutorial on how to set up and upload code for the first time on a MicroPython board from scratch!


Before you begin – set the scanner to TTL mode

⚠️

The DE2120 scanner ships from the factory configured for USB mode. Before it will communicate over UART with your microcontroller, you must switch it to TTL/RS232 mode by scanning the POR232 configuration barcode from the DYScan settings manual.

You only need to do this once — the setting is stored in the scanner's non-volatile memory.


Connections

Below is an example connection diagram for Dasduino CONNECTPLUS. These pins will be used in the examples throughout this documentation.

Dasduino CONNECTPLUSDE2120 Breakout Board
IO5 (UART1 TX)RX
IO4 (UART1 RX)TX
3V33V3
GNDGND
ℹ️

You can use any two free GPIO pins as the UART TX/RX pair. Pass them as tx and rx arguments when creating the scanner object. Remember: connect the MCU TX pin to the scanner RX pin, and the MCU RX pin to the scanner TX pin.