Git Product home page Git Product logo

pelco_and_arduino's Introduction

Pelco and arduino

Photography has nothing to do with cameras.

A Pelco Camera

Overview

Hello, this is an Arduino library designed to control Pelco Cameras!

For now it can support PELCO-D protocol but I havn't got tested everything yet.

This library was made for the project: Controlling a cctv camera on Arduino on hacakday.io

Before you go on, this is a school, project, I'm still in school and learnings things so be kind if the libray is ugly. I would like to thanks my school and teachers for allowing me to work on this project.

The main goal of the project is to do a control table (It'll be on arduino.)

Anyway, here the table of contents:

Table of Contents

Requirements

This is a bit obvious but you'll need a Pelco camera, the one I use the ES4036.

The important thing is to set the camera is RS485 biderectional and with the baud of your choosing. For now, the lib only support Pelco-D protocol.

About the modules for RS485, I'm working with a standart MAX485 chip but I'll test a more advanced module on the future (a seed-groove max485 module).

Tested on Arduino UNO and ESP32

Exemple

go to the examples folder

pelco_and_arduino's People

Contributors

pixelbo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pelco_and_arduino's Issues

Undefined "baud"

Arduino compiler complains about possibly undefined value for "baud"; I think it depends on lack of "default" branch in switch/case above: after adding "default: baud = 2400;" the warning disappeared.

(*SerialCamBus).begin(baud);

Missing return statement

My Arduino compiler complains about a missing return statement at the end of the function:

e:\documenti\Arduino\libraries\Pelco_And_Arduino\src\PelcoBus.cpp: In member function 'bool PelcoBus::command(uint8_t, bool, uint8_t, uint16_t, uint8_t)':
e:\documenti\Arduino\libraries\Pelco_And_Arduino\src\PelcoBus.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type]
  264 | }
      | ^
cc1plus.exe: some warnings being treated as errors

It's the closing bracket of "if (!disableACK) {"

possible mixup on Pelco-D commands

Noticed your Pelco-D command jpeg had call preset as "0x05" and clear preset as "0x07" but everywhere else I've seen the command list, 0x05 is clear preset and 0x07 is call preset.

Bug in PelcoBus::send_raw

bool PelcoBus::command(uint8_t address, bool disableACK, uint8_t command, uint16_t data1, uint8_t data2) {

messFromCamera shold be instead raw_command; indeed, the command is properly sent, but wrong string is displayed in serial monitor:

Cam 1: Wrong checksum, updating to right checksum
Cam 1: sending message 00 00 00 00 00 00 00 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.