unclear question

Viewed 30 times

I have a couple of servos connected to an Arduino board, which is in turn connected to a Raspberry Pi (4) using an ethernet cable. Just wondering, what’s the best way control the servos on Raspian, any examples or tutorials would be highly appreciated.

 New contributor

put on hold as primarily opinion-based by MilliwaysjoanFredIngoDmitry Grigoryev 1 hour ago

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

  • Do want Rpi to control the Arduino’s, or do you want to throw away the stupid Arduinos, and let the much more intelligent, beside more powerful, Rpi to take care of everything? If you are not very sure how Rpi can control servos, I would suggest to search AdaFruit’s PWM/Servo breakout/module which can control as many as 16 DC/BLDC/Stepper, and also Servos. (1) learn.adafruit.com/16-channel-pwm-servo-driver, (2) adafruit.com/product/815. AdaFruit usually has newbie friendly tutorials. Of course you can also google SparkFun/eBay/AliExpress/Amazon for cheaper versions. – tlfong01 8 hours ago    
  • @tlfong01 I already know how to use a servo driver to interface between rPi and servos. But this time I have a working system of rPi and sensor and another working setup of arduino and servos. It would save a lot of work if I could getting rPi to control the servos, similar to that of servo driver. – TelKitty 8 hours ago
  • I see, so your user requirement boils down to “How can one Rpi talk to multiple Arduino’s through Ethernet”. What you do NOT want include the following: (1) WiFi, (2) UART (RS232/485) , (3) I2C, (SPI). (4) 433/900Mhz, … Then you may like to consider the following: (1) http, (2) ftp, (3) tcp, (4) udp, I am using Rpi4B python 3.7.3 which has newbie friendly TCP socket / UDP modules. I assume you don’t use Android devices at the front end, … – tlfong01 7 hours ago   
  • @tlfong01 Would consider other communication methods, but pins on rPi and arduino are used for sensors and actuators. I already know how to access arduino from rPi. Ideally, I would like to use the same program to capture data on rPi sensors to decide what the servos on arduino should be doing. – TelKitty 6 hours ago
  • I don’t understand what you are saying: “I already know how to access arduino from rPi”. Do you used Ethernet cable as mentioned in your question, and if yes, is it at http/ftp/tcp/udp level? Or as you comment: ” Would consider other communication methods”. What “other” methods have you in your mind? I don’t understand what your “program” is doing, read/write GPIO pins for sensors? Are you using C++ or python? For rpi python, which modules do you import, GPIO or GPIOzero? – tlfong01 6 hours ago   

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: