Hi man,
I appreciate the help up until now. Finally I have assembled Nybble completely and also gotten around to set up the FTDI connector via raspberry's wifi. I can log in via ssh completely without problems.
However, I don't know how to proceed from there. I have chmod +x 'd ardSerial.py but trying to send ./ardSerial.py kcr as you explained in your howto just throws me the following error:
pi@nybble:~/Petoi/OpenCat/SerialMasterPython $ ./ardSerial.py kcr
Traceback (most recent call last):
File "./ardSerial.py", line 14, in <module>
timeout=1
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 240, in __init__
self.open()
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 272, in open
self._reconfigure_port(force_update=True)
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 326, in _reconfigure_port
raise SerialException("Could not configure port: {}".format(msg))
serial.serialutil.SerialException: Could not configure port: (5, 'Input/output error')
so probably what that means is that the port is not correctly set. How do I do that? Since it is not really documented I would love to have an explanation up until the point where I can sent complete sketches to Nybble. I am willing to help with cleaning it up afterwards so it is worth adding it to the official guide. Thanks for your help.
I tried to only connect the GPIO connector after the prompt as you clarified. Still the same empty list as output []
@Rongzhong Li Hi!
I fixed the error by including the first two lines in the script
#!/usr/local/bin/python # coding: latin-1
also if someone else wants to try this: You need to change on (now) line 48
choice = input("Wait for 3 seconds. Ready? (Y/n): ") to choice = raw_input("Wait for 3 seconds. Ready? (Y/n): ")
and on line (now) 50 the same.
However @Rongzhong Li, unfortunately the ouput list is empty []. Any ideas? I am thinking that the harware is not correctly wired, but that should really not be the case
I have tried running your code and get the following error message:
pi@nybble:~/Downloads $ sudo chmod +x serialSetup.py pi@nybble:~/Downloads $ python ./serialSetup.py File "./serialSetup.py", line 45 SyntaxError: Non-ASCII character '\xef' in file ./serialSetup.py on line 45, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
Try the attached code to detect your serial port. Then you may need to change the port on line:
port='/dev/ttyS0'
@Rongzhong Li Yes. I have done all of the steps successfully. I installed all packages and can also successfully connect to the Raspi via ssh. Just the next step after finishing the instructions is not clear to me. Somewhere from I need to get the command console to send commands?
when I try to just start ./arduino, then I get an error message regarding java splash screen.
have you read this post? https://www.petoi.com/forum/hardware/how-to-setup-raspberry-pi-for-programming-nybble-without-ftdi-module
How do I do this? From the shell of the Raspberry or from my normal laptop who is also in the network. Not sure what commands to use. can you please elaborate further?
Maybe you need to list the serial ports in the terminal and open the proper one in Python code?