<div dir="ltr"><div><div><div><div><div><div><div><div><div>You don&#39;t need a device to test it - Serial doesn&#39;t require a second device if all you&#39;re doing is sending bytes.<br><br></div>The issue I&#39;m having is when I try and open the port - that part is failing.<br><br></div>Tim, not sure if you have Scratch set up to access the underlying Squeak code, but if you do:<br><br></div><div>| serialPort |<br></div>serialPort := SerialPort new.<br></div>serialPort baudrate: 115200.<br></div>serialPort openPort: &#39;/dev/ttyAMA0&#39;.<br></div>serialPort inspect<br><br></div>the port instance variable in serialPort will be nil if it failed, and something else if it didn&#39;t fail.<br><br></div>Thanks,<br></div>Jon<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 17, 2016 at 6:38 PM, tim Rowledge <span dir="ltr">&lt;<a href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
&gt; On 14-01-2016, at 5:51 AM, Jon Hylands &lt;<a href="mailto:jon@huv.com">jon@huv.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Hi everyone,<br>
&gt;<br>
&gt; I&#39;m trying to use the SerialPort class on my Raspberry pi 2, to access the UART on the pi.<br>
&gt;<br>
&gt; I&#39;ve successfully accessed the port from python, using pyserial. On the pi, the port name is &#39;/dev/ttyAMA0’.<br>
<br>
</span>The only thing I can offer is that Scratch finds a serial port as /dev/ttyAMA0 as well, implying that on at least one Pi it finds the same port that python does. I don’t think I have any devices that I could even try to connect to. Any suggestions for things that might be around the office?<br>
<br>
I do faintly recall some discussions about Pi serial stuff and having to use the rasp-config utility but that was a long time ago and I don’t seem to have any emails referring to it.<br>
<br>
<br>
tim<br>
--<br>
tim Rowledge; <a href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a href="http://www.rowledge.org/tim" rel="noreferrer" target="_blank">http://www.rowledge.org/tim</a><br>
Strange OpCodes: EOS: Erase Operating System<br>
<br>
<br>
<br>
</blockquote></div><br></div>