Quantcast
Channel: Intel Communities: Message List
Viewing all articles
Browse latest Browse all 17928

Re: Galileo linux connecting to serial on /dev/ttyS0 questions

$
0
0

Hi,

 

Basically I followed those 2 pages I listed before - Trying to use PySerial to drive a serial lcd (parallax)? - this one provides the following python code that I used:

 

import serial

ser = serial.Serial(“/dev/ttyS0”, 57600)            

ser = serial.Serial(“/dev/ttyGS0”, 9600) 

for i in range(10):   #I added these 2 lines

     ser.read()

 

I just added a loop for it to listen to a certain number of requests.  I could send data from the serial monitor in the IDE and it would display in python.  So the /dev/ttyS0 port could be monitored in this way.  I am trying to write data from sensors to the /dev/ttyS0 UART from the sketch - and I tried serial.print(data); and serial1.print(data) and serial2.print(data) but I never receive any data from the ser.read() in pyserial. 

 

I hope that makes sense - thanks for the quick response.


Viewing all articles
Browse latest Browse all 17928

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>