Electric General Discussion General Discussion forum about rc electric related aircraft, accessories, flight, tips, etc.

Servo control with Raspberry Pi

Reply

Old 09-14-2015, 02:15 PM
  #1  
Trettman
Junior Member
Thread Starter
 
Join Date: Aug 2015
Posts: 3
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default Servo control with Raspberry Pi

Hello!

I'm trying to control a servo with a Raspberry Pi using a library called piblaster.js which enables PWM on some GPIO pins, but for some reason it doesn't work. I can use piblaster to change the brightness of a LED, but when I connect the pin to the signal wire of the servo it always go to the same position, even though I change the value of the PWM.

Does anyone have any ideas of what I'm doing wrong?

Thanks!
Trettman is offline  
Reply With Quote
Old 09-15-2015, 06:11 AM
  #2  
Trettman
Junior Member
Thread Starter
 
Join Date: Aug 2015
Posts: 3
Gallery
My Gallery
Models
My Models
Ratings
My Feedback
Default

Maybe I should add a bit more info, I was tired when I posted so I probably left some things out.

I've attached a picture showing how I connected everything. The servo worked when I used a transmitter and a receiver, but when I used the Raspberry Pi it did not. I tried with another type of servo (a Futaba S3003) but it didn't work either. I've seen other people use piblaster to control servos but for some reason it doesn't work.

Here's some short javascript code showing how I used the GPIO pin:

var piblaster = require("pi-blaster.js");

piblaster.setPwm(17, );
Attached Thumbnails Click image for larger version

Name:	Koppling.png
Views:	17
Size:	12.3 KB
ID:	2120043  
Trettman is offline  
Reply With Quote

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Thread Tools
Search this Thread

Contact Us Archive Advertising Cookie Policy Privacy Statement Terms of Service