Skip to content

abduznik/Micropython_UART

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micropython UART Controller

Python MicroPython Platform

A simple, cross-platform tool to communicate with MicroPython-based microcontrollers (like Raspberry Pi Pico, ESP32, etc.) via UART. Control hardware directly from your PC or Android phone!


Features

  • Cross-Platform:** Works on Windows, Linux, and Android (via Pydroid 3).
  • Auto-Detection: Automatically detects your OS and available serial ports.
  • GUI Control: User-friendly interface to switch ports and send commands.
  • Instant Feedback: Turn specific pins/LEDs ON or OFF with a click.

Project Structure

File Description
serialcomm.py The GUI App. Run this file to start the controller. Connects to the device and sends commands.
s_searcher.py The Backend. Handles OS detection, list available ports, and manages serial connections.
UART_MICRO.py Firmware. The code that goes onto your Microcontroller (Pico/ESP32).

Installation & Setup

PC (Windows / Linux)

Ensure you have Python installed. Then, install the required library:

pip install pyserial

Android (via Pydroid 3)

  1. Install Pydroid 3 from the Google Play Store.
  2. Open Pydroid 3 -> Pip.
  3. Install usb4a and usbserial4a. (Note: Android support requires an OTG adapter).

Microcontroller Setup

  1. Open your MicroPython IDE (like Thonny).
  2. Open UART_MICRO.py.
  3. Save/Flash it to your microcontroller as main.py (or run it manually).

    Important: Check your specific board's Pinout! The code uses UART(0) and Pin(25) (default LED for Pico). Adjust if using ESP32 or others.


How to Use

  1. Connect your microcontroller to your computer/phone via USB.
  2. Run the application:
    python serialcomm.py
  3. Select Port:
    • Use the dropdown to select your device (e.g., COM3, /dev/ttyUSB0).
    • Or keep it on Auto to let the app find it.
  4. Control:
    • Click Turn ON 🟢 -> Sends 11111111 (LED ON)
    • Click Turn OFF 🔴 -> Sends 00000000 (LED OFF)

Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest features
  • Submit Pull Requests

About

Simple code for UART included a pyserial interface with support for windows,Linux,android

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages