<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>pc-ble-driver-py: what is sys.argv and how to define it?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62565/pc-ble-driver-py-what-is-sys-argv-and-how-to-define-it</link><description>I have a custom nRF52840 board that transmits sensor data (using UART) to a PC with an embedded Bluetooth adapter. I have a code on Matlab that works just fine (using blelist command). 
 What it does: setup default adapter, discover the devices, connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Jun 2020 11:29:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62565/pc-ble-driver-py-what-is-sys-argv-and-how-to-define-it" /><item><title>RE: pc-ble-driver-py: what is sys.argv and how to define it?</title><link>https://devzone.nordicsemi.com/thread/255500?ContentTypeID=1</link><pubDate>Wed, 17 Jun 2020 11:29:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcdf7f47-4e8c-4196-b2fb-468370f3278d</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;sys.argv is, simply put, the list of command line arguments that was provided when running the python script from the command line.&lt;/p&gt;
&lt;p&gt;So what it means is that if you run it with e.g. &amp;quot;python heart_rate_collector.py&amp;quot; from the command line, then you need to change that to &amp;quot;python heart_rate_collector.py NRF52&amp;quot;, where NRF52 is then command line argument 1 to the script. (Argument 0 is the name of the script itself.) You can also, optionally, provide the serial port (for the connectivity device) as command line argument 2.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>