<?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[Basic question about input from Arduino to M5Stick C]]></title><description><![CDATA[<p dir="auto">.<br />
Sorry for a very basic question. I have almost no knowledge of how to use the M5Stick C. I use the stick to bluetooth trigger my Blackmagic Design cinema camera ( I am a wildlife film maker). This fires the shutter very well via the inbuilt button.<br />
I also have built an Arduino based pir and a breakbeam system that fires another camera via an analogue input. What I would like to do do is use the Arduino based trigger devices to trigger my bluetooth controlled camera as it has no analogue input. The trigger uses an simple relay to close the circuit on the other camera, but as the camera I want to control only uses bluetooth I would like the M5Stick C to trigger the camera from the PIR / Breakbeam system.</p>
<p dir="auto">Is that even possible? Any help with connection and coding would be very gratefully received.</p>
]]></description><link>https://community.m5stack.com/topic/1813/basic-question-about-input-from-arduino-to-m5stick-c</link><generator>RSS for Node</generator><lastBuildDate>Thu, 07 May 2026 17:00:24 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1813.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Apr 2020 05:05:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Basic question about input from Arduino to M5Stick C on Sun, 05 Apr 2020 06:40:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi again ajb2k3,<br />
I am not sure why but it does not seem to work with my set up.</p>
<p dir="auto">Here is the code I am using for the stickC to trigger camera. Where would I put the code you suggested? Thanks in advance!<br />
#include &lt;M5StickC.h&gt;<br />
#include &lt;BlueMagic32.h&gt;</p>
<p dir="auto">#define LED_PIN 10<br />
#define TRIGGER G0</p>
<p dir="auto">void setup()<br />
{</p>
<p dir="auto">M5.begin();<br />
Serial.begin(115200);</p>
<p dir="auto">pinMode(LED_PIN, OUTPUT);<br />
digitalWrite(LED_PIN, HIGH);</p>
<p dir="auto">BMDConnection.begin("BlueMagic32");<br />
BMDControl = BMDConnection.connect();</p>
<p dir="auto">M5.Lcd.setTextColor(TFT_WHITE);<br />
M5.Lcd.setTextSize(2);<br />
M5.Lcd.setRotation(3);<br />
M5.Lcd.fillScreen(TFT_BLUE);<br />
}</p>
<p dir="auto">void loop()<br />
{<br />
// read data<br />
int value = digitalRead(36);// read the pin(0: not detectd 1: detected)<br />
M5.update();</p>
<p dir="auto">if (M5.BtnB.wasPressed())<br />
{<br />
ESP.restart();<br />
}</p>
<p dir="auto">if (BMDConnection.available())<br />
{</p>
<pre><code>M5.Lcd.drawCentreString(BMDControl-&gt;timecode(), 80, 34, 2);

if (M5.BtnA.wasPressed())
{
  BMDControl-&gt;toggleRecording();
}

if (BMDControl-&gt;isRecording())
{
  M5.Lcd.setTextColor(WHITE);
  digitalWrite(LED_PIN, LOW);
}
else
{
  M5.Lcd.setTextColor(TFT_GREEN);
  digitalWrite(LED_PIN, HIGH);
  
}

M5.Lcd.fillScreen(TFT_BLACK);
</code></pre>
<p dir="auto">}<br />
if (M5.BtnA.wasPressed())<br />
{<br />
BMDControl-&gt;toggleRecording();<br />
}</p>
<pre><code>if (BMDControl-&gt;isRecording())
{
  M5.Lcd.setTextColor(RED);
  digitalWrite(LED_PIN, LOW);
}
</code></pre>
<p dir="auto">}</p>
]]></description><link>https://community.m5stack.com/post/8018</link><guid isPermaLink="true">https://community.m5stack.com/post/8018</guid><dc:creator><![CDATA[GeoffS]]></dc:creator><pubDate>Sun, 05 Apr 2020 06:40:15 GMT</pubDate></item><item><title><![CDATA[Reply to Basic question about input from Arduino to M5Stick C on Sat, 04 Apr 2020 07:34:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> said in <a href="/post/7999">Basic question about input from Arduino to M5Stick C</a>:</p>
<blockquote>
<p dir="auto">pinMode(36, INPUT);// set pir sensor pin as input</p>
<p dir="auto">// read data<br />
int value = digitalRead(36);// read the pin(0: not detectd 1: detected)</p>
</blockquote>
<p dir="auto">Thank you ajb2k3<br />
I will give it a go.</p>
]]></description><link>https://community.m5stack.com/post/8012</link><guid isPermaLink="true">https://community.m5stack.com/post/8012</guid><dc:creator><![CDATA[GeoffS]]></dc:creator><pubDate>Sat, 04 Apr 2020 07:34:34 GMT</pubDate></item><item><title><![CDATA[Reply to Basic question about input from Arduino to M5Stick C on Fri, 03 Apr 2020 06:16:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/geoffs" aria-label="Profile: geoffs">@<bdi>geoffs</bdi></a> It sounds like you already have done the hard work of getting the stickC to communicate with the BMD camera.<br />
There are PIR hats and units available for the stickC<br />
<a href="https://m5stack.com/collections/m5-unit/products/pir-module?ref=pfpqkvphmgr" target="_blank" rel="noopener noreferrer nofollow ugc">https://m5stack.com/collections/m5-unit/products/pir-module?ref=pfpqkvphmgr</a><br />
<a href="https://m5stack.com/collections/m5-hat/products/m5stickccompatible-hat-pir-sensor?ref=pfpqkvphmgr" target="_blank" rel="noopener noreferrer nofollow ugc">https://m5stack.com/collections/m5-hat/products/m5stickccompatible-hat-pir-sensor?ref=pfpqkvphmgr</a></p>
<p dir="auto">The following code is for the PIR unit</p>
<pre><code class="language-#include">
// initialization
M5.begin();
pinMode(36, INPUT);// set pir sensor pin as input

// read data
int value = digitalRead(36);// read the pin(0: not detectd 1: detected)
M5.update();</code></pre>
]]></description><link>https://community.m5stack.com/post/7999</link><guid isPermaLink="true">https://community.m5stack.com/post/7999</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 03 Apr 2020 06:16:15 GMT</pubDate></item></channel></rss>