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

Using RS485 port on OpenCR to communicate with camera #308

Open
cmtchow opened this issue May 10, 2022 · 4 comments
Open

Using RS485 port on OpenCR to communicate with camera #308

cmtchow opened this issue May 10, 2022 · 4 comments

Comments

@cmtchow
Copy link

cmtchow commented May 10, 2022

I'm new to this field and just started to learn about OpenCR board.

I'm trying to use one of the RS485 ports on OpenCR to send and receive data from a camera that uses RS485 communication.
My question is, if it possible to use the RS485 port on OpenCR other than motors? If so, how can I begin communication and which pin am I supposed to use in pinMode as output and input?

Thank you.

@shiba-8ro
Copy link

@cmtchow
OpenCR RS485 port only supports Dynamixel motors.
To be precise, the communication circuit complies with RS485 standard, but we do not provide library for communicating with other devices than Dynamixel motors. So if you connect RS485 Camera to OpenCR, you need to DIY the driver.
By the way, which model of RS485 Camera do you use?

@cmtchow
Copy link
Author

cmtchow commented May 12, 2022

Thank you for your reply.

Sorry to ask some novice questions. If I have to DIY the driver, where and how can I DIY it?

For the camera I'm using, I'm using Pepperl+FUCHS's PGV100-F200A-R4-V19 as a camera for camera-based track guidance.
https://www.pepperl-fuchs.com/global/en/classid_3334.htm?view=productdetails&prodid=60355

Thank you.

@shiba-8ro
Copy link

The camera does not appear to be intended for use on Emmbeded boards.
You should try it from PC first, using the USB-RS485 (M12 connector) interface recommended by the camera manufacturer.
And, in order to DIY the Arduino driver, you need literacy to parse the Arduino library.
Dynamixel2Arduino
Arduino Library : How to Create Your Own Arduino Library

@ROBOTIS-Will
Copy link
Contributor

Hi @cmtchow

The current OpenCR library use the RS485 port only for DYNAMIXEL with DYNAMIXEL SDK library.
https://github.com/ROBOTIS-GIT/OpenCR/tree/master/arduino/opencr_arduino/opencr/libraries/DynamixelSDK/include/dynamixel_sdk

Since there isn't any driver(or Arduino library for OpenCR) for the camera module, you'll need to write your own send and receive/parsing data function.
However, this will be quite difficult if you don't have decent understanding about both camera and OpenCR.

As @shiba-8ro mentioned in the reply above, I'd recommend trying the camera on the PC first to understand how it works.

Thanks.

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

3 participants