<?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[REMOTE+ Slider for motors]]></title><description><![CDATA[<p dir="auto">I like the REMOTE+ - feature. Works fine, but... The slider range starts at 0 and ends with 100. Most motors are controlled in the range of -127 to +127. Has anyone an idea of how to manage this?</p>
]]></description><link>https://community.m5stack.com/topic/3466/remote-slider-for-motors</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Mar 2026 00:11:47 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3466.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 21 Jul 2021 13:58:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 20 Aug 2021 16:19:21 GMT]]></title><description><![CDATA[<p dir="auto">Finally, I've got it working using the map-block from Easy I/O in UIFlow (by chance I found it!), which is just</p>
<p dir="auto">def slider_Motor_callback(slider_value):<br />
motion.set_motor_speed(2, map_value(slider_value, 0, 100, -127, 127))</p>
<p dir="auto">without any translation. Works fine with Remote+</p>
]]></description><link>https://community.m5stack.com/post/14698</link><guid isPermaLink="true">https://community.m5stack.com/post/14698</guid><dc:creator><![CDATA[Werner_G]]></dc:creator><pubDate>Fri, 20 Aug 2021 16:19:21 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Sat, 24 Jul 2021 10:51:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/8155">@Werner_G</a>, probably there is a problem with remote control. In this thread is a post about it<br />
<a href="https://community.m5stack.com/topic/3477/uiflow-1-8-1">https://community.m5stack.com/topic/3477/uiflow-1-8-1</a></p>
]]></description><link>https://community.m5stack.com/post/14494</link><guid isPermaLink="true">https://community.m5stack.com/post/14494</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Sat, 24 Jul 2021 10:51:02 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 23 Jul 2021 21:09:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/2460">@robalstona</a></p>
<p dir="auto">with this definition the motors shows absolutely no movement.</p>
]]></description><link>https://community.m5stack.com/post/14490</link><guid isPermaLink="true">https://community.m5stack.com/post/14490</guid><dc:creator><![CDATA[Werner_G]]></dc:creator><pubDate>Fri, 23 Jul 2021 21:09:03 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 23 Jul 2021 20:19:58 GMT]]></title><description><![CDATA[<p dir="auto">Try this:</p>
<pre><code>def translate(slider_value, inMin, inMax, outMin, outMax):
  return (slider_value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin

def slider_Motor_callback(slider_value):
  motion = Motion()
  motion.set_motor_speed(1, translate(slider_value, 0, 100, -127, 127) )
</code></pre>
]]></description><link>https://community.m5stack.com/post/14487</link><guid isPermaLink="true">https://community.m5stack.com/post/14487</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Fri, 23 Jul 2021 20:19:58 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 23 Jul 2021 19:40:38 GMT]]></title><description><![CDATA[<p dir="auto">I also tried this - but with no success. Seems that mapping or translating might not work in combination with REMOTE. Thanks for your help!</p>
]]></description><link>https://community.m5stack.com/post/14486</link><guid isPermaLink="true">https://community.m5stack.com/post/14486</guid><dc:creator><![CDATA[Werner_G]]></dc:creator><pubDate>Fri, 23 Jul 2021 19:40:38 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 23 Jul 2021 19:04:27 GMT]]></title><description><![CDATA[<p dir="auto">the definition of your function has been created but you have to call it now with :<br />
translate(slider_value, inMin, inMax, outMin, outMax)</p>
]]></description><link>https://community.m5stack.com/post/14485</link><guid isPermaLink="true">https://community.m5stack.com/post/14485</guid><dc:creator><![CDATA[joueurgear]]></dc:creator><pubDate>Fri, 23 Jul 2021 19:04:27 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Fri, 23 Jul 2021 18:07:22 GMT]]></title><description><![CDATA[<p dir="auto">Thank you. I tried this:</p>
<blockquote>
<p dir="auto">...<br />
def slider_Motor_callback(slider_value):<br />
global inMin, inMax, outMin, outMax, tof_0<br />
motion = Motion()<br />
inMin = 0<br />
inMax = 100<br />
outMin = -127<br />
outMax = 127<br />
def translate(slider_value, inMin, inMax, outMin, outMax):<br />
return (slider_value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin<br />
motion.set_motor_speed(1, slider_value)<br />
...</p>
</blockquote>
<p dir="auto">But this doesn't work. What might be wrong?</p>
]]></description><link>https://community.m5stack.com/post/14483</link><guid isPermaLink="true">https://community.m5stack.com/post/14483</guid><dc:creator><![CDATA[Werner_G]]></dc:creator><pubDate>Fri, 23 Jul 2021 18:07:22 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Thu, 22 Jul 2021 19:53:37 GMT]]></title><description><![CDATA[<pre><code>def translate(value, inMin, inMax, outMin, outMax):
    return (value - inMin) * (outMax - outMin) / (inMax - inMin) + outMin
</code></pre>
]]></description><link>https://community.m5stack.com/post/14463</link><guid isPermaLink="true">https://community.m5stack.com/post/14463</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Thu, 22 Jul 2021 19:53:37 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Wed, 21 Jul 2021 21:35:45 GMT]]></title><description><![CDATA[<p dir="auto">you are probably right. But I cannot see any similarity with the maps-function of other IDE's. Great would be a mathematical function like this from MakeCode:<br />
"map 'speed' from low '0' high '100' to low '-127' high '127'" (or vice versa)<br />
Using arrays is very compicated, too much for me.</p>
]]></description><link>https://community.m5stack.com/post/14458</link><guid isPermaLink="true">https://community.m5stack.com/post/14458</guid><dc:creator><![CDATA[Werner_G]]></dc:creator><pubDate>Wed, 21 Jul 2021 21:35:45 GMT</pubDate></item><item><title><![CDATA[Reply to REMOTE+ Slider for motors on Wed, 21 Jul 2021 18:50:20 GMT]]></title><description><![CDATA[<p dir="auto">you need to use the map block to map the range</p>
]]></description><link>https://community.m5stack.com/post/14455</link><guid isPermaLink="true">https://community.m5stack.com/post/14455</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Wed, 21 Jul 2021 18:50:20 GMT</pubDate></item></channel></rss>