Programming the servo calibration procedure


Sub program, sub routine, function, procedure — it seems like every programming language has a different name for ‘blocks of code.’ Well, now I need to write a block of code for the servo calibration procedure. So first I drafted the above procedure.

Then I modified the light calibration and main programs (functions, procedures, etc.) and created a servo_calibration() procedure. Here’s what part of that looks like:

  // activate the servos 
  // servos move forward 
  t1 = millis();

  v = analogRead(0); 

  if (v<700){
    goto servo_calibration1;
  t2 = millis();

The photo shows check marks to 3 but I’m actually down to step 17. Just have to do EEPROM and I’ll be on my way to ‘field testing.’

(NOTE: this configuration initiation procedure is different than the one I came up with a couple days ago. I’ll show how it works when I get it running.)


About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s