Good afternoon!!!
Hi currently iam working on beagleboneblack. Our problem is not communication happen using serial port. That one is a RS232 that one is connected to our system.
here whatever message sending from beaglebone that will be received on my system here iam using (Docklight or Hercules). But i did not get any results.
Program :// on beaglebone side
import time
import Adafruit_BBIO.UART as UART
import serial
UART.setup(“UART2”)
print "Starting program"
ser = serial.Serial(’/dev/ttyO2’, baudrate=9600,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS
)
time.sleep(1)
try:
ser.write(‘Hello World’)
ser.write(‘Serial Communication’)
ser.write(‘By: Embedded Laboratoryn’)
print 'Data Echo Mode Enabled’
while True:
if ser.inWaiting() > 0.50:
data = ser.read()
print data
print(‘hello’)
print(‘good morning’)
except KeyboardInterrupt:
print "Exiting Program"
except:
print "Error Occurs, Exiting Program"
finally:
ser.close()
pass
Here iam not getting any results can you please solve my problem.