Using libbulldog with servos seems to crash my entire BBB

13 views
Skip to first unread message

do...@theironyard.com

unread,
Apr 18, 2016, 3:54:20 PM4/18/16
to libbulldog
Hi,

I'm new to BeagleBone and libbulldog. I'm trying to write a simple program to control a servo. 

I have the servo hooked to the 5v (P9_7) and ground (P9_1). I've tried connecting the signal to P8_13 and P9_14. If I plug the power in while the board is powered up I can hear the servo (I think) reset itself so I know it can power the servo.

If I use the sample program, when I run it I see the servo move as expected. However, once Java reaches the line where the servo is instantiated (Servo servo = new TowerProMicroSG90(pwm); ) it seems to hang. The servo DOES move, but none of the corresponding System.out.println messages are printed. Also, the program never exists and the entire BBB simply hangs. Any SSH sessions I have open stop responding so I can't kill the process. I have to power down the board and power it back up. 

When I connected the servo I did not use any resistors. But, based on a tutorial from Adafruit (for Python) I tried sticking a 1k ohm resistor on the positive. That prevented the servo from turning at all, but then the Java program didn't hang the BBB. I tried progressively smaller resistors, but nothing I had was small enough to let the servo turn. I think the lowest I tried was 220 ohm.

Anyhow, electronics are not my strong point, but I can't figure out why the Java code seems to be killing the BBB.

Any thoughts?

do...@theironyard.com

unread,
Apr 25, 2016, 7:51:52 AM4/25/16
to libbulldog
Hi all, if anyone has any feedback on this, it would be really appreciated. I'm teaching a bootcamp style class on Java and I thought that working with something like sensors and servos on the BeagleBone would be a fun and inspirational project. It seems I can do things other than servos, but servos would be a lot cooler. 

Failing direct feedback on my question, are there any working examples/tutorials using libbulldog that I could read online? I've haven't been able to find any specific to libbulldog.

Thanks!
Reply all
Reply to author
Forward
0 new messages