right so let me explain

im a beginner who ONLY and i want to emphasize that ONLY knows python
AND the VERY basics. im trying to make a lil project with a friend and ive been using chatgpt (and for context just in case im 11) and ive been trying to find methods to use micropython (i have experince with it from the BBC micro:bit)
but i cant find ANY so i would love for any assistance.

ive been scouring this forum (through google search so maybe my fault)
but i genuinely dont think any of the methods work (real pythons article dosent exactly fully work).
you can go as technical as you like and even put code snippets, i can understand (i assure you. (please) and i can understand why the "im 11" thing can off-put people but lets be honest, its not exactly great using a junior account. so please help. id love for answers (just to be clear, im using the uno which you get in those lil electronic kits (the cheap ones) so.)
yeah

for anyone that wants to look through the code im using
here ya go (im just putting this in. JUST in case)

#include <Boards.h>
#include <Firmata.h>
#include <FirmataConstants.h>
#include <FirmataDefines.h>
#include <FirmataMarshaller.h>
#include <FirmataParser.h>

#include <U8g2lib.h>
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>

#define OLED_RESET 4
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ OLED_RESET);

#define PLAY_PAUSE_BUTTON 2
#define NEXT_BUTTON 3
#define PREVIOUS_BUTTON 4

SoftwareSerial mp3Serial(10, 11); // RX, TX
DFRobotDFPlayerMini dfPlayer;

bool isPlaying = false;

// Icon arrays
const unsigned char play_pause_bits_play[] PROGMEM = {
  B00000000,
  B00001000,
  B00001100,
  B00001110,
  B00001100,
  B00001000,
  B00000000,
  B00000000
};

const unsigned char play_pause_bits_pause[] PROGMEM = {
  B00000000,
  B00011000,
  B00011000,
  B00011000,
  B00011000,
  B00011000,
  B00000000,
  B00000000
};

const unsigned char previous_bits[] PROGMEM = {
  B00000000,
  B00011000,
  B00011100,
  B00011110,
  B11111111,
  B00011100,
  B00011100,
  B00011000
};

const unsigned char right_arrow_bits[] PROGMEM = {
  B00001000,
  B00000100,
  B00000010,
  B00000001,
  B00000010,
  B00000100,
  B00001000,
  B00000000
};

void setup() {
  pinMode(PLAY_PAUSE_BUTTON, INPUT_PULLUP);
  pinMode(NEXT_BUTTON, INPUT_PULLUP);
  pinMode(PREVIOUS_BUTTON, INPUT_PULLUP);

  Serial.begin(9600);
  mp3Serial.begin(9600);

  u8g2.begin();
  u8g2.setFont(u8g2_font_ncenB08_tr);
  u8g2.clearBuffer();

  dfPlayer.begin(mp3Serial);
  dfPlayer.setTimeOut(500); // Set serial communication timeout to 500ms

  // Initialize the display
  u8g2.clearBuffer();
  u8g2.drawStr(0, 15, "Now Playing:");
  // Display icons
  u8g2.drawXBMP(20, 55, 8, 8, previous_bits);   // Previous icon
  u8g2.drawXBMP(50, 55, 8, 8, play_pause_bits_play); // Play/Pause icon
  u8g2.drawXBMP(80, 55, 8, 8, right_arrow_bits);       // Right arrow icon for Next button
  u8g2.sendBuffer();
}

void loop() {
  if (digitalRead(PLAY_PAUSE_BUTTON) == LOW) {
    if (!isPlaying) {
      dfPlayer.play();
      isPlaying = true;
      // Update play/pause button icon
      u8g2.clearBuffer();
      u8g2.drawStr(0, 15, "Now Playing:");
      u8g2.drawXBMP(20, 55, 8, 8, previous_bits);   // Previous icon
      u8g2.drawXBMP(50, 55, 8, 8, play_pause_bits_pause); // Pause icon
      u8g2.drawXBMP(80, 55, 8, 8, right_arrow_bits);       // Right arrow icon for Next button
      u8g2.sendBuffer();
    } else {
      dfPlayer.pause();
      isPlaying = false;
      // Update play/pause button icon
      u8g2.clearBuffer();
      u8g2.drawStr(0, 15, "Now Playing:");
      u8g2.drawXBMP(20, 55, 8, 8, previous_bits);   // Previous icon
      u8g2.drawXBMP(50, 55, 8, 8, play_pause_bits_play); // Play icon
      u8g2.drawXBMP(80, 55, 8, 8, right_arrow_bits);       // Right arrow icon for Next button
      u8g2.sendBuffer();
    }
    delay(500);
  }

  if (digitalRead(NEXT_BUTTON) == LOW) {
    dfPlayer.next();
    delay(500);
  }

  if (digitalRead(PREVIOUS_BUTTON) == LOW) {
    dfPlayer.previous();
    delay(500);
  }
}

also i would love for a good png to bitmap converter, the ones above are pretty trashy (most of the code is pulled from chatgpt, and also because i get slaughtered on this forum, i made A LOT. of the code)

to the question

How do i use micropython/python with a UNO

The answer is you don't.

There is just not enough RAM / flash storage on a UNO

see https://docs.arduino.cc/micropython/

Firmware

Arduino has developed MicroPython support for the boards listed below.
ARDUINO GIGA
ARDUINO NANO 33 BLE SENSE
ARDUINO NANO ESP32
ARDUINO NANO RP2040 CONNECT
ARDUINO NICLA VISION
ARDUINO PORTENTA C33
ARDUINO PORTENTA H7
ARDUINO PRIMO


11 is a good age to start learning C++...

2 Likes

rq the flash storage is the microprocessor right,
if it is, can we not upgrade it?

(also yeah i plan to start c++ but i started with python so might asw finish it :))

nope - it depends on the ATMEGA processor you have ➜ 4/8/16/32K Bytes of In-System Self-Programmable Flash progam memory for ATmega48P/88P/168P/328P

the UNO has a 328P so 32K

if you want to play with python on a small MCU, get a RPi

got it. thank you!