<?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[ACSSR I2c control]]></title><description><![CDATA[<p dir="auto">First off, let me say " I Haz Dumb"!<br />
I'm trying to run the ACSSR over I2C Using UIFLow and I can not for the life of me workout how to trigger the SSR. has anyone worked this out yet</p>
]]></description><link>https://community.m5stack.com/topic/4457/acssr-i2c-control</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 12:57:56 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/4457.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Jul 2022 10:43:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ACSSR I2c control on Sat, 23 Jul 2022 13:06:34 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/18038">ACSSR I2c control</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">first of all make sure when the ACSSR powers on the internal RGB LED blinks red (=I2C mode). If not, follow the <a href="https://docs.m5stack.com/en/unit/acssr" target="_blank" rel="noopener noreferrer nofollow ugc">instructions</a> here to change mode. (Section <em>Usage/Communication protocol</em>)</p>
<p dir="auto">Then use something like below to first scan the I2C bus, set the proper slave address, read the version and then toggle the ACSSR every second.<br />
Note: I used an M5Atom for this example.</p>
<p dir="auto"><img src="/assets/uploads/files/1658576213239-m5atomunitacssrtest_20220723.png" alt="0_1658576211471_M5AtomUnitACSSRTest_20220723.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">or from the Micropython tab:</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bus
import time

myToggle = None

i2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x00, freq=400000)
print(i2c0.scan())
wait(1)
i2c0.addr=(0x50)
print(i2c0.read_u8(0xFE))
myToggle = False
while True:
  if myToggle == False:
    myToggle = True
    i2c0.write_u8(0x00, 0x01)
  else:
    myToggle = False
    i2c0.write_u8(0x00, 0x00)
  wait(1)
  wait_ms(2)
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
</blockquote>
<p dir="auto">Thanks mate, I didn't know you had to set the slave address, that explains why noting is working.</p>
]]></description><link>https://community.m5stack.com/post/18039</link><guid isPermaLink="true">https://community.m5stack.com/post/18039</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 23 Jul 2022 13:06:34 GMT</pubDate></item><item><title><![CDATA[Reply to ACSSR I2c control on Sat, 23 Jul 2022 11:40:46 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">first of all make sure when the ACSSR powers on the internal RGB LED blinks red (=I2C mode). If not, follow the <a href="https://docs.m5stack.com/en/unit/acssr" target="_blank" rel="noopener noreferrer nofollow ugc">instructions</a> here to change mode. (Section <em>Usage/Communication protocol</em>)</p>
<p dir="auto">Then use something like below to first scan the I2C bus, set the proper slave address, read the version and then toggle the ACSSR every second.<br />
Note: I used an M5Atom for this example.</p>
<p dir="auto"><img src="/assets/uploads/files/1658576213239-m5atomunitacssrtest_20220723.png" alt="0_1658576211471_M5AtomUnitACSSRTest_20220723.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">or from the Micropython tab:</p>
<pre><code>from m5stack import *
from m5ui import *
from uiflow import *
import i2c_bus
import time

myToggle = None

i2c0 = i2c_bus.easyI2C(i2c_bus.PORTA, 0x00, freq=400000)
print(i2c0.scan())
wait(1)
i2c0.addr=(0x50)
print(i2c0.read_u8(0xFE))
myToggle = False
while True:
  if myToggle == False:
    myToggle = True
    i2c0.write_u8(0x00, 0x01)
  else:
    myToggle = False
    i2c0.write_u8(0x00, 0x00)
  wait(1)
  wait_ms(2)
</code></pre>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/18038</link><guid isPermaLink="true">https://community.m5stack.com/post/18038</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Sat, 23 Jul 2022 11:40:46 GMT</pubDate></item></channel></rss>