Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing out TFLuna and Pi4 #3

Open
resistorsoftware opened this issue Aug 19, 2021 · 0 comments
Open

testing out TFLuna and Pi4 #3

resistorsoftware opened this issue Aug 19, 2021 · 0 comments

Comments

@resistorsoftware
Copy link

resistorsoftware commented Aug 19, 2021

Hi,

just checking but the GPIO UART setting on my Raspberry Pi helper diagram has TX on pin 8 and RX on Pin 10, yet the TFLuna shows pin 2 as RX and 3 as TX. So in the hookup diagram I am seeing Tuna pin 2 (RX) going to GPIO pin 8 (TX). Is that correct? TX Tuna to RX GPIO and correspondingly RX Tuna to TX GPIO?

I copied the config Python in Thonny, and tried the config file out and it fails. I am not sure why. New to Pi and Tuna.

Traceback (most recent call last):
File "/home/pi/Documents/config.py", line 115, in
set_samp_rate(100) # set sample rate 1-250
File "/home/pi/Documents/config.py", line 36, in set_samp_rate
ser.write(samp_rate_packet) # send sample rate instruction
AttributeError: 'NoneType' object has no attribute 'write'

So I am attemptiung to take measurements with Lidar and this is my first messages... any clue as to what that means?

I checked for the UART and ls -l shows dev/serial0 but initially when I tried out the code I got:

Traceback (most recent call last):
File "/home/pi/Documents/config.py", line 110, in
prev_ser = serial.Serial("/dev/serial0", baudrates[prev_indx],timeout=0) # mini UART serial device
File "/usr/local/lib/python3.7/dist-packages/serial/serialutil.py", line 244, in init
self.open()
File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 325, in open
raise SerialException(msg.errno, "could not open port {}: {}".format(self._port, msg))
serial.serialutil.SerialException: [Errno 13] could not open port /dev/serial0: [Errno 13] Permission denied: '/dev/serial0'

So I am not sure why a device would not have permission, but a sudo chmod 777 naively seemed to make that go away. What am I doing wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant