Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.04 KB

File metadata and controls

34 lines (22 loc) · 1.04 KB

MicroPython Basics Examples

This directory contains simple MicroPython example code covering basic functionality.

Contents

  • DigitalReadSerial - Read digital input and print to serial
  • AnalogReadSerial - Read analog input and print to serial
  • ReadAnalogVoltage - Read analog input and convert to voltage

These cover basic digital and analog input, printing to serial, and voltage conversion.

Requirements

  • MicroPython board
  • Basic components like buttons, potentiometer, LEDs, resistors

Usage

  • Connect components according to the comments in each example
  • Modify pin assignments and other constants as needed
  • Upload code to board
  • View serial output in serial monitor
  • The examples print the raw digital/analog values and the calculated voltage.

Notes

Great starting point for learning MicroPython Similar code works across many boards like ESP32, ESP8266, etc. Adjust pin numbers, calculation constants, etc. as needed

Contributing

Contributions welcome! Please open an issue or PR for any bugs or improvements.