Tags:
Permalink Reply by Ryan Johnston on June 12, 2011 at 2:58am Hi Chris, thanks for that information. I was looking for something like that schematic. I had a look at the spreadsheet too. I still cant quite work out how the arduino pin numbers relate to what i can see on the board though.
The APM unit has inputs 1-8 and outputs 1-8, each with +, - and ground pins. Im trying to figure out the corrosponding arduino numbers. The information might be buried in that schematic somehow, but iv been trying to work it out for an hour and im not having any luck.
This is the code im trying to run:
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. */
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}
So im trying to figure out the pin numbers for the LEDs on my board. I have no blinking lights when i upload this code, so pin 13 must not be an LED on the APM board. I thought if i cant find the LED pin numbers, maybe i can find output pin numbers instead. Iv been making guesses based on that schematic. I have my multimeter hooked up to an output and im trying to get the high/low voltage change each second.
Maybe i will have to buy one of those basic boards to learn this : ( I was hoping i could use this board as a mini computer with inputs and outputs that i can run basic code on, like whats above. If i just work the appropriate way to receive a signal from the inputs, and push a signal to the outputs, there's a hell of a lot i could do just with that.
Permalink Reply by Ritchie on June 12, 2011 at 6:04am
Permalink Reply by Ryan Johnston on June 13, 2011 at 2:13am Woohoo, iv finally got outputs & LEDs going.
I understand the schematic now. I assumed that the outputs were coming straight out of the ATMega1280 unit, I was getting very confused.
Iv never been so happy to see flashing lights in my life! I tried hooking up some servos to the outputs, that doesnt work. I guess im going to have to learn about digital signals and pulse technology.
I think ill start by making a ballistic launcher that can calculate the appropriate angle and power to throw an object a certain distance. Should be a fun project to learn on. The maths is easy, I just have to learn the hardware and the language : ) I think ill head down to the local electronics shop and get some basic bits and peices i can control with my APM.
Thanks for the help!
Permalink Reply by Obertan on September 29, 2011 at 12:18am which pins to connect to light up the led?
Permalink Reply by Jnixetra on October 7, 2011 at 6:12am hi i am facing the same problem as you now... can u tell me how to connect the LED so that the programme work? i will be very grateful if u can reply me.. THANKS!!!
read the apm code ;)
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.1280 members
16 members
182 members
86 members
51 members
© 2013 Created by Chris Anderson.
Powered by
