I'm trying to send a signal from a programable IC to my Pi Zero W but all I get is b' '
My IC is setup to send an alternating value between AA and 55. The data is sent on the UART line every .35 seconds. I tested the IC with another IC and it was working so I know my IC is correct.
part of the config.txt
# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
start_x=1
gpu_mem=128
enable_uart=1
core_freq=250
#dtoverlay=pi3-miniuart-bt
init_uart_clock=3000000
Available ports
pi@raspberrypi:~ $ python -m serial.tools.list_ports
/dev/ttyAMA0
1 ports found
My code
from gpiozero import LED, Button
from tkinter import messagebox
import spidev
import pip
import time
import serial
ser = serial.Serial(
port='/dev/ttyAMA0', #Replace ttyS0 with ttyAM0 for Pi1,Pi2,Pi0
#port='/dev/ttyS0',
baudrate = 3000, #9600 ,#115200, 10417 on PIC
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS,
startbits=serial.STARTBITS_ONE,
timeout=1
)
print(ser.name)
Test1 = 0
while 1 == 1:
#Test1 = ser.read(1)
print(ser.is_open)
Test1 = ser.readline()
print(Test1)
for n in Test1:
print(n)
print("n")
/dev/ttyAMA0
is connected to Bluetooth. NOOBS seems to have generated some unusual and unnecessary settings See How do I make serial work on the Raspberry Pi3 or later – Milliways May 17 '20 at 00:28