<?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[UIFLOW, Core2, PIR-Sensor Blockly wrongfully assuems that the PIR-Sensor is connected to PORTB]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">there is kind of a bug in uiflow on core2. if you connect the pir sensor the  template code generated by blockly  does not work.</p>
<p dir="auto">the generated phython code looks like that:<br />
from m5stack import *<br />
from m5ui import *<br />
from uiflow import *<br />
import unit</p>
<p dir="auto">setScreenColor(0x000000)<br />
pir0 = unit.get(unit.PIR, unit.PORTB)</p>
<p dir="auto">BVlockly assumes that the sensor is connected to PORTB. However the Port of Core 2 is named PORTA. If you change the value to PORTA, the code works. However oyu cant switch beack to blockly because blockly wants to habve the value as PORTB. Can this be fixed in uiflow2?</p>
<p dir="auto">Best regards,<br />
Nestior</p>
]]></description><link>https://community.m5stack.com/topic/5547/uiflow-core2-pir-sensor-blockly-wrongfully-assuems-that-the-pir-sensor-is-connected-to-portb</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 20:09:40 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/5547.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Aug 2023 18:26:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UIFLOW, Core2, PIR-Sensor Blockly wrongfully assuems that the PIR-Sensor is connected to PORTB on Sat, 05 Aug 2023 12:02:57 GMT]]></title><description><![CDATA[<p dir="auto">That is because the PIR sensor is a port B device (black connection and by default is assigned to PortB, however, when you select the Unit In Uiflow2, you have the option to change the port.</p>
]]></description><link>https://community.m5stack.com/post/21797</link><guid isPermaLink="true">https://community.m5stack.com/post/21797</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 05 Aug 2023 12:02:57 GMT</pubDate></item></channel></rss>