top of page

DIY 4-axis camera motion control - The Arduino code

  • Immagine del redattore: Maurizio Schnabl
    Maurizio Schnabl
  • 30 mag 2016
  • Tempo di lettura: 1 min

The Arduino source code consists of approximately 2500 lines and is organized in 6 tabs inside the Arduino ide (v. 1.6.8)

The first tab contains the loop method whereas the other four tabs contain functions and methods triggered by command sent by the host pc GUI.

Here is a screenshot of the Arduino code main page.

The Arduino board keeps running its loop() function indefinitely and waits for messages sent by the pc GUI.

The kind of messages it accepts are like the following one:

alp://cust/dlys/2000/0/0/0

When the Arduino captures such a message on its serial port it parses it and responds accordingly.

For example if the “dlys” substring is recognized the board knows that the array containing the delays values must be populated with the first four delay values sent by the host pc.

If “grph” substring is received it triggers a method, graphNpoint(), that computes the points of the curves representing the slider, pan, tilt, focus and global speed motors movements and send them back to the host PC to allow a graphical representation of them in the host pc GUI.

If “ppin” substring is received, the subsequent substring is captured (the numbers 4, 5, 6, 7, 8 and 9) and a specific task are performed accordingly.

And so on…

The code contains many functions used to compute the curves or to trigger the movements according to the algorithms selected.

I will eventually explain them in details if someone is interested.

And finallly here is the link to the latest version of my arduino code to be uplodaded to the Arduino Due board.

 
 
 

Comentários


RECENT POSTS:
SEARCH BY TAGS:

© 2016 by ON THE MOVIE. Proudly created with Wix.com

  • b-facebook
bottom of page