<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									Reading Serial Data from custom arduino - Simhub General				            </title>
            <link>https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/</link>
            <description>All about SimHub!</description>
            <language>en-US</language>
            <lastBuildDate>Mon, 07 Sep 2026 23:57:42 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>RE: Reading Serial Data from custom arduino</title>
                        <link>https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6891</link>
                        <pubDate>Wed, 12 Apr 2023 09:35:51 +0000</pubDate>
                        <description><![CDATA[Yes and no,
I essentially wrote my own USB Poll/Listener and forbid the Arduino Settings Page to poll the COM Port of the device.]]></description>
                        <content:encoded><![CDATA[<p>Yes and no,</p>
<p>I essentially wrote my own USB Poll/Listener and forbid the Arduino Settings Page to poll the COM Port of the device. </p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub-support/">Simhub General</category>                        <dc:creator>judgie</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6891</guid>
                    </item>
				                    <item>
                        <title>RE: Reading Serial Data from custom arduino</title>
                        <link>https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6832</link>
                        <pubDate>Mon, 03 Apr 2023 15:49:11 +0000</pubDate>
                        <description><![CDATA[Did you find it out? I am more less trying the same at the moment.]]></description>
                        <content:encoded><![CDATA[<p>Did you find it out? I am more less trying the same at the moment.</p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub-support/">Simhub General</category>                        <dc:creator>Donutz</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6832</guid>
                    </item>
				                    <item>
                        <title>Reading Serial Data from custom arduino</title>
                        <link>https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6418</link>
                        <pubDate>Tue, 10 Jan 2023 12:41:20 +0000</pubDate>
                        <description><![CDATA[Hi, I am currently working on a plugin using a custom serial device (arduino).
I am trying to use a switch as a button to simulate a ignition switch. I got it working using SHCustomProtocol...]]></description>
                        <content:encoded><![CDATA[<p>Hi, I am currently working on a plugin using a custom serial device (arduino).</p>
<p>I am trying to use a switch as a button to simulate a ignition switch. I got it working using SHCustomProtocol.h as well as using my own arduino code.</p>
<p>Now I would like to write C# Plugin for SimHub to store some settings as well as trying to synchronise the state of the ignition coming from the game with the state of the ignition switch, sth. like:</p>
<p>If switch is off and ignitionStateFromGame is On -&gt; trigger button</p>
<p>If switch is on and ignitionStateFromGame is Off -&gt; trigger button</p>
<p>I understand how to write serial data to the arduino via the custom serial device protocol. What I am currently missing, is how to read data from the arduino via the serial port.</p>
<p>My idea was to reference the Custom Serial Plugin and loop through the registered devices like this in my init function and then listen to incoming serial communication.<br /><br /></p>
<pre contenteditable="false">var cSerial = this.PluginManager.GetPlugin&lt;CustomSerialPlugin&gt;();
            if (cSerial.Settings != null &amp;&amp; cSerial.Settings.Devices != null)
            {
                foreach (var device in cSerial.Settings.Devices)
                {
                    if (device.IsEnabled)
                    {
                        if (device.Name.StartsWith("JDG_IGN"))
                        {
                            this.Settings.Device = device;
                        }
                    }
                }
            }</pre>
<p>But Settings is always null, so my question would be:<br />Is this the right approach to read from a registered custom serial device? And if yes, what would be the best way to communicate to the device?</p>]]></content:encoded>
						                            <category domain="https://www.simhubdash.com/community-2/simhub-support/">Simhub General</category>                        <dc:creator>judgie</dc:creator>
                        <guid isPermaLink="true">https://www.simhubdash.com/community-2/simhub-support/reading-serial-data-from-custom-arduino/#post-6418</guid>
                    </item>
							        </channel>
        </rss>
		