This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] DLP2000: DLP® LightCrafter™ Display 2000 Structured Light Code

Part Number: DLP2000

Hello DLP® LightCrafter™ Display 2000 users!

 

We have recently pushed a new code update to the BeagleBone Black Debian distribution for this EVM. This update provides some reference code and a program to enable structured light applications. You can now display custom, full screen patterns on the LightCrafter 2000 for a desired amount of exposure time and loop through the patterns a desired number of times (limited only by the BeagleBone Black processing power). Additionally, this code enables the use of both an input trigger to tell the unit when to project the next pattern, and an output trigger to synchronize a camera to the given pattern. These triggers provide a basic implementation of what is found in our advanced, LightCrafter 4500 platform’s triggers.  

 

It is our hope that user’s will find this code useful for a variety of applications. To get started, first ensure you have your EVM working with the BeagleBone Black by following our user’s guide or E2E guide. You can then navigate to /opt/scripts and do a “git pull”. Within the /opt/scripts/device/bone/capes/DLPDLCR2000/structured_light directory you can view the code and run the make file (“make all”). Enter “./pattern_disp” to run the program and view its options. Running “./pattern_disp –t” will run a couple test patterns to confirm correct operation.

 

Feel free to use the program as is or edit any of the C files to fit the application to your needs. If you have any questions feel free to make a post on our E2E forums!

 

Thank you,

Kyle Rakos

 

  • I've got a DLPDLCR2000 fully configured as per the quick start guide. This includes setup of the dlp_lightcrafter-1.0.19 library. The system is running with the standard demo scripts. 

    After doing an apt-get update and apt-get upgrade I followed your instructions and sucessfully performed the git pull but when I run "make all" in the /opt/scripts/device/bone/capes/DLPDLCR2000/structured_light I encounter the following error:

    gcc -o pattern_disp open_bmp.c display_core.c display_app.c -O3
    In file included from display_app.h:38:0,
                     from open_bmp.c:38:
    display_core.h:57:17: warning: inline function ‘pixel_color’ declared but never defined
     inline uint32_t pixel_color(uint8_t r, uint8_t g, uint8_t b, struct fb_var_screeninfo *var_info);
                     ^~~~~~~~~~~
    In file included from display_app.h:38:0,
                     from display_app.c:38:
    display_core.h:57:17: warning: inline function ‘pixel_color’ declared but never defined
     inline uint32_t pixel_color(uint8_t r, uint8_t g, uint8_t b, struct fb_var_screeninfo *var_info);
                     ^~~~~~~~~~~
    /tmp/ccmj9qsh.o: In function `display_images':
    display_app.c:(.text+0x12e): undefined reference to `pixel_color'
    collect2: error: ld returned 1 exit status
    Makefile:48: recipe for target 'all' failed
    make: *** [all] Error 1
    debian@beaglebone:/opt/scripts/device/bone/capes/DLPDLCR2000/structured_light$ 
    

    I would suspect I am missing a dependency or have an improperly configured permission. Any help would be appreciated!

     

  • Hello Stephen,

    It looks like a recent update of gcc has caused some compatability issues. You can achieve a workaround by changing the make file. Change the line "CFLAGS=-O3" to "CLFAGS=-O3 -std=gnu89". Let me know if that works!

    Thanks,

    Kyle

  • That indeed worked fine. Make did work.
    I will test the code later
  • One quick question, in the sample code is the image_names array loaded? Or is that an "exercise left to the reader"?
  • Hi Stephen,
    That will be "left to the reader"! You will just need to put some sample images into your directory. Alternatively you can run the code with the -t (-test) flag to get some images on the screen.

    Thanks,
    Kyle
  • Thanks, so this is strictly a 24 bit display with a rapid feed rate, with trigger control as opposed to the control of individual bit-planes as in the case of the LightCrafter4500 EVM?
  • Hi Stephen,

    Yes, it is just a 24 bit display that is using the native video input of the 2000 EVM. The goal was to provide some code to enable basic structured light functionality. However, all provided code is running on the Beaglebone Black and isn't doing anything too special with the 2000 EVM (other than a couple user accessible I2C commands that are sent from the Beagle to the EVM). Obviously you  can adapt and improve the code as well.

    In contrast, the 4500 EVM has the code running on the built in controller. Running on the controller enables much more precise control and features. Additionally, you don't need the extra hardware. This enables a faster framerates, bit-frame control, more precise timings, etc.

    Hope that answered your question!

    Thanks,

    Kyle