just a tip on diagnostics with PWM. Ignore servos for a while, because unless you have a servo connected you’re not going to know if your code works, so just use the DMM to get working code, then move to servos. So get the DMM ready, and prove you can measure 5v power on a header somewhere, then connect it to the PWM signal on a socket. In your code, you can set up a loop that runs constantly and toggles between 0%, 50% and 100% duty cycle on any PWM frequency you want, and changes step every say 4 seconds. That way you should see on your DMM a point when there’s 0 volts, some point when it is showing a voltage of 2.5v (roughly 50% pulse width, averaged out), and a period that it should show 5v, then it should go back to 0v as the looping continues.
I am working with the same PWM device on a Jetson Nano and I used the following video to get it working. As you are likely running Linux on your BeagleBone then this video might just be a good starting point for you. It is almost 1 hour long but he takes you through the whole process on how to install the drivers on your machine and then shows you code to control the servo’s. This is part of a series of videos on using the Jetson Nano for facial recognition but this one is aimed at setting up the servos. You can ignore the Jetson Nano wiring part as your cape comes pre-wired. Skip to the code bit.
Hello…I thought for some reason the adafruit_servokit would work on the BBB. It does not. I am sure there are many reasons why, now, it does not work but I watched over the video.
That fellow usually makes good videos. I remember his BBB videos back in the day. I got a GPS working a long time ago w/ one of his videos.
I am not completely sold that my bus is available. I used config-pin on the i2c-2 bus and it told me in reply on the console that it was already configured as i2c. Then, I tried w/ sudo i2cdetect -y -r 2 and nothing was returned on the detection. So, it is difficult to say right now.
The error was Value Error: No i2c device at address: 40.
Seth
P.S. There was a bunch of errors but that was the end result of the error(s). I will try to run the command again tomorrow to get you a better idea of what I am dealing w/ on my end, i.e. what exactly these errors are saying.
Hello…I looked through some older ideas already but they are just that, they are older ideas. I know the premise is still the same and it is the same chip (PCA9685).
I will keep up w/ what I have so far and add to it in time.
Hello…I will attempt to learn more in time w/ the datasheet. If and when I have some exact hits on questions, I will attempt to relay one or two at a time to you in case you are still available for questioning.
Seth
P.S. Thank you, guys. I appreciate the time and effort.
Seth, I am no expert on linux nor on capes, but why do you say they are just older ideas? Surely they can help articulate what you need to do to get a working system - and they may not be “exact recipes” telling you what version of what you need to install, but they should give you the information you need to get the fundamentals working (or ask questions about what a newer alternative or newer version may need). Perhaps that’s again just a misunderstanding of what you mean, but to discount those things would seem premature?
You are right. See, the premature part would be me jumping in on this Cape w/out any prior knowledge on the PCA9685. I am definitely not an expert on the PCA9685 so far but this might change b/c of this Cape.
…
See, I really enjoy the Capes you all produced and mfg. in the USA. I have been able attend Maker Faires w/ one of the Capes produced by GHI, i.e. the MotorCape. W/ the help of a person on Freenode #beagle, I was able to better work my Cape and BBBW to promote some other findings I was learning about at that point.
Anyway, it seems like I am starting over w/out thinking of how long it actually took me to understand the workings of the Cape, the MotorCape, how to program it, and how to debug the errors I received.
Seth
P.S. I have had this Cape for only a short period but I feel as though I am learning slowly more than just how to promote the findings of the PCA9685 from the datasheet. I feel as though I am learning how to interpret the datasheet to think in a computational way. This is outside of trying to make things work. So, even though it may seem like I am complaining at times or lazy, I am taking in a lot right now w/ all my projects and Capes. I found recently a BELA Cape too. This does not have anything to do w/ GHI but it is also a neat Cape for the BBB and like boards. @Brett, thank you for replying. It is nice to know some people still reply. Oh and about the last idea…some people have put in over three entire libraries or more to make things work “out-of-the-box” w/ the PCA9685 and the BBB. It will just take time on my end.