Friday, March 4, 2011

Commenting Code



I have 5 major pieces of code that I'm trying to wrap my mind around.
right now I'm reading through everything and make TONS of comments. My programing skills are old minimal and rusty. I think I took 2 or 3 programing classes in college... As soon as I get a chunk commented I'll post it.

1 comment:

  1. I've Played with a wind vain based on the USDigital rotary encoder. Nothing fancy just the encoder, 2 popcicle stiks, and a junk mail credit card, bit of lead as counter balance. Its not on the boat yet but seams to work (walking around the shop). Code is very simple just reading it with Arduino "pulsein" returns number between 0 an 1024 depending on the direction it is pointing.
    The test code is only 3 or so lines so I will paste it here. Reads encoder and prints to serial port for testing.

    void loop()
    {
    duration = pulseIn(pin, HIGH);
    Serial.println(duration);
    delay(100);
    }

    ReplyDelete