Robot with 10 servos + nodejs


#1

hi,
i’m building a robot with 10 servos (makeblock servo kit) and a megapi.
i can connect the 10 servos directly to the servo-pins (A6 - A15), without using the RJ25-hat.
in mblock i can move all 10 servos by using “set servo A6 angle 90” in stead of “set servo Port6 Slot1 angle 90”. this works perfectly.

in arduino the difference between the 2 ways of controlling a servo looks like this:
servo_6_1.attach(port_6.pin1());
servo_60.attach(60);
servo_6_1.write(90);
servo_60.write(90);

but i want to control the robot with nodejs running on a raspberry pi. it works for the pins associated to the ports 6, 7 and 8, slots 1 and 2.
in nodejs i use “bot.servoRun(port,slot,level)”, so that corresponds to the port one can use for connecting servos to the RJ25-hat.

does anybody know how i could control the servos connected to the others pins (A06, A07, A14, A15), using nodejs?

thanks!


#2