I have just finished a robotics project, which is due in a competition in a couple of hours.

I have a problem: when my code sets one of the pins for the servo motor high, waits for a tiny amount of time then sets it low again, my raspberry Pi a+ crashes, with only the red power LED showing. The servos are powered off a completely separate battery pack to the raspi, their only connection being the control pin.

As I'm on the way to the competition and I don't have a screen or keyboard and mouse, I can't access the code to try and fix it, or try and switch to PWM. I could however plug the SD into a laptop and look at / edit the code to use PWM, but I can't find a way how to.

Could this be a hardware issue, and if so how could I fix it? Or, can I access the code from the SD card?

  • If you've a Linux machine, you can insert the SD card and access file system, modify it if you know the path. If you've a wifi adapter, you can probably SSH into your machine after configuring an interface file. Also, was it working good before and started behaving abnormally or started happening recently ? To me, it looks like a hardware issue since it stops working after program runs. – dhruvvyas90 Jun 29 '15 at 9:47
  • 1
    You also have to connect a Pi ground to the servo power supply ground. You need that connection for the control wire from the Pi to servo to work. That doesn't explain why your Pi crashes though. – joan Jun 29 '15 at 9:51
  • I will try connecting the power supply to ground. I unfortunately do not have Linux or wifi - How I wish I'd bought my Linux laptop with me now! It was fine when I was pwm-ing the servo, but it's continuous rotation and I wanted it to go really slow, so I used this method. At first I thought it was a power issue, and put it down to the fact that my bench power supply is not very high current so couldn't cope with it. However, running them both of (huge) individual batteries hasn't fixed ot – Archie Roques Jun 29 '15 at 10:03
  • Thank you so so much - that worked fantastically! I'm not sure why it crashed it though. – Archie Roques Jun 29 '15 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.