IR Remote Control Calculator Using Raspberry Pi Pico 2

IR Remote Control Calculator Using Raspberry Pi Pico 2

To build a remote-controlled calculator using a Raspberry Pi Pico, an OLED display, and an IR remote control, follow these steps:

Step 1: Set Up the Raspberry Pi Pico 2

  1. Install CircuitPython:

    • Download CircuitPython for Raspberry Pi Pico from the CircuitPython downloads page.
    • Put your Pico in bootloader mode by holding down the BOOTSEL button while plugging it into your computer.
    • Drag the downloaded .uf2 file onto the Pico. It will reboot into CircuitPython mode.
  2. Prepare the Libraries:

    • Download the CircuitPython library bundle from Adafruit's GitHub page.
    • Extract the bundle and copy the following libraries to the lib folder on your Pico:
      • adafruit_displayio_ssd1306
      • adafruit_display_text
      • adafruit_irremote

 

Step 2: Wire the Components

  1. OLED Display:

    • Connect the OLED display to the Pico as follows:
      • SCL to GP5
      • SDA to GP4
      • VCC to 3.3V
      • GND to GND

  1. IR Receiver:

    • Connect the IR receiver module as follows:
      • VCC to 3.3V
      • GND to GND
      • OUT to GP3

 

Step 3: Write the Code

- connect the usb cable to computer

- dont forget to decode the ir signal

Download the code here 

 

Step 4: Test and Debug

  • Upload the code to your Pico and connect it to power.
  • Test the remote control to ensure that all buttons correspond correctly to the intended calculator functions.
  • Debug any issues by checking connections, ensuring correct codes for each button, and verifying the display output.

 

Step 5: Optimize the Code

  • Fine-tune the display centering for different lengths of text.
  • Refine the operation handling to support more complex calculations if needed.

 

Final Testing

  • Ensure that each button on your remote triggers the correct action on the calculator.
  • Test the calculator functionality with different inputs and operations.

 

Video Output

   

This guide provides you with the necessary steps to create a remote-controlled calculator using a Raspberry Pi Pico 2, CircuitPython.