This project requires purchasing an ESP32 micro-controller. They generally can be purchased for less than $15. You may also need a USB cable to communicate with and power it. (The ESP32 can be powered with a USB cable, a battery pack or a separate power supply.)
There are two version of Python that run on the ESP32.
Note: I used the Adafruit ESP32-S3 TFT Feather (Product ID: 5483) when developing/testing this project. However, it has extra bells and whistles not required for the project. Any ESP32 will do. (If you can find one with Python already installed even better.)
Many ESP32 boards have an onboard LED you can turn on and off. Write a program to blink (in Morse code)
Morse Code (wikipedia)
Questions: how long is a dot compared to a dash? The time between a dot and dash? The time between letters or words?
Google: ESP32, CircuitPython, and MicroPython. Also search YouTube.
Search Amazon.com for ESP32.
Adafruit (home)
Adafruit, welcome to CircuitPython
Adafruit, ESP32-S3 TFT Feather
Adafruit has a lot of learning material on their website
learn.adafruit.com.
MicroPython (home)
MicroPython on ESP32 (YouTube)
You will need a USB cable to connect you computer to the ESP32 for the initial setup. After setting everything up, you may be able to use Wi-Fi or Bluetooth (depending on which ESP32 board you have).
Check both your computer and the ESP32 board to see what type of connectors will be needed. In my case, I need a USB A (male) to USB C (male) cable.
// Beethoven Symphony No. 5 In C Minor Op. 67 // (also the Morse code V) // the setup function void setup() { // initialize built in LED pin as an output. pinMode(LED_BUILTIN, OUTPUT); // initialize USB serial port //Serial.begin(19200); //Serial.println("Hello Computer"); } // blink LED function void myBlink(int ledDelay,int waitTime) { digitalWrite(LED_BUILTIN, HIGH); // LED on delay(ledDelay); // wait (milliseconds) digitalWrite(LED_BUILTIN, LOW); // LED off delay(waitTime); // wait (milliseconds) } // the loop function void loop() { myBlink(250,200); // dit (milliseconds) //Serial.println("dit"); myBlink(250,200); // dit (milliseconds) //Serial.println("dit"); myBlink(250,200); // dit (milliseconds) //Serial.println("dit"); myBlink(750,1000); // dah (milliseconds) //Serial.println("dah"); }