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.

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.


raspberrypi



Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support