Smallest Blink Sketch Ever?

Поделиться
HTML-код
  • Опубликовано: 26 дек 2023
  • This is just a fun video to show a small blink sketch. The sketch is run on the Parallax Propeller P1 running Tachyon Forth.
    Tachyon Forth:
    sourceforge.net/projects/tach...
    NCO Timer video:
    • Create PWM and NCO sig...
  • НаукаНаука

Комментарии • 37

  • @onecircuit-as
    @onecircuit-as 6 месяцев назад +6

    0 Blink
    1 Make Coffee
    2 Mow Lawn

    • @smug_cat1
      @smug_cat1 6 месяцев назад +1

      const int eyePin = 13;
      void setup() {
      pinMode(eyePin, OUTPUT);
      }
      void loop() {
      blink();
      delay(5000); // Wait for 5 seconds before the next task
      makeCoffee();
      delay(5000); // Wait for 5 seconds before the next task
      mowLawn();
      delay(5000); // Wait for 5 seconds before the next task
      }
      void blink() {
      digitalWrite(eyePin, HIGH);
      delay(500); // Eye blinking duration
      digitalWrite(eyePin, LOW);
      }
      void makeCoffee() {
      Serial.println("Making coffee... Oops, the coffee machine is on strike!");
      }
      void mowLawn() {
      Serial.println("Mowing the lawn... with a pair of scissors!");
      }

  • @jerril42
    @jerril42 6 месяцев назад +3

    Thank you! Happy Holidays. All the best to you and your family in 2024.

    • @0033mer
      @0033mer  6 месяцев назад +2

      Thank You .. Happy New Year.

  • @pablofpv
    @pablofpv 6 месяцев назад +2

    The blink example is from "Getting Started with Arduino" Massimo Banzi 2nd edition 😃, I don't know what is worse, that I'm watching this over the holidays or that I actually recognized the page! Thanks for videos 😊.

    • @0033mer
      @0033mer  6 месяцев назад +2

      Yes ... you are correct. You would make a good detective.

  • @jackwody7774
    @jackwody7774 6 месяцев назад

    Even simpler is to complement the LED state, call the delay, then loop

  • @Edmorbus
    @Edmorbus 6 месяцев назад +1

    Thanks for sharing and happy new year

    • @0033mer
      @0033mer  6 месяцев назад +1

      You're welcome. Happy new year to you.

  • @markgreco1962
    @markgreco1962 6 месяцев назад +1

    You were right that was interesting

  • @johncatsoulis
    @johncatsoulis 6 месяцев назад

    Great video Ken, but I have to say... "Easier with a Scamp!" ;) Happy new year.

    • @0033mer
      @0033mer  6 месяцев назад

      Yes, I was thinking that if "Blink" would continue to blink. Happy New Year John. Just watched the news. I see you have had some storm activity in your area.

  • @GoatZilla
    @GoatZilla 4 месяца назад

    suspect there's a way to make the sketch smaller...

  • @Cyklonus
    @Cyklonus 6 месяцев назад

    👍👍

  • @kylekulhank
    @kylekulhank 6 месяцев назад

    I thought this was going to get into bare metal programming with machine language. Your parallax code is still a huge program, you just don't see it because it's behind a bunch of classes and libraries.

    • @0033mer
      @0033mer  6 месяцев назад +2

      At the beginning of the video and in the description I indicated it was just a "fun" video. Most of the viewers caught on and ran with it giving their funny solutions. The purpose of the video was to show beginners how they could type a few simple commands to get an instant response from a microcontroller. I have done other videos using assembler and the response was " nobody does assembler anymore" so as a content creator you lose either way.

  • @harveyellis6758
    @harveyellis6758 6 месяцев назад +11

    Smallest is to use 555 timer. No code needed ;-)

    • @p_mouse8676
      @p_mouse8676 6 месяцев назад +9

      Definitely not smallest.
      Smaller is one Schmitt inverter and it can even be done with just two transistors or even a single one with a bit of trickery😉👍😎

    • @pileofstuff
      @pileofstuff 6 месяцев назад +4

      My favourite coding language: solder

    • @0033mer
      @0033mer  6 месяцев назад +6

      Use a blinking LED. No 555 needed. :o)

    • @paulthomas4917
      @paulthomas4917 6 месяцев назад +1

      the smallest, one relay one cap.

    • @goodgamer339
      @goodgamer339 6 месяцев назад +1

      But even if we are talking about a real sketch this isn't the smallest one possible. You can reduce the compiled program size massively by switching the pins directly, not using the libraries for delays or anything and deleting the loop and setup and just using your own main. So even in the realm of blinking an led via code this is still not the smallest sketch.

  • @nanoIam
    @nanoIam 6 месяцев назад

    Elon Musk could make it smaller if he wanted to 😤