Long story short i am building a fishing bait droping system for my phantom 3.
any ways i am following this guys steps on http://www.instructables.com/id/Long-Range-Dropping-System-for-Drones-With-Arduino/ to building out the system i am stuck though. i have got to the part where you copy /paste and upload the file to arduino… which having a 3d printer that runs custom software through arduino platform anyways i know it worked as once you upload the file the lights go from blinking to solid . same as when powered on.
The system -(2) arduino nano’s,(2) hc-12 long range sender’s, SG90 servo, 2 antennas, push button and some leds/resistors
–my issue is this is my 1st go at somthing like this so i know nothing about breadboards and how they work … any helpp?
One thing about the breadboard you are using. See the blue and red lines running the length of the power bus on either side of the breadboard? You will notice that both lines are "broken" in the middle, which means that the power buses are also split in the middle. If you need to have the buses run the full length uninterrupted you will have to place a short jumper to bridge the gap and allow the bus to be the full length.
There are 8 wires leaving the bottom of the first picture. What do they go to and how are they connected to whatever it is? Can you draw and post a schematic?
..the button i am using is a 7mm that i got off ebay i spoke with the guy who made the original post on the instructables website and he mentioned the button could be my issue. i did see on ebay some 5mm micro push buttons . i asked him to send me a web link as to where he got his and he has yet to reply.(i did notice that my button does not ride in E & F-i think the guys pictures might show his button sitting on the 1st two lines between the spilt. as of now mine is sitting in D & F could this be the issue?
Take your switch off the breadboard and turn it over.
On any two diagonal terminals, solder equal length #22 AWG solid wire to these terminals.
Turn the switch right side up, plug the two wires into the breadboard.
Wire your circuit to the rows where these wires are plugged into.
Try a simple sketch with the button connected from pin 8 to GND.
Watch the LED on the Arduino.
It should go ON/OFF with button pushes.
/*
Debounce
Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
press), the output pin is toggled from LOW to HIGH or HIGH to LOW. There's
a minimum delay between toggles to debounce the circuit (i.e. to ignore
noise).
The circuit:
* LED attached from pin 13 to ground
* pushbutton attached from pin 2 to +5V
* 10K resistor attached from pin 2 to ground
* Note: On most Arduino boards, there is already an LED on the board
connected to pin 13, so you don't need any extra components for this example.
created 21 November 2006
by David A. Mellis
modified 30 Aug 2011
by Limor Fried
modified 28 Dec 2012
by Mike Walters
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/Debounce
*/
// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 8; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// Variables will change:
int ledState = HIGH; // the current state of the output pin
int buttonState; // the current reading from the input pin
int lastButtonState = LOW; // the previous reading from the input pin
// the following variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long lastDebounceTime = 0; // the last time the output pin was toggled
long debounceDelay = 50; // the debounce time; increase if the output flickers
void setup() {
pinMode(buttonPin, INPUT);
pinMode(ledPin, OUTPUT);
// set initial LED state
digitalWrite(ledPin, ledState);
}
void loop() {
// read the state of the switch into a local variable:
int reading = digitalRead(buttonPin);
// check to see if you just pressed the button
// (i.e. the input went from LOW to HIGH), and you've waited
// long enough since the last press to ignore any noise:
// If the switch changed, due to noise or pressing:
if (reading != lastButtonState) {
// reset the debouncing timer
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) > debounceDelay) {
// whatever the reading is at, it's been there for longer
// than the debounce delay, so take it as the actual current state:
// if the button state has changed:
if (reading != buttonState) {
buttonState = reading;
// only toggle the LED if the new button state is HIGH
if (buttonState == HIGH) {
ledState = !ledState;
}
}
}
// set the LED:
digitalWrite(ledPin, ledState);
// save the reading. Next time through the loop,
// it'll be the lastButtonState:
lastButtonState = reading;
}
im a little lost like i said this is my 1st go with all this.. so would i copy and paste that arduino software on the Pc to each board and separately plug them in ..at least thats what a youtube video watched says to open the software once for each board.
Did you try just using a piece of wire instead of the switch?
To check the switch function, upload the sketch in post #16 to the Arduino.
Put the the switch from the Arduino pin 8 to GND.
Pushing the switch will alternately turn the Arduino on board yellow L LED on and off.
If this works, change the switch to the pin number in 'your' sketch and change this line to reflect that pin number:
const int buttonPin = 8; // the number of the pushbutton pin
okay here is where i am at.. i finally got the switch lets call it "active"as in it seems so be functioning so i know the switch is still operational . BUT my servo is still not activating when the button is pressed. i think i need to double check each board has the appropriate sketch file loaded onto it. how do i go about doing this also what made the switch active was by moving the from J 53 Pin to the one pin over at 54.. heres a quick video i made so much faster than uploading photos>. July 25, 2017 - YouTubeJuly 25, 2017 - YouTube