Page 1
ED-AIC2000 Series Industrial Smart Camera Based on Raspberry Pi CM4 SDK Development Guide EDA Technology Co., LTD December 2023...
Page 2
IOT, industrial control, automation, green energy and artificial intelligence based on Raspberry Pi technology platform. You can contact us in the following ways: EDA Technology Co.,LTD Address:Room 301, Building 24, No.1661 Jialuo Road, Jiading District, Shanghai Mail: sales@edatec.cn...
Page 3
Copyright Statement ED-AIC2000 series and its related intellectual property rights are owned by EDA Technology Co.,LTD. EDA Technology Co.,LTD owns the copyright of this document and reserves all rights. Without the written permission of EDA Technology Co.,LTD, no part of this document may be modified, distributed or copied in any way or form.
Page 4
EDA Technology Co.,LTD, the liability claim for EDA Technology Co.,LTD can be exempted.
Foreword Reader Scope This manual is applicable to the following readers: Software Engineer System Engineer Related Agreement Terminology Convention Terminology Meaning Raspberry Pi Compute Module 4 Symbolic Convention Symbolic Instruction Prompt symbols, indicating important features or operations. Notice symbols, which may cause personal injury, system damage, or signal interruption/loss. May cause great harm to people.
Safety Instructions This product should be used in an environment that meets the requirements of design specifications, otherwise it may cause failure, and functional abnormality or component damage caused by non-compliance with relevant regulations are not within the product quality assurance scope.
1 SDK Overview 1 SDK Overview This chapter introduces the definition and composition of SDK to help users understand the SDK better. SDK Introduction SDK Composition ED-AIC2000 Series SDK Development Guide...
1 SDK Overview 1.1 SDK Introduction The SDK of the ED-AIC2000 series Camera is a set of software development kit, which provides users with the interfaces required for upper-layer applications to facilitate secondary development of the camera. The SDK functions of the ED-AIC2000 series Camera include registering Trigger/Tune button, DI...
Head File /usr/include/eda/ Camera Sensor Control camera_0234.h camera_2311.h Library libeda_camera.so /usr/lib/ During the development process, users can complete the development of upper-layer applications based on actual needs and refer to the corresponding function description below. ED-AIC2000 Series SDK Development Guide...
2 Function Description 2 Function Description This chapter introduces how to write the code corresponding to each function to help users write the code required for upper-layer applications. IO Control Sensor Control ED-AIC2000 Series SDK Development Guide...
Getting an IO instance. eda::EdaIo *em = eda::EdaIo::getInstance(); Initializing the instance. em->setup(); 2.1.3 Event Callback Function IO control supports registering callback functions for events, including registering Input, registering Trigger button, and registering Tune button. DI1 trigger event ED-AIC2000 Series SDK Development Guide...
Using IO to control the on/off of the laser, the on/off of the status indicator, the on/off of the alarm indicator and the enable/disable of the 2 outputs. Preparation Initialization of the instance has been completed. Operating Instructions Laser On/Off em->openLaser(); em->closeLaser(); ED-AIC2000 Series SDK Development Guide...
1: Setting the color to Red 2: Setting the color to Green 3: Setting the color to Blue RGB color of side light void setRgbLight_rgb(uint8_t r, uint8_t g, uint8_t b); Area lights ED-AIC2000 Series SDK Development Guide...
(*IoTrigger)(int level); class EdaIo{ public: static EdaIo* getInstance(); static void close_io(); ~EdaIo(); * @brief Laser On void openLaser(); * @brief Laser Off void closeLaser(); * @brief set status indicator * @param good void setScanStat(bool good); ED-AIC2000 Series SDK Development Guide...
Page 16
* @brief set output1 to [high/low] * @param high void setDo1High(bool high); * @brief set output2 to [high/low] * @param high void setDo2High(bool high); // void setAimerColor(RGBColor color); * @brief register input trigger callback function * @param callback ED-AIC2000 Series SDK Development Guide...
Page 17
* @brief Set the RGB Light * @param r red * @param g green * @param b blue void setRgbLight_rgb(uint8_t r, uint8_t g, uint8_t b); * @brief initializing IO settings void setup(); ED-AIC2000 Series SDK Development Guide...
Page 18
# Laser On # eda.closeLaser(); # Laser Off eda.setScanStat(True); # Set status indicator eda.openAlarm(); # Alarm indicator on # eda.closeAlarm(); # Alarm indicator off eda.setDo1High(True); # Set output1 eda.setDo2High(False); # Set output2 eda.setRgbLight(1); # Set side light,0: Off; 1: Red; 2: Green; 3: Blue...
OV2311 is the 2-megapixel camera. Open the camera and set working mode, camera area width and camera area height. t_camera->open(mod, width, height); mod is the working mode, the value includes 0, 1 and 5. ED-AIC2000 Series SDK Development Guide...
Page 20
AR0234:The value range of exposure is 1~1500, which unit of 6.8 times the value is microsecond. Obtaining camera data through callback. t_camera->callback_image_ready(image_callback); In the callback function, it is recommended to only obtain data and not process logic. Close camera eda::EdaIo::close_io(); ED-AIC2000 Series SDK Development Guide 2-10...
* @return int int close() = 0; * @brief set exposure time * @param exp_value * @return int int set_exposure(int exp_value) = 0; * @brief obtain exposure time * @param exp_value * @return int ED-AIC2000 Series SDK Development Guide 2-11...
Page 22
* @brief obtain gain * @param gain_value * @return int int get_gain(int *gain_value) = 0; * @brief register callback function, obtain image data * @param callback * @return int int callback_image_ready(img_Callback callback)=0; CameraName name() = 0; ED-AIC2000 Series SDK Development Guide 2-12...
Page 23
2 Function Description Getting AR0234 instance #include "CameraManger.h" #include "camera_0234.h" void test() eda::Camera *t_camera = eda::create_ar0234(); if(t_camera){ eda::Camera_0234 *t_camera_1 = static_cast<eda::Camera_0234*>(t_camera); ED-AIC2000 Series SDK Development Guide 2-13...
3 Example 3 Example This chapter introduces detailed code examples, including writing code, compiling code, and running code. Writing Code Compiling and Running Code ED-AIC2000 Series SDK Development Guide...
*argv[]){ eda::EdaIo *em = eda::EdaIo::getInstance(); em->setup(); //open Laser em->openLaser(); sleep(2); // close Laser em->closeLaser(); eda::EdaIo::close_io(); return 0; After writing is completed, save it as test123.cpp file. Tip: The file name can be customized. ED-AIC2000 Series SDK Development Guide...
“test-io” means the file name generated after compilation, the file name can be customized. Execute the following command to view the new file generated after compilation, as shown below “test-io”. Execute the following command to run the compiled code. sudo ./test-io ED-AIC2000 Series SDK Development Guide...
Page 27
3 Example “test-io” means the file name generated after compilation. Tip: After successful operation, you can see that the laser lights up and goes out after waiting for 2 seconds. ED-AIC2000 Series SDK Development Guide...
Need help?
Do you have a question about the ED-AIC2000 Series and is the answer not in the manual?
Questions and answers