How do I access the data from the Linescan Camera on the TFC-Shield used in the Freescale Cup Competitions?

2 次查看(过去 30 天)
I am participating in the Freescale Cup Competition and I would like to get the data from a Linescan Camera Connected to a TFC-Shield in MATLAB so that I can plot it and look at what the camera sees. Where do I start?

采纳的回答

MathWorks Student Competitions Team
First you will need to install the Embedded Coder Support Package for Freescale FRDM-KL25Z Board. When you install this support package, you will also get several other pieces of software. One of these pieces of software is called the Freescale Cup Companion, which is a MATLAB App that is meant to make it easy to use this support package for the Freesclale Cup Competition. It has an example with step-by-step instructions on how to use the linescan camera with the support package.
In order to open the App you will need to go to the Apps Tab in MATLAB:
From there, if you do not see the Freescale Cup Companion Icon:
You will need to select the down-arrow at the far right of the App Icons to reveal more Apps. Once you have found the Freescale Cup Companion App Icon, simply click on it to open the App. The App Should look like this:
If you double-click on the Additional Example “View Live Camera Data” it will open a document that shows the step-by-step directions you are looking for.

更多回答(1 个)

Lucas
Lucas 2014-11-7
I try to do the step=by=step, but the plot is totally unstable ... there are not 128 pixel , but the X axis vary... le max value on the axe is 25, then 40 , then 140 then 50 , then 30 etc ... I vealy don't undertand ...; moreover, the value vary also verry unstably ... So i have a question , i have to plug the shield to my PC , build the simulink code, then i deplug the shield to my PC , i connect the battery to the shield, and to have the plot i have to plug again the PC to the shield to Transmit the Camera information ? but i have to plug it to the same USB slot than when i plug it for build the code ???? or the other one ? why there are 2 mini=usb connector on the shield ?? thank you in advence ,
best regards ,
mahieu lucas
  1 个评论
MathWorks Student Competitions Team
The values from the Linescan Camera can be somewhat unstable if the back of the camera's board is not covered by something. Light can penetrate the board and affect the values returned by the camera.
the steps specified in the example do not mention plugging and unplugging the board or attaching the battery.
Setup:
The shield should be attached to your FRDM-KL25Z board. A USB cable should go between the computer and the usb port on the board labeled "SDA".
Then you should be able to open the Device manager and find the COM port of the board, as shown in the Example. Once you have that, you can open the example model, Build it (which will generate C code, build an executable, and then load the executable onto the FRDM-KL25Z. Once the code has been loaded onto the board, you can execute the command:
showCameraData
which should open up a figure window and begin displaying the values coming from the camera. If the values are all over the place, you can check the behavior of the camera by blocking the light to make sure the values go down, and then stop blocking the light and see if the values go up.
There are several variables to consider when using this camera, including, but not limited to: what the camera is pointing at, how the lens is focused (you can rotate the lens to change the focus), whether or not the back of the camera is covered by something that won't let light through.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Electromechanical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by