Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Connecting camera via serial interface to a Raspberry PI3

0 votes

A friend is on the standby list for PI Wars and i have suggested that we use my jevois camera for the autonomous challenges, i.e. detect coloured shapes and move towards them. That way we can use his PI 0 for the actual robot and offload the image processing.

So, I have followed the script to control a pan/tilt connected to an arduino, this works so I know I am entering commands correctly, e.g serout T2 10000 10000

I have connected the yellow lead to the PI Tx input on GPIO14, physical 8, ground and power to 3.3V

followed instructions to disable console login, enable serial interface etc.

tried this code

import serial

import time

serdev = '/dev/serial0' # serial device of PI

    with serial.Serial(serdev, 115200, timeout=1) as ser: 

    while 1:

        # Read a whole line and strip any trailing line ending character:

        line = ser.readline().rstrip()

        print "received: {}".format(line)

I have tried other examples from the web, with and without sudo.

Nothing is being output.

Currently very confused, so my question is has anyone connected the jevois to a Raspberry PI using the serial interface, and if so, how.

thanks

Steve gale

asked Nov 14, 2018 in User questions by windy54 (230 points)

1 Answer

0 votes
Did you also connect the white wire to RX on your PI? TX on the PI is an output (to send from the PI to JeVois), and RX is the one you would need to receive on your PI from JeVois.

Other than that your code looks good!
answered Nov 16, 2018 by JeVois (46,580 points)
Thanks for the reply.
I have sorted it, because I was having problems I set the baud rate to 9600, but then when I ran the screen command in my MAC I left the 11520@ on the end which I guess was resetting the baud rate.
Now got it running at 115200 decoding the terse message from the object tracker. I will post a link t the code when I have finished it
For something completely different, I've written some python code to control jevois from a PI. If you're interested check it out here: https://github.com/PeterQuinn925/Squirrel/blob/master/jevois_capture.py
...