stereo...eh...Gert van Loo wrote: Also audio, it is something called 'stereo'.
Now I feel like an idiot .....
Well perhapsjoan wrote:OK. In that case, damn, stamp foot, I have one more blunder in my code. But at least I now know where not to look!
What exactly do you mean?johnnyz77 wrote:OK I will try that out! I was grounding to battery.
Did you run first timejohnnyz77 wrote: I have run update, created the 2 files, changed permission on "/lib/udev/servoblaster" and then run servoblaster.ko by this command:
sudo insmod servoblaster.ko
Code: Select all
RomanG wrote:What exactly do you mean?johnnyz77 wrote:OK I will try that out! I was grounding to battery.
Was the battery negative terminal connected to the ground of the RPi (i.e. GPIO pin 6)?
Both, the servo ground as well as battery negative must be connected to common ground reference.
......Did you run first timejohnnyz77 wrote: I have run update, created the 2 files, changed permission on "/lib/udev/servoblaster" and then run servoblaster.ko by this command:
sudo insmod servoblaster.komanually? Or did you restart your RPi?
Code: Select all
Was there any message after you run insmod command?
Did you check dmesg and syslog for any error messages related to servoblaster?
RomanG wrote:Hi johnnyz77,Roman, please ignore my comments about battery and ground etc.
I am a total newbie to electronics and am making lots of mistakes as I learn.
I thought battery negative line was = ground. But of course this is not the case!!
No worries, everyone was green at some point in time.
Actually, in this case, battery negative needs to be connected to RPi ground (GPIO pin 6) and servo ground wire (black or brown depending on servo manufacturer) needs to be connected to RPi ground as well. So all grounds need to have common reference.
Servoblaster can be now run in two modes, in kernel mode (older, more mature method) and in user mode as a daemon (new method).
When running in kernel mode, the servoblaster device in /dev directory needs to be created, this is done with help of the script /lib/udev/servoblaster as described in servoblaster.c source code. When you install servoblaster and want to run it in kernel mode, you need to create that script and run it manually or restart the RPi and then it is run automagically at startup. Then you can load the servoblaster module and start using the servoblaster. Without device file (in /dev directory) it would not work.
When running in user mode, you only run servod daemon (as sudo) and it will create /dev/servoblaster device and you can then use it right away.
See this post... you need to try "sudo ./servod --pcm"johnnyz77 wrote:One last thing.... even when I play an audio file from the command line ie
sudo aplay 12345.wav
the servos buzz/vibrate uncontrollably and go into an invalid state as described above.
Perfect, that should work fine.johnnyz77 wrote: Thanks for the clarification Roman!
Regarding the wiring of ground, I have The Pis ground (GPIO 6) going into a breadboard line, and I have all servo ground (black) and battery negative, going in to the same breadboard row. Is this the way to do it?