HariFun

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ก.ย. 2024
  • My inelegant code:
    github.com/hwi...

ความคิดเห็น • 47

  • @shanerobertson100
    @shanerobertson100 6 ปีที่แล้ว +3

    Holy shit I came

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว +2

      lol. You need to go out more ;-)

  • @UnexpectedMaker
    @UnexpectedMaker 6 ปีที่แล้ว +4

    That's mesmerising!

  • @frankie3627
    @frankie3627 4 ปีที่แล้ว +1

    Nice work but would be even nicer if you could explain how the code operates;

    • @HariWiguna
      @HariWiguna  4 ปีที่แล้ว

      Thanks Frankie! The code is not elegant and quite straightforward. If you follow this link:
      github.com/hwiguna/HariFun_165_Morphing_Digits/tree/master/MorphDigit3
      you will see that most of MorphDigit3.ino is setting up the matrix display (I didn't write the library to drive the matrix) and just a loop to increment the two digits then calls Morph() to actually morph to the next digit. I make he assumption that the digits are shown in sequence. so for instance when you call Morph(2) it assumes that the current value is 1 and I animate the segments with that assumption. Animation is nothing but drawing the segments as they move from previous to the target. Very tedious to code, but I think it was worth it. Ask me anything if this is still unclear. I'd be happy to explain.

  • @bornach
    @bornach 6 ปีที่แล้ว +2

    I've made an attempt to generalise your morphing digits animations to handle arbitrary transitions between any two 7-segment digits. Also works fairly well when I throw in a few letters of the alphabet.

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว

      I love it! Great job! Thanks for sharing!
      th-cam.com/video/QJZRKHw6bcg/w-d-xo.html

  • @mikeleist1075
    @mikeleist1075 6 ปีที่แล้ว +4

    As far as a more generic algorithm - off the top of my head, perhaps have a list of rows & columns that are on for each digit. Then when a digit changes, the new digits list entry is compared to the old, which will show which rows and cols have to change, either can be moved, copied or deleted. Any additional vertical can be copied with an animated transition from its left/right neighbour. Any vertical which goes off or is moved to the other side can have its animation so that the vertical moves and the old one is deleted. Same with rows. I probably haven't made myself clear. If I have time I might have a play and I will let you know.

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว +1

      Mike, that's awesome! Great idea and great job explaining it without pictures! If you got something coded (even if it's not complete), please share a video. I love it to see others getting inspired and having fun.

    • @4x4getoffmyland
      @4x4getoffmyland 6 ปีที่แล้ว +1

      it should be easy to not only do numbers but letters too, every character can be built with around 15 elements(horizontal, vertical, diag) and to make it clean you compare character map A to map B for elements if they are across from or joining. the animations from each segment to another are called based on the map comparison. I did a quick search on 'letter morphing transition algorithm' as I think I have seen something related to this but many years ago. this was for animation... you are just simplifying it with dots!

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว +1

      Thanks for the search hint. This was the idea that I originally had in my mind, but not smart enough to code, so I compromised with lines instead of morphing filled polygons.
      www.google.com/search?q=letter+morphing+transition+algorithm&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwi02riBsezbAhUREawKHduWDPYQsAQIUA&biw=1280&bih=680#imgrc=ikL_7LkZ1IsZPM:

  • @gilvansantos7248
    @gilvansantos7248 4 ปีที่แล้ว

    Good Morning. When I do the code compilation, ask for the library: fxmatrix.h. How to make this library available?

  • @ajaybnl
    @ajaybnl 6 ปีที่แล้ว +1

    Looks good. Just 10 Routines for each number to next number (0-9) and define the place to draw.

  • @Corgitronics
    @Corgitronics 6 ปีที่แล้ว +2

    Nice! Very creative!

  • @UpcycleElectronics
    @UpcycleElectronics 6 ปีที่แล้ว +2

    That would make a cool looking meter display.

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว +1

      Yes. That's why I thought morphing only digits upward would be sufficient. A clock, or some sort of counter.

  • @Relations99
    @Relations99 6 ปีที่แล้ว +1

    That was cool. Perhaps prepare animations for each digit transforming to every other digit. Then you just break down the number its supposed to transition to and pull from an array accordingly.

  • @joedempseysr.3376
    @joedempseysr.3376 6 ปีที่แล้ว +1

    For a generic algorithm I'll give you a hint. There's some software that will morph a person's fac e from one person to another. I'm sure you've seen this somewhere before. It works by selecting features on the face and uses those points to start the transformation. You could get the source code for this and use a similar algorithm. That would also allow you to transition from any digit to any other digit.

  • @davefigures7999
    @davefigures7999 6 ปีที่แล้ว +1

    Use matrices and transformations and stuff, I'm sure there's gotta be a way, and itll be a little complicated to define but once you do whohooo, you're in the money, have fun with these

  • @davidbristoll195
    @davidbristoll195 6 ปีที่แล้ว +1

    This is amazing, well done! For something more general regarding the code required for the transformation, I would consider a for loop iterating through the x position of each LED from the current position to the new position. If a LED is no longer displayed, it can slide off one side and if a new LED is lit, it could slide on from the other side.
    It would need some work to look as good as what you've created though, but it could be used for all character transitions.

  • @ChrisFredriksson
    @ChrisFredriksson 6 ปีที่แล้ว +2

    Really cool Hari!

  • @avejst
    @avejst 6 ปีที่แล้ว +1

    Cool, well!!
    Thanks for sharing 😀👍

  • @tomgray7049
    @tomgray7049 6 ปีที่แล้ว +1

    This is way cool. Thank you!!! :)

  • @richnelson2042
    @richnelson2042 6 ปีที่แล้ว +1

    I love this! Just subscribed ☺️

  • @MrBobWareham
    @MrBobWareham 6 ปีที่แล้ว +1

    I had to play again and again it looks so cool so it must be a block of LEDs to get the effect very nice 7x14=98

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว

      Thanks Bob! Glad you enjoyed it. I wrote the code so the size of the digit could be easily changed so I could make it taller or shorter and place it anywhere on the 64x32 matrix display. Checkout the surprise unboxing if you haven't seen it already. th-cam.com/video/hsDWNkGwjRM/w-d-xo.html

  • @x10iman
    @x10iman 6 ปีที่แล้ว +1

    Awesome. Maybe you can try to make the segments come from all around the matrix to form the digits.

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว

      Oooh, that'd be cool... Thx for the idea!

  • @karllaun2427
    @karllaun2427 6 ปีที่แล้ว +1

    Very cool, as always!

  •  6 ปีที่แล้ว +1

    42 is the answer 😋

  • @jope4009
    @jope4009 6 ปีที่แล้ว +1

    Very cool!

  • @jakethoover
    @jakethoover 6 ปีที่แล้ว +1

    Nice work

  • @Iamstrugglingusingvim6969
    @Iamstrugglingusingvim6969 6 ปีที่แล้ว +1

    Cool!

  • @Corialtavi
    @Corialtavi 6 ปีที่แล้ว +1

    Nice

  • @CarlosFilmagem2008
    @CarlosFilmagem2008 6 ปีที่แล้ว +1

    Show!!! muito bom!!!!!

  • @Gaatech
    @Gaatech 6 ปีที่แล้ว +1

    Nice

  • @Sarahbuildsstepsequencers
    @Sarahbuildsstepsequencers 6 ปีที่แล้ว +1

    Make a clock - this is new and unique!

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว

      Hi Sarah! You read my mind. A morphing clock is EXACTLY what I had planned on making. Thanks for the comment!

    • @HariWiguna
      @HariWiguna  6 ปีที่แล้ว

      Sarah, I got the clock working! It's pretty slick.
      Thanks for the suggestion!
      th-cam.com/video/i0M6F4wRxGc/w-d-xo.html

  • @DiyintheGhetto
    @DiyintheGhetto 5 ปีที่แล้ว

    Hey Hari Question that is a 64x32 Led module? How much current does it run if full all out on all coders?

    • @HariWiguna
      @HariWiguna  5 ปีที่แล้ว

      Hi J, sorry I don't know the answer to your question. The matrix is probably multiplexed so even if we turn all LEDs on, only a subset are lit at any moment.

    • @DiyintheGhetto
      @DiyintheGhetto 5 ปีที่แล้ว

      @@HariWiguna hey hari what i mean is what power supply are you using, your adjustable one?

    • @HariWiguna
      @HariWiguna  5 ปีที่แล้ว +1

      @@DiyintheGhetto Since my clock only uses blue and never turn on all pixels, I've been running the clock with a phone charger to power the NodeMCU and a 5V 2A wall wart to power the matrix. I think even a 5V 1A would be fine, but the 2A is what have and it's been running for months with no problem.