<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Custom blocks with a variable  input]]></title><description><![CDATA[<p dir="auto">How to create a block that operates like a function?  Variable (x) input to block, --&gt; number crunching ---&gt; returns a value<br />
I can make label blocks but have not an understanding of using variables in custom blocks<br />
Thanks</p>
]]></description><link>https://community.m5stack.com/topic/3962/custom-blocks-with-a-variable-input</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 06:21:26 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3962.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 Jan 2022 23:51:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom blocks with a variable  input on Fri, 11 Feb 2022 02:14:25 GMT]]></title><description><![CDATA[<p dir="auto">Hello,<br />
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</p>
<p dir="auto"><img src="/assets/uploads/files/1644545337737-020d3478-9387-4d1f-82d9-f3af909e87b0-image.png" alt="0_1644545334861_020d3478-9387-4d1f-82d9-f3af909e87b0-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Don't forget to use the ${} to reference your "Variables" when creating the formulas.  It also reminds you when in the block creater.<br />
<img src="/assets/uploads/files/1644545553311-f6364133-289d-4d73-a3f0-970d1279bd9d-image.png" alt="0_1644545551259_f6364133-289d-4d73-a3f0-970d1279bd9d-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">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</p>
<p dir="auto"><img src="/assets/uploads/files/1644545423986-5569aa80-88c6-4c0e-9803-3c0b28dd4fd0-image.png" alt="0_1644545421783_5569aa80-88c6-4c0e-9803-3c0b28dd4fd0-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/16610</link><guid isPermaLink="true">https://community.m5stack.com/post/16610</guid><dc:creator><![CDATA[SE]]></dc:creator><pubDate>Fri, 11 Feb 2022 02:14:25 GMT</pubDate></item></channel></rss>