<?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[[Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock]]></title><description><![CDATA[<p dir="auto">I'm struggling to understand the relationship and interconnections between the Arduino Dock 2 and my Onion 2. Take a simple example of a gas sensor connected to Analog 0. I can write a program in the Arduino IDE to read this via Serial.read(A0) but how would access the value of A0 from inside OnionOS to lets say, push a value somewhere via curl. I was hoping someone can provide a high-level explanation or URL to some documentation that explains how to really wrangle the Arduino dock with the Onion? Maybe I should just be working with the onion dock if I want to control everything from inside linux with my familiar programming languages (Python, Node, etc). Thanks.</p>
]]></description><link>http://community.onion.io/topic/3134/noob-understanding-accessing-pins-data-via-arduino-dock</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 03:27:35 GMT</lastBuildDate><atom:link href="http://community.onion.io/topic/3134.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 09 Sep 2018 00:34:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Sun, 09 Sep 2018 00:34:09 GMT]]></title><description><![CDATA[<p dir="auto">I'm struggling to understand the relationship and interconnections between the Arduino Dock 2 and my Onion 2. Take a simple example of a gas sensor connected to Analog 0. I can write a program in the Arduino IDE to read this via Serial.read(A0) but how would access the value of A0 from inside OnionOS to lets say, push a value somewhere via curl. I was hoping someone can provide a high-level explanation or URL to some documentation that explains how to really wrangle the Arduino dock with the Onion? Maybe I should just be working with the onion dock if I want to control everything from inside linux with my familiar programming languages (Python, Node, etc). Thanks.</p>
]]></description><link>http://community.onion.io/post/17632</link><guid isPermaLink="true">http://community.onion.io/post/17632</guid><dc:creator><![CDATA[David Black]]></dc:creator><pubDate>Sun, 09 Sep 2018 00:34:09 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Sun, 09 Sep 2018 08:33:52 GMT]]></title><description><![CDATA[<p dir="auto">The main source of documentation for the Arduino Dock 2 is at the usual Onion documentary pages at <a href="https://docs.onion.io/omega2-docs/arduino-dock-2.html" rel="nofollow">https://docs.onion.io/omega2-docs/arduino-dock-2.html</a>.</p>
<p dir="auto">The main important thing to understand is that the ATMega chip is hard-wired to the Omega's UART1, I2C and SPI peripherals, see the 'Omega to ATmega MCU Connections' section.</p>
<p dir="auto">Thus, an easy way to push measurement values from your Arduino to your Omega2 is to send them via one of these connections. The easiest one is UART. In your Arduino firmware, setup the normal serial interface, e.g. <code>Serial.begin(115200)</code>, then everything that is <code>Serial.println(..)</code> is received on the Omega's <code>/dev/ttyS1</code> interface (at that baudrate). See <a href="https://docs.onion.io/omega2-docs/uart1.html#uart1" rel="nofollow">https://docs.onion.io/omega2-docs/uart1.html#uart1</a>, section 'Using the screen Command'.</p>
]]></description><link>http://community.onion.io/post/17634</link><guid isPermaLink="true">http://community.onion.io/post/17634</guid><dc:creator><![CDATA[Maximilian Gerhardt]]></dc:creator><pubDate>Sun, 09 Sep 2018 08:33:52 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Mon, 10 Sep 2018 00:53:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4683">@Maximilian-Gerhardt</a> - Thanks! That explains it. Then I assume it's possible to push values / read from the Onion in the other direction?</p>
]]></description><link>http://community.onion.io/post/17635</link><guid isPermaLink="true">http://community.onion.io/post/17635</guid><dc:creator><![CDATA[David Black]]></dc:creator><pubDate>Mon, 10 Sep 2018 00:53:11 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Sun, 09 Sep 2018 18:39:31 GMT]]></title><description><![CDATA[<p dir="auto">Yes, since UART is bidrectional, writing to the UART1 aka <code>/dev/ttyS1</code> on the Omega2 willl send it to the Arduino, where you can read it with the normal <code>Serial.read()</code> and associated methods.</p>
]]></description><link>http://community.onion.io/post/17636</link><guid isPermaLink="true">http://community.onion.io/post/17636</guid><dc:creator><![CDATA[Maximilian Gerhardt]]></dc:creator><pubDate>Sun, 09 Sep 2018 18:39:31 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Sun, 09 Sep 2018 20:57:34 GMT]]></title><description><![CDATA[<p dir="auto">You might be interested to know that <strong>9600</strong> 8N1 is the default setting of UART1 (/dev/ttyS1) on Omega2(+).</p>
]]></description><link>http://community.onion.io/post/17637</link><guid isPermaLink="true">http://community.onion.io/post/17637</guid><dc:creator><![CDATA[György Farkas]]></dc:creator><pubDate>Sun, 09 Sep 2018 20:57:34 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Wed, 12 Sep 2018 18:11:03 GMT]]></title><description><![CDATA[<p dir="auto">Just wanted to thank everyone for helping me understand this. It's working great. I just need to get my head around the Linux side now. It works great with 'screen' - can send messages back and forth, but now I need the data from /dev/ttyS1 to get shoved into a curl POST as a line is captured. I'm thinking it'll look very similar to how I receive lines on the Arduino side (buffered char* terminated with \n\r etc). Anyone do this without pySerial?</p>
]]></description><link>http://community.onion.io/post/17658</link><guid isPermaLink="true">http://community.onion.io/post/17658</guid><dc:creator><![CDATA[David Black]]></dc:creator><pubDate>Wed, 12 Sep 2018 18:11:03 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Wed, 12 Sep 2018 18:27:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/5883">@David-Black</a> said in <a href="/post/17658">[Noob] Understanding &amp; Accessing Pins/Data via Arduino Dock</a>:</p>
<blockquote>
<p dir="auto">Anyone do this without pySerial?</p>
</blockquote>
<p dir="auto">Why do it without the library that is specifically designed for it? Would be the easiest way.</p>
<p dir="auto">You can also write a bash script which reads the data (using <code>stty</code> and <code>read</code>, refer <a href="https://wiki.openwrt.org/doc/recipes/serialbaudratespeed" rel="nofollow">here</a>, <a href="https://stackoverflow.com/questions/36586137/stop-on-newline-when-using-read" rel="nofollow">here</a> and <a href="https://stackoverflow.com/questions/28763863/shell-script-to-write-and-read-data-from-serial-communication" rel="nofollow">here</a>). Or a <a href="https://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c" rel="nofollow">C program</a>. I wrote a <a href="https://community.onion.io/topic/2495/programming-serial-uart-in-c-or-c/8" rel="nofollow">C program</a> specifically for the Omega in that thread, implementing <code>read()</code> until a newline should be fairly easy.</p>
]]></description><link>http://community.onion.io/post/17660</link><guid isPermaLink="true">http://community.onion.io/post/17660</guid><dc:creator><![CDATA[Maximilian Gerhardt]]></dc:creator><pubDate>Wed, 12 Sep 2018 18:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to [Noob] Understanding &amp; Accessing Pins&#x2F;Data via Arduino Dock on Wed, 12 Sep 2018 18:31:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="http://community.onion.io/uid/4683">@Maximilian-Gerhardt</a> - this is awesome!!! Thank you.</p>
]]></description><link>http://community.onion.io/post/17661</link><guid isPermaLink="true">http://community.onion.io/post/17661</guid><dc:creator><![CDATA[David Black]]></dc:creator><pubDate>Wed, 12 Sep 2018 18:31:30 GMT</pubDate></item></channel></rss>