Adafruit servo tutorial for raspberry pi

by gheciobanu on Mon Feb 03, 2014 8:39 pm

I tried doing the servo tutorial and it worked, then i cleaned everything off my breadboard and did another project then when i went back to my servo and plugged everything back in the bread board the terminal window said Error writing to: servo value: (here go numbers from 0 to 179) What can i do i checked if the battery pack is working and it does work! Please help what can i do?? :(
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_rick on Tue Feb 04, 2014 11:12 am

Check your wiring again.
User avatar
adafruit_support_rick
 
Posts: 8613
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Sun Feb 09, 2014 10:13 pm

i did over and over again.
servo black goes to breadboard negative,
servo red goes to breadboard positive,
servo white goes to pin 18 on cobbler,
batter pack black goes to breadboard negative,
batter pack red goes to breadboard red,
pi cobbler GND pin goes to bread board negative.
i checked everything, is there anything else that i might be doing wrong?
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_bill on Mon Feb 10, 2014 6:04 am

The wiring sounds right. From the error message you are getting, I suspect it is a software problem. Are you running occidentalis?
User avatar
adafruit_support_bill
 
Posts: 25601
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Mon Feb 10, 2014 4:46 pm

Yes the newest version of occidentals, and the funny thing is that i wired it and it worked, then i restarted the pi and the i ran the script again that's the message i was getting, and i tried deleting the script and making a new one, ans i still got the error message.
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_mike on Mon Feb 10, 2014 6:46 pm

Let's see.. that error message shows up when the script can't open /sys/class/rpi-pwm/pwm0/, and errors like that are usually permissions problems.

Are you using `sudo` to invoke the script?
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7181
Joined: Thu Feb 11, 2010 1:51 pm

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Mon Feb 10, 2014 11:14 pm

in the tutorial it says to do python servo.py, but i also tried doing sudo servo.py and sudo ./servo.py and when i do sudo it says command not found, but when i do python servo.py it gives me the error servo value
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_rick on Tue Feb 11, 2014 9:20 am

Try sudo python servo.py
User avatar
adafruit_support_rick
 
Posts: 8613
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Tue Feb 11, 2014 3:26 pm

I still get the same error message as if i did python servo.py
Attachments
Untitled.png
screenshot of error
Untitled.png (99.18 KiB) Viewed 85 times
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_mike on Wed Feb 12, 2014 2:44 pm

Let's check the GPIO path:

What do you get from the following commands?

Code: Select all
ls -l /sys/
ls -l /sys/class/
ls -l /sys/class/rpi-pwm/
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7181
Joined: Thu Feb 11, 2010 1:51 pm

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Wed Feb 12, 2014 3:57 pm

I got some information about some files, i attached a screenshot of my ssh window
Attachments
Untitled.png
Untitled.png (94.53 KiB) Viewed 72 times
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_mike on Thu Feb 13, 2014 3:12 pm

That's the information I was looking for. According to those directory listings, you no longer have kernel support for PWM.

It would probably be easiest to get it back by installing a fresh version of Occidentalis on your SD card.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7181
Joined: Thu Feb 11, 2010 1:51 pm

Re: Adafruit servo tutorial for raspberry pi

by gheciobanu on Thu Feb 13, 2014 3:14 pm

OK, ill uninstall and install it again, but why did that happen?
gheciobanu
 
Posts: 7
Joined: Tue Jan 07, 2014 10:35 pm

Re: Adafruit servo tutorial for raspberry pi

by adafruit_support_mike on Sun Feb 16, 2014 2:46 pm

There are too many possibilities to say right now. You'd need to repeat everything you did after disconnecting the first servo experiment and check at each step to see if PWM support is still there.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 7181
Joined: Thu Feb 11, 2010 1:51 pm