2

Model: Raspberry Pi 3 Model B Vi.2

HAT: RaspberryPi-B1 v1.3

I just bought RaspberryPi Hat RFID/NFC board (RaspberryPi-B1 from ib technology). I've spent all day trying to get a response from it, but still no luck.

If I shortwire my UART rx and tx pins, I can clearly see that my UART is working quite fine, yet, if I mount this HAT, I will receive nothing. No errors, no ACK's - nothing.

In the User Manual in section 1.2, it shows that the UART tx is on pin9 and UART rx is on pin10. If you look at the pin-map on a Raspberry, the UART rx is on pin10 and the UART tx is on pin8.

Correct me if I'm wrong, but shouldn't the HAT have matched the Raspberry design, and then reversed them? So it should have had UART tx on pin10 and UART rx on pin8?

So the big question: Is this an error in their design, or am I doing something completely wrong?

Ps. This is my first post in here, so please let me know if I am breaking any rules.

My code for working test:

serial_read.py

#!/usr/bin/env python

import time
import serial


ser = serial.Serial(
        port='/dev/ttyS0',
        baudrate=9600,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        bytesize=serial.EIGHTBITS,
        timeout=1
)


while 1:
        x=ser.read(1)
        print x

serial_write.py

#!/usr/bin/evn python

import time
import serial



ser = serial.Serial(

        port='/dev/ttyS0',
        baudrate=9600,
        parity=serial.PARITY_NONE,
        stopbits=serial.STOPBITS_ONE,
        bytesize=serial.EIGHTBITS,
        timeout=1
)

while 1:
        ser.write(hex(0))
        time.sleep(1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.