Hi. Complete newbie here although I do have a background in SQL, VBA and Javascript, so not coming in absolutely blind
I have sketched out a project in tinkercad for a magnetically triggered servo using a reed switch. I've had to use a standard hobby servo and push button in tinkercad as the continuous servo and reed switches that I am using in the real world are not available in that virtual environment. I've also had to bring the voltage supply to the servo down with a diode which I won't need to do in reality. Other than that, it's a faithful replica of what I want to create and runs fine.
When uploading to my board, things just aren't running >:( .
Potential issues are the connections as the breadboard seems of dubious quality to me. I also am unsure if which is the correct signal connection on my feetech fs5106r It has red, which I assume is power, brown, which I assume is negative / ground, and orange, which I would imagine is the signal.
I've tried hooking the servo up on the 5v pin instead of the battery pack, but that didn't work??!!
I'm getting a voltmeter tomorrow to ensure that all my connections check out, but I thought it would be a good idea to post my code and ensure that I'm not missing something! Any feedback would be greatly appreciated.
/******************************************************************************
Reed_Switch_Example.ino
Example sketch for SparkFun's Reed Switch
 (https://www.sparkfun.com/products/8642)
Jim Lindblom @ SparkFun Electronics
May 3, 2016
The reed switch is a two-terminal, magnetically-actuated, normally-open switch.
Connect one end of the switch to ground, and the other to Arduino's D2 pin.
The D2 pin's internal pull-up resistor is used to bias the pin high. When the
switch closes, the pin should go low.
Development environment specifics:
Arduino 1.6.7
******************************************************************************/
const int REED_PIN = 2; // Pin connected to reed switch
const int LED_PIN = 13; // LED pin - active-high
#include <Servo.h>
Servo myservo;Â // create servo object to control a servo
void setup()
{
 Serial.begin(9600);
 // Since the other end of the reed switch is connected to ground, we need
 // to pull-up the reed switch pin internally.
 pinMode(REED_PIN, INPUT_PULLUP);
 pinMode(LED_PIN, OUTPUT);
 myservo.attach(9); // attaches the servo on pin 9 to the servo object
}
void loop()
{
 int proximity = digitalRead(REED_PIN); // Read the state of the switch
 if (proximity == LOW) // If the pin reads low, the switch is closed.
 {
  //Serial.println("Switch closed");
  //digitalWrite(LED_PIN, HIGH); // Turn the LED on
 Â
  myservo.write(135);        // rotate clockwise full speed
delay(2000);
  myservo.write(90);// stop
 Â
 }
 else
 {
  digitalWrite(LED_PIN, LOW); // Turn the LED off
 }
}
Forget to mention...I have turned off some of the pin 13 code as I this was for early testing purposes and was working fine. I'll probably turn it back on again to very the on signal is getting through and at least rule that out!