Reading from Raspberry Pi port - Raspberry Pi Forums
the raspberry pi hooked rf69 board through gpio. using oem (the hardware bought) software, able current reading. however, not want use oem software in database. hoping read , insert reading own database.
have written python script data getting weird symbols instead. have posted script below
#!/usr/bin/env python
import time
import serial
ser = serial.serial(
port = '/dev/ttyama0',
baudrate = 9600,
parity=serial.parity_none,
stopbits=serial.stopbits_one,
bytesize=serial.eightbits,
timeout=3,
)
ser.open()
response = ser.readlines()
ser.close()
print response
of data received
['!!!!!\x86\84a\x04\xff']
['!!!!!\x84\84a\x04\xff']
['!!!\xa1!!%!5\xd5']
note: not @ python, picked 2 weeks ago.
have written python script data getting weird symbols instead. have posted script below
#!/usr/bin/env python
import time
import serial
ser = serial.serial(
port = '/dev/ttyama0',
baudrate = 9600,
parity=serial.parity_none,
stopbits=serial.stopbits_one,
bytesize=serial.eightbits,
timeout=3,
)
ser.open()
response = ser.readlines()
ser.close()
print response
of data received
['!!!!!\x86\84a\x04\xff']
['!!!!!\x84\84a\x04\xff']
['!!!\xa1!!%!5\xd5']
note: not @ python, picked 2 weeks ago.
assuming talking http://www.orcam.eu/res/datablad/rf69v12.pdf
looks has specific serial communication protocol results seem expected - output not meant human readable - need find way read , interpret various parts of message.
thing seems have spi interface might easier raw serial - other projects (f.eg. https://github.com/jcw/jeelib/blob/master/rf69.cpp) appear use this.
looks has specific serial communication protocol results seem expected - output not meant human readable - need find way read , interpret various parts of message.
thing seems have spi interface might easier raw serial - other projects (f.eg. https://github.com/jcw/jeelib/blob/master/rf69.cpp) appear use this.
raspberrypi
Comments
Post a Comment