richard kappler gmail.com> writes:
>
>
> Now I'm completely lost. While opening the serial port outside the
function sounds like a good idea, I'm thinking that might not work unless I
am mistaken. The sensorRead function once it's called would then basically
own the serial port barring other tr
Would something like
if len(dict) = 8
return d
else
continue
work?
On Sun, Dec 1, 2013 at 8:54 PM, richard kappler wrote:
> Now I'm completely lost. While opening the serial port outside the
> function sounds like a good idea, I'm thinking that might not work unless I
> am mistaken. Th
Now I'm completely lost. While opening the serial port outside the function
sounds like a good idea, I'm thinking that might not work unless I am
mistaken. The sensorRead function once it's called would then basically own
the serial port barring other traffic, yes? That won't work as the same
seria
On 12/01/2013 08:28 PM, richard kappler wrote:
I have a script that reads sensor values gathered by an Arduino board from
serial as a dictionary, said values to later be used in the AI for Nav &
Control. Here's the script:
#!/usr/bin/python
def sensorRead():
import serial
from time im
"Wolfgang Maier" wrote in message
news:loom.20131201t230651-...@post.gmane.org...
> richard kappler gmail.com> writes:
>
>>
>> I have a script that reads sensor values gathered by an Arduino board
>> from
> serial as a dictionary, said values to later be used in the AI for Nav &
> Control. Here
Hi again,
think I spotted the problem now:
you’re setting up your connection everytime you enter the function (with the
serial.Serial call), but I guess you’re calling that function repeatedly to
retrieve lines. That’s wrong and means you could loose data that was sent
while you weren’t listening.
richard kappler gmail.com> writes:
>
> I have a script that reads sensor values gathered by an Arduino board from
serial as a dictionary, said values to later be used in the AI for Nav &
Control. Here's the script:
> #!/usr/bin/python
>
>
> def sensorRead():
> import serial
> from time
I have a script that reads sensor values gathered by an Arduino board from
serial as a dictionary, said values to later be used in the AI for Nav &
Control. Here's the script:
#!/usr/bin/python
def sensorRead():
import serial
from time import sleep
sensors = {}
sensors = dict.fro