I have 5 major pieces of code that I'm trying to wrap my mind around.
- The latest Aurdpilot Mega
- Harald Molle's Modified Ardupilot v1.o
- Glenn's Wind Vane
- Robbie Edwards' code for their autonomous sailboat based on Aurdpilot Mega
- Code for the Adafruit data logger
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.
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.
ReplyDeleteThe 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);
}