top of page

Forum Comments

Flavien OpenCat code reviews
In Software
Improve gyro delay and implement ultrasonic sensor with Protothreading
In Software
D_C_E
Mar 09, 2021
@Gero Hello again! I'm able to run your test version of OpenCat. I included the protothreads library, and tweaked the code to reflect my NyBoard 0_2. Otherwise, I left it unchanged. When my Nybble starts, I see a blinking green LED, and notice your improved gaits when I use the remote. But certain positions (pu?) cause the cat to seize up, and the LED stops blinking for a moment. Checking the serial monitor reveals "0.00" repeating on each line – this makes me think the ultrasound isn't connected properly. When I attach my Raspberry Pi, I can send commands with ./ardSerial.py, but I see the same repeating lines of "0.00". Your original "random Nybble" python script works fine –until it lands on a position that makes it seize (I'll try to troubleshoot which ones). I tried to run your obstacle avoidance python script using the same serial port settings, but I receive this error when I do: pi@Nybble2:~ $ python nybble_run.py File "nybble_run.py", line 25 async def randomMovement(): ^ SyntaxError: invalid syntax When I run it as an executable, I receive this serial error pi@Nybble2:~ $ ./nybble_run.py ./nybble_run.py: line 1: import: command not found ./nybble_run.py: line 2: import: command not found ./nybble_run.py: line 3: import: command not found ./nybble_run.py: line 4: import: command not found from: can't read /var/mail/math ./nybble_run.py: line 9: syntax error near unexpected token `(' ./nybble_run.py: line 9: `ser = serial.Serial(' I've had trouble getting my serial ports straight, so I may be missing something quite simple. For now, I'll keep troubleshooting. Thanks for your help, and for sharing your work.
1
Nybble and Raspberry Pi?
In General Discussions

D_C_E

More actions
bottom of page