<?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[WIP ACSSR Guide]]></title><description><![CDATA[<p dir="auto">I can't get RS485/Modbus working and so here is the Work in Progress ACSSR Guide.<br />
<a href="https://www.hackster.io/AJB2K3/get-started-with-the-m5stack-acssr-cf960b" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.hackster.io/AJB2K3/get-started-with-the-m5stack-acssr-cf960b</a></p>
]]></description><link>https://community.m5stack.com/topic/4483/wip-acssr-guide</link><generator>RSS for Node</generator><lastBuildDate>Sun, 10 May 2026 11:13:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4483.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 31 Jul 2022 08:37:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to WIP ACSSR Guide on Sun, 31 Jul 2022 19:15:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a></p>
<p dir="auto">I've just checked. Above blocks work for me with an M5Core2 as well. Instead of TX=17 / RX=16 I use TX=14 / RX=13. That said I do not have the RS485 unit so I am using the little RS485 board (which came with the LAN module) albeit outside the LAN module connected via a BUS module.</p>
<p dir="auto">The ACSSR is powered from an external 12 V power supply. The little RS485 board is powered with 5 V from the M5Core2. There are only two wires between the ACSSR and the little RS485 board: A &lt;-&gt; A and B &lt;-&gt; B. I also added an 120 Ohm resistor between A and B of the little RS485 board. The ACSSR already has that resistor in place internally.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18132</link><guid isPermaLink="true">https://community.m5stack.com/post/18132</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 31 Jul 2022 19:15:24 GMT</pubDate></item><item><title><![CDATA[Reply to WIP ACSSR Guide on Sun, 31 Jul 2022 17:54:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/felmue" aria-label="Profile: felmue">@<bdi>felmue</bdi></a> said in <a href="/post/18130">WIP ACSSR Guide</a>:</p>
<blockquote>
<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a></p>
<p dir="auto">for your excellent ACSSR guide you'll find below the UIFlow Modbus blocks to switch the ACSSR on / off (together with the RGB LED) using an M5Stack Basic.</p>
<p dir="auto">Two things to note which were not obvious to me:</p>
<ul>
<li>Baudrate needs to be <code>115200</code> (anything lower only resets the ACSSR)</li>
<li>to turn the ACSSR <code>on</code> the value needs to be <code>0xFF00</code> (See <a href="https://www.modbustools.com/modbus.html#function05" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>)</li>
</ul>
<p dir="auto">Button functions:</p>
<ul>
<li>Button A: relay on / LED red</li>
<li>Button B: relay off / LED green</li>
<li>Button C: read version</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1659277539306-uiflowacssrmodbus_20220731-resized.png" alt="0_1659277536153_UIFlowACSSRModbus_20220731.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and the corresponding Python code:</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
from modbus.master.uModBusSerial import uModBusSerial

setScreenColor(0x222222)

label0 = M5TextBox(54, 58, "label0", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(54, 100, "label1", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label2 = M5TextBox(50, 140, "label2", lcd.FONT_Default, 0xFFFFFF, rotate=0)

def buttonA_wasPressed():
  # global params
  label0.setText(str(modbus.write_single_coil(4, 0, 0xFF00)))
  label1.setText(str(modbus.write_single_register(4, 0, 0xF800, True)))
  pass
btnA.wasPressed(buttonA_wasPressed)

def buttonC_wasPressed():
  # global params
  label2.setText(str(modbus.read_holding_registers(4, 1, 1, True)))
  pass
btnC.wasPressed(buttonC_wasPressed)

def buttonB_wasPressed():
  # global params
  label0.setText(str(modbus.write_single_coil(4, 0, 0x00)))
  label1.setText(str(modbus.write_single_register(4, 0, 0x07E0, True)))
  pass
btnB.wasPressed(buttonB_wasPressed)

modbus = uModBusSerial(1, tx=17, rx=16, baudrate=115200, data_bits=8, stop_bits=1, parity=None, ctrl_pin=None)
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
</blockquote>
<p dir="auto">Thanks but can't get it to work on a core2 using the RS485 unit</p>
]]></description><link>https://community.m5stack.com/post/18131</link><guid isPermaLink="true">https://community.m5stack.com/post/18131</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sun, 31 Jul 2022 17:54:57 GMT</pubDate></item><item><title><![CDATA[Reply to WIP ACSSR Guide on Sun, 31 Jul 2022 14:39:19 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a></p>
<p dir="auto">for your excellent ACSSR guide you'll find below the UIFlow Modbus blocks to switch the ACSSR on / off (together with the RGB LED) using an M5Stack Basic.</p>
<p dir="auto">Two things to note which were not obvious to me:</p>
<ul>
<li>Baudrate needs to be <code>115200</code> (anything lower only resets the ACSSR)</li>
<li>to turn the ACSSR <code>on</code> the value needs to be <code>0xFF00</code> (See <a href="https://www.modbustools.com/modbus.html#function05" target="_blank" rel="noopener noreferrer nofollow ugc">here</a>)</li>
</ul>
<p dir="auto">Button functions:</p>
<ul>
<li>Button A: relay on / LED red</li>
<li>Button B: relay off / LED green</li>
<li>Button C: read version</li>
</ul>
<p dir="auto"><img src="/assets/uploads/files/1659277539306-uiflowacssrmodbus_20220731-resized.png" alt="0_1659277536153_UIFlowACSSRModbus_20220731.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">and the corresponding Python code:</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
from modbus.master.uModBusSerial import uModBusSerial

setScreenColor(0x222222)

label0 = M5TextBox(54, 58, "label0", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label1 = M5TextBox(54, 100, "label1", lcd.FONT_Default, 0xFFFFFF, rotate=0)
label2 = M5TextBox(50, 140, "label2", lcd.FONT_Default, 0xFFFFFF, rotate=0)

def buttonA_wasPressed():
  # global params
  label0.setText(str(modbus.write_single_coil(4, 0, 0xFF00)))
  label1.setText(str(modbus.write_single_register(4, 0, 0xF800, True)))
  pass
btnA.wasPressed(buttonA_wasPressed)

def buttonC_wasPressed():
  # global params
  label2.setText(str(modbus.read_holding_registers(4, 1, 1, True)))
  pass
btnC.wasPressed(buttonC_wasPressed)

def buttonB_wasPressed():
  # global params
  label0.setText(str(modbus.write_single_coil(4, 0, 0x00)))
  label1.setText(str(modbus.write_single_register(4, 0, 0x07E0, True)))
  pass
btnB.wasPressed(buttonB_wasPressed)

modbus = uModBusSerial(1, tx=17, rx=16, baudrate=115200, data_bits=8, stop_bits=1, parity=None, ctrl_pin=None)
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18130</link><guid isPermaLink="true">https://community.m5stack.com/post/18130</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sun, 31 Jul 2022 14:39:19 GMT</pubDate></item></channel></rss>