🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Custom blocks with a variable input

    Scheduled Pinned Locked Moved Custom Blocks
    2 Posts 2 Posters 5.9k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      timtimw
      last edited by timtimw

      How to create a block that operates like a function? Variable (x) input to block, --> number crunching ---> returns a value
      I can make label blocks but have not an understanding of using variables in custom blocks
      Thanks

      1 Reply Last reply Reply Quote 0
      • S Offline
        SE
        last edited by

        Hello,
        In case you don't have an answer here is an example of custom block I made for Parsing Text. It will ask for 3 inputs (via variables) and then return a result to a variable

        0_1644545334861_020d3478-9387-4d1f-82d9-f3af909e87b0-image.png

        Don't forget to use the ${} to reference your "Variables" when creating the formulas. It also reminds you when in the block creater.
        0_1644545551259_f6364133-289d-4d73-a3f0-970d1279bd9d-image.png

        This is what it looks like in UIFLOW. Note the 1st three are inputs and "DataResults" is the output. In my UIFLOW example DataParse and DataResults are UIFLOW variables not the same as the Custom Block variables

        0_1644545421783_5569aa80-88c6-4c0e-9803-3c0b28dd4fd0-image.png

        1 Reply Last reply Reply Quote 2

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post