RS485 and Pelco P or D

Hi all,
i have a speed dome camera that can be ruled with her keyboard, using Pelco P or D. It works.
i would like to rule it with an arduino (send commands to the camera if something happens).
So i bought a RS485 TTL MAX485 (see it:
Convertitore RS485 TTL MAX485 )
and i know commands to send, that are explained here:
http://bruxy.regnet.cz/programming/rs485/pelco-p.pdf

so, where can i find some example sketch to send those commands? how to initialize the small module that i ve bought? i need a sketch to follow and read instructions for sending commands... thank you.

Example, i want to send this command to speed dome:
Byte1 = A0
Byte2 = 00
Data Byte 1= 00
Data Byte 2= 07
Data Byte 3= 00
Data Byte 4= 05
Byte3= AF
Byte4 = XOR..i will calculate

that is the magic phormula to "call" preset n. 5, as you can see at page2.
i know camera baudrate is 4800 , so i also need commands for my MAX485 module to him to send 4800 baud.
and library or other stuffs? i donw know from where to begin.
Any suggestion is well accepted ..thanks!

A quick search on this site yields this link that should get you going.

Riva:
A quick search on this site yields this link that should get you going.

i already have seen it, but looks different. it's SP485EE , mine it's a shield MAX485 (see it:
Convertitore RS485 TTL MAX485 )
so i don't know how to connect to Arduino Uno (witch PIN and so on).

any suggestion is well approved :slight_smile: thk
PS: i m not a proper beginner, i worked with SIM800L, some accelerometer, i2c.. but it's first time for me using it and i dont know from where to begin. sorry.

i already have seen it, but looks different. it's SP485EE , mine it's a shield MAX485

The SP485EE is (more or less) a clone of the MAX485, the pins have identical functionality.

The chips pin 1 is RO, 2 is RE, 3 is DE, 4 is DI. That should give you enough information to make the wiring. If you're unsure, make a picture of your setup before powering on and post it here for us to check.