pibits's People
Forkers
othane jronald jean-emile rmallins tomaja danankers scottjgibson sarfata swooningfish hasbiestheim metachris berasomnath stulevine xranby threeme3 cody82 ggcrashtest cigraphics bmwiedemann leeoon yuanda mikerr elkiloprieto yakroo quangnt01521 kiwox egmeek magicman78 wjhh2008 daemionfox jonny07 camilocarrillo mog422 praepoke alexwiththescar majklovec bpassaro gameworld pisankmitl henkin akiraaptx jonez999 l31n pain27 backmask mfarre imclab zeraler wolfgangjt jaehong pilatomic coreyshuman ducky007 thomas621 achilikin murthy71191 dudeinamotorhome dmirk zhum pibox cctsao1008 sbwtw ndtoys tazjel inyongie csik w-a-l-l-e jwalker24 kruts69 and070 emilleopold spartacus125 bmcphail moonmile dschoonwinkel jucaju reggimane dienbk7x saya1989 bobby-barber hackers365 germancarrillo qomo sunilshahu sebastianschwank evervasquez marcinwal cowboyhackr spinir kalemanzi anabiman shaun2029 bstidham milesward dogga8 jennib3 liqsliu astumphashtech ermaurone philipeastbournepibits's Issues
servod locks up console with kernel 3.10.x
SInce the move to from the 3.6.x to the 3.10.x kernel I have problems with servod (needed for my PiPan).
I am running with the console on a HDMI display (Motorola Atrix 4G Lapdock).
My current raspbian kernel is 3.10.24+.
Here are the symptoms:
Starting servod from the console (no X running). Servod starts normally. Also 'echo debug > /dev/servoblaster' produces the expected debug output, as long as there still is sufficient room on the console (no scrolling needed). However as soon as console output reaches the bottom of the screen (output may be from an other command, e.g. ls) the console locks up and the program which tries to output the next line on the console (console has to scroll up) goes to almost 100% CPU. Smells like a busy wait.
I can still log in remotely with ssh and when I kill servod from the remote terminal console scrolling and output resumes and everything works again.
I had no such problems with the 3.6.x kernel.
Suspect it has something to do with the console code trying to access memory for scrolling which is kept locked by servod.
If you need more info let me know.
Is possible to call Servoblaster from Processing?
Hi I'm planning to code in Processing on a Raspberry Pi 2B, is it possible to interface it with ServoBlaster?
error re-compiling latest Servoblaster
Hello,
I've been using Servoblaster successfully for ages, in a project of mine involving some "mission critical" applications of PWM and LEDS fixtures :) (https://github.com/dentex/piac).
The initialization command is sudo servod --p1pins=11,15,19,21,23 --cycle-time=5000us --step-size=5us --min=5us --max 5000us
. It's a B+ Pi model. All good.
Now I was in the needs of using one more PWM pin and I had to use one of the pins the B+ has in addition to the old B model. Namely, I tried the 29. Being an old compiled version not supporting the B+ model (I think), the above command with the pin 29 added gave: Invalid pin number 29 in P1 pin list
.
So I updated the PiBits source, but, into ./ServoBlaster/user, make servod
is throwing at me the error:
gcc -Wall -g -O2 -o servod servod.c mailbox.c -lm
In file included from /usr/include/arm-linux-gnueabihf/bits/sigcontext.h:28:0,
from /usr/include/signal.h:339,
from servod.c:35:
/usr/include/arm-linux-gnueabihf/asm/sigcontext.h:2:8: error: macro names must be identifiers
/usr/include/arm-linux-gnueabihf/asm/sigcontext.h:4:1: error: unterminated comment
/usr/include/arm-linux-gnueabihf/asm/sigcontext.h:1:0: error: unterminated #ifndef
In file included from /usr/include/signal.h:359:0,
from servod.c:35:
/usr/include/arm-linux-gnueabihf/sys/ucontext.h:108:16: error: field ‘uc_mcontext’ has incomplete type
Makefile:6: set di istruzioni per l'obiettivo "servod" non riuscito
make: *** [servod] Errore 1
Being a total noob when it comes to source files, C, building and such, now I'm completely clueless on what to do to able to use the other pins from the B+ with Servoblester.
I also updated with rpi-update
, that I usually avoid. Same error.
Any hint?
Thank you very much.
Problems using MPU6050 with Pi rev 2
Hi,
I can't get demo_dmp to work (didn't try demo_3d).
Problems I was able to fix myself:
Pi rev2 uses "/dev/i2c-1"
- I changed line 175 in I2Cdev.cpp and line 10 in setup-i2c.sh
Now I get "MPU6050 connection successful" when running demo_dmp, but still "DMP Initialization failed (code 1)".
To get demo_raw running, I had to run "i2cset -y 1 0x68 0x6b 0" manually, but that doesn't get the DMP to initialize...
The output of demo_dmp:
pi@raspberrypi ~/PiBits/MPU6050-Pi-Demo $ ./demo_dmp
Initializing I2C devices...
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Testing device connections...
MPU6050 connection successful
Initializing DMP...
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
Failed to write device(-1): Input/output error
DMP Initialization failed (code 1)
Any help would be appreciated :)
Thanks, basti
servoblaster (kernel) break raspi-cam
When the kernel-modul is loaded the raspi camera is not longer working. Even after removing the kernel modul the cam still is broken.
After reboot everything works fine again.
dmpPacketBuffer is never initialized
It appears it was once in the code, but now it is commented out at line 500 in file MPU6050_6Axis_MotionApps20.h
piFmDma
does the pi overclocking has any effect on the FM output frequency ?
Single PWM
Would it be possible to configure a mode (via ioctl or module parameter) to issue a PWM signal only once? This would differ from the current, default, mode that continues to issue the pwm signal.
Raspberry Pi Camera Conflict
After installing with sudo make install_autostart, Raspberry Pi Camera Module can no longer be accessed. Some say that this is due to GPIO 21 conflict. I've already commented line 42 on servod.c ("21, // P1-13") and recompiled, as suggested, but that doesn't seem to solve the problem...
Full PWM Power to Zero Power fails.
Hi,
Recently starting using servoblaster to power an LED array via a Darlington Array; I set the following options in /etc/init.d/servoblaster:
OPTS='--p1pins=12 --p5pins= --min=1 --max=2000'
When setting:
echo 0=2000 > /dev/servoblaster
The LED is set to full brightness correctly. Then, setting:
echo 0=0 > /dev/servoblaster
Does nothing. However; setting it to a non-maximum value first, then setting to zero does work! ie:
echo 0=1999 > /dev/servoblaster
echo 0=0 > /dev/servoblaster
Using Servoblaster and rpi_ws281x at the same time
Hi,
I want to use servoblaster and the rpi_ws281x lib at the same time but the ws281x program is not controlling the LEDs when servoblaster is running.
I saw you already updated mailbox in your fork of rpi_ws281x to make this possible?!
Should both of them work parallel? If so has anyone an idea what can cause such a behaviour?
There are any special configurations necessary?
Many thanks in advance and for your great work on servoblaster.
modprobe: Error: could not insert 'servoblaster': operation not permitted
herro there kind sirrrrr. im running on rasberry Pi 3 with rasbpian installed. i followed diz tutorial on how to install servoblaster. althought when i executed this command: modprobe servoblaster, it didnt werk.
this is wot came up. Error: could not insert 'servoblaster':operation not permitted.
i need halp. mostly cuz im in grade 6, my linux skillz arent too good. I NEED HALP!!!!!!! quick too cuz its due tommorrow. my project
Not retaining configuration changes
i had to run kill on servod which caused my custom config changes to reset. I then reran the command
Sudo servod -- p1pins=12
Which then works until I reboot and the servoblaster goes back to running on all the default settings.
Any idea why?
Setting step time to 1us causes waveforms to be double of what is requested
I was looking to get more accurate step sizes using servod, so I modified the step time to be 1us (yes I know the directions say don't go below 2!)
After doing this, all time values are actually double of what they are commanded to be. For instance, setting a waveform for 1000us results in a 2000us waveform (seen via oscilloscope)
Is it simply impossible to get higher resolution than 2us (which works fine)?
debian distro
Hi there, may I know whether you are using the latest raspbian wheezy or the soft float debian wheezy as your distro? this is because those two works with different environment which are the armhf and armel.
Thank you.
ServoBlaster: Higher precision?
Right now you can control servos/motors with a precision of 100 steps.
I would like to have 200 steps or more.
Would that be possible?
Edit: Sorry, I see that it is possible by changing SAMPLE_US in servod.c. Issue can be closed.
Servo only wants to spin in one direction
I don't like One Direction much as a band... for servos it's terrible though!
I've connected up all the servoblaster goodness, and everything seems to work while playing with a smaller hobby servo. Now I've connected by big servo, which is a multi rotation 'sailboat winch' servo, and outputting 650us and 1520us just makes the servo want to spin in the same direction. I have an arduino sketch the spins the servo and 650 and 1520 are the fully open and fully closed positions. Any idea what could be the matter?
Thanks,
James
192kHz input
Hi!
How should the code be modified if one wants to transmit source audio which is at 192 kHz samplerate, still mono? The idea behind this is to transmit a file containing MPX signal, which essentially is mono + 19khz pilot + stereo-DSB + RDS.
Controlling motors in a loop, terminating and intiating a new loop.
Hi,
I have been able to control motors in an iteration with servoblaster
successfully. My intention is to loop this iteration infinitely in a process until I send a signal to kill the same. This works too. But, I want a new operation to be triggered after killing this process. At this point, the servo motors don't reset to 500μs
or any other position that I had earlier defined as a default position. When I set the motors individually to the default position from command line, it works, though.
Can you please tell me how to 'gracefully' terminate the loop (controlling individual motors) and start a loop of different motor positions ?
if you have 2 different servos?
Instead of running a default min and max at 500 and 2500 for all servos
define DEFAULT_SERVO_MIN_US 500
define DEFAULT_SERVO_MAX_US 2500
How would I change this so...
pin 7 min = 300 and max = 1200
pin 11 min = 150 and max = 1650
(im building a pan / tilt live pi cam stream to start from boot and the horizontal range for the servo travel is bigger on the servo on pin 7 than the vertical range on the servo from pin 11.
Thanks for writing this. I'm a noob and this is a great help.
Installing Servoblaster
What do I do to install ServoBlaster on my raspberry pi ?
I've found these commands
cd PiBits/ServoBlaster
sudo make
but terminal say to me that it doesn't found makefile
Thanks
ServoBlaster on a Raspberry Pi 3?
Richard.... Do you see any issues with ServoBlaster working on a Raspberry Pi Version: 3?
Servoblaster PWM on pin 8 (GPIO14) not working
Hi,
I have a Raspberry Pi B+, does anyone know what I have to do to get pin 8 (GPIO14) to work as a PWM output?
I know that this pin is a special pin for serial connection, and I have changed both /boot/cmdline.txt and /etc/inittab accordingly to deactivate the serial connection, but it still doesn't do anything on that particular pin. All other pins are working just fine.
Greetings, Lukas
PS: Unfortunately, I cannot use any other pin, because the layout of some external hardware I have kind of forces me to use that pin, I would like to avoid breaking and resoldering that stuff.
Which GPL?
PiFmDma.c states the code is released under GPL, but not which version. I made a derivative program here: https://github.com/626Pilot/RaspberryPi-NeoPixel-WS2812
Need to know which GPL version so I can put it in the comments. Thanks!
Can only set position of servo once
When I set my servo's position once with a line such as:
echo 0=120 > /dev/servoblaster
it rotates there and everything is fine. Then, when I try to do it again, it makes a buzzing sound continuously and doesn't move no matter what input I give. What is the problem here?
The servo has 180-degree range, HS-422.
Raspberry Pi 2 B kernel 4.1 Servoblaster
Hello,
I use my Raspberry Pi 2 B with RPi_Cam_Web_Interface where I ansteuere the camera with servos (pan, tilt).
With the update to kernel 4.1, control my servos, which are driven via the Servoblaster no longer works.
Can we expect an update from Servoblaster?
Bus error at service start
Hello,
thx for this lib. I'm trying to make servoBlaster work on an odroid c1 which has approximately the same architecture as the rpi 2. The user version compile but I get a
bus error
on startup. Do you have any advice on what can cause this ?
Thx
Servoblaster GPIO-17(P1-11) and GPIO-18(P1-12) not working
range of pulsewidth with servo
Hi,
i am using this servo with this library as an initial test: http://www.servodatabase.com/servo/hextronik/hxt900
The specs for the servo states that the pulse width range is 450 to 2450us. In practice however it looks like only values of 50 to 244. Curious as to why passing a value of 45 doesn't move the servo?
My real need is to be able to control a sabertooth 2x12 motor controller. Should this library be able to accomplish this? http://www.dimensionengineering.com/datasheets/Sabertooth2x12.pdf
ServoBlaster: Cannot obtain current servo positions (no "read" option from device)
Hi, Firstly THANK YOU for this brilliant piece of programming - so incredibly useful to be able to drive servos directly from the Pi.
The one feature that I found missing was the ability to read current servo position (so as to generate relative moves). I've written a C program to do this myself, which you or some of your program users might find useful. I'd be delighted to send it if there's a way I can do that.. please let me know.
Regards
Doug Hadfield
Servoblaster config file is stored in /dev
Really? That makes little sense. It should be in /etc.
Does PiFmDma.c have a memory leak?
There are mmap and a malloc calls, but no munmap and free calls to match them. It looks like mmap automatically gets the mapping freed when the process exits, but not malloc. Will this eat RAM whenever it's run?
ServoBlaster - Question about continuous servo (problem) and rotation time
Hi,
I started using this library (love it!) and I have two question about it.
First, I tryed with a classic servo (limited angle) and it works well !
Now, I'm trying to use it on a continuous servo, but on each command, the servo will turn indefinitely.. I tried with relative rotation like +10
or percents.. An idea ?
Secondly, I would like to know if it's possible to modify in C the rotation speed of a servo ?
In my case I want the servo A (non continuous) with the default speed, and the servo B (continuous) with an other speed..
Thanks !
making the user daemon run at system startup?
hi there,
sorry to ask such a simple question but i am having a bit of grief trying to get the user daemon to run at startup. i have tried modding the init.d file but every tutorial i have come across doesnt seem to work. i know you have the make install command in the readme but isnt that for the kernel version? sorry to ask. (as you can tell i am very new to this).
kind regards, jim
Servoblaster : Set step_size to 1us
Hi,
I would like to be able to set the step_size to 1us in order to have more smooth control on a quadcopter.
I could modify the code so that it allows me to specify --step_size=1us, but then the signal sent has a period and length which is twice the specified value.
Can you indicate me why and how to fix it ?
Many many thanks for your help and this great tool.
Vincent
partial rotation servo
Hi, Richard !
My servo Tower Pro SG90 max rotate from 0 to 180 degrees, but
using value 80-250 rotate only from 45 to 180 degrees.
Many thanks.
Servoblaster and wiringpi
Hi, I've installed Servoblaster on a B+ that also uses WiringPi to control some gpio.
Servoblaster is only 2 servos on different gpio to wiringpi gpio. The issue I can repeat:
Reboot pi, Servoblaster 'locks' control of wiringpi gpio, wiringpi cannot access them.
I do sudo ./servod --p1pins=7,22
WiringPi now can access the gpio it needs!
Servoblaster-cfg in /dev is always showing from boot
p1pins=7,22
p5pins=
So all is fine except if I need to reboot then I need to reconfigure to get wiringpi happy. Any thoughts please would be awesome!
Thank you for the excellent Servoblaster
How to uninstall ServoBlaster?
Hi
I have 256mb Rev 2 board with Camera board. Everything was ok, until I installed Servoblaster for Pan/Tilt Device.
I comment GPIO21 (pin P1-13) from servod.c and compile it, but camera still not work. How to uninstall Servoblaster completely?
Can you make proper Serviblaster for Rev2 Board or simply select option during install process?
Modifying to only use one pin for one servo?
What would I need to change in the kernal driver to only have it use one GPIO pin?
using servoblaster with A20 olimex open hardware
Hello, do you think that is possible use servoblaster with A20 olimex?
thanks.
https://www.olimex.com/Products/OLinuXino/A20/open-source-hardware
ServoBlaster - Continuous servo bug (auto rotate)
Hi, I'm facing to a rotation bug in ServoBlaster..
I'm using these values:
1500us : Idle
1530us : Pulse left
1480us : Pulse right
For example : echo 1=1500us > /dev/servoblaster
.
BUT, my problem is the (continuous) servo which rotates itself sometimes.. I mean, I make it to rotate to the right, I stop (idle), rotate to the left, stop (wait some seconds), and sometimes it will begin to rotate again itself and don't stop until I give it pulse left or pulse right value (it will not stop anymore with idle pulse)..
Do you have an idea ?
EDIT: I'm using an external battery for the motor (5V 2.1A). The battery GND pin is not connected to the RPi GND pin (otherwise, the motor is crazy sometimes).
os.write for /dev/servoblaster.
Hello!
Python doesn't complain about the following; but, there is no motion of the motors. Is echo
the only way ?
>>> import os
>>> p = os.open('/dev/servoblaster',os.O_WRONLY)
>>> os.write(p,'1=1500us')
8
>>> os.close(p)
Servoblaster not compatible with Raspberry Pi 2
Looks like the DMA addresses have changed but I can't find any details on what the new ones are
How to get current servo position?
hi
Can I get current servo position?
I need current position to reverse direction.
advise me.
How to avoid minor jerks in servo motor?
Hi @richardghirst ,
I am using you servoBlaster library. some time i am getting minor jerks in the servo motor(MG996R Metal Gear Servo Motor).How to avoid these jerks?
Can't use PCM when running as a service
Although I can manually run ServoBlaster to use PCM instead of PWM, ie
sudo servod --pcm --p1pins=7 --step-size=5us
when I try using the --pcm
parameter in the OPTS
variable in the init.d script, the process consistently fails with a message
ERROR: DMA not running
Any thoughts?
Servoblaster PWMs (+invert not working)
Hello! I have a Pi2 and tried to use the latest version of Servoblaster. I'm trying to generate 4 PWMs for controlling 4 ESCs for a quadcopter. I'm using a USBee AX (it's like a small USB oscilloscope) for reading the signals and displaying them using sigrok (open source signal analyzer). I tried reading PWMs generated by other sources (like an Arduino) and the signals looked smooth so I don't think that what I use for reading has a problem. However when I try to read the Servoblaster signals they look like having spikes (on both high and low transitions). Also I started servod with --min=1000us --max=2000us with 20000us period (so 1 to 2 ms pulse with 20 ms period) but the readings look like high ~16ms and then low ~4ms. They don't look like the needed configuration. Also tried the --invert option but in this case no signals appear. (I'm using the userspace version)
How to have ServoBlaster ignore all but first two servo controls
Hello,
How do I get the ServoBlaster (user - version) program to not control all the pins?
I want to run another program that uses a couple GPIO pins, and ServoBlaster is over-riding it. I've parsed through servod.c and tried changing things here and there, but am at a loss (new to programming).
Thanks!
Would it be possible to custom the frequency and bits of the wav file
cat /dev/servoblaster freezes
I am trying to run two servos following the code in this repo: https://github.com/Jonovono/py_servo_facetracker/blob/master/facetracker_servo_gpio.py
It seems to work fine when one servo is used, but messes up when two are used.
One thing I noticed is if I do cat /dev/servoblaster it does not show the contents of the file and instead just kind of halts the process. Any idea.
Thanks so much. Servoblaster seems awesome!
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.