Arduino Uno+SKPS+SC16A

Talk about Arduino board, sheilds. Sharing Arduino projects, program, problems, solutions, suggestions..... many more, all are welcome.

Arduino Uno+SKPS+SC16A

Postby billykoe » Thu May 02, 2013 10:09 pm

Hi,
Is it possible to connect the Arduino Uno with SKPS and SC16A Servo Controller alltogether?
billykoe
Freshie
 
Posts: 6
Joined: Thu May 02, 2013 10:03 pm

Re: Arduino Uno+SKPS+SC16A

Postby Jonathan Law » Thu May 02, 2013 11:03 pm

billykoe WROTE:Hi,
Is it possible to connect the Arduino Uno with SKPS and SC16A Servo Controller alltogether?


if i'm not mistaken, SC16A need serial communication with microcontroller, UART connection required to send command from microcontroller to SC16A. You can read the user manual for details.
Is possible to combine both SKPS and SC16A with Arduino UNO, by using Sotfware Serial library

http://arduino.cc/en/Reference/SoftwareSerial

It is possible to have multiple software serial ports with speeds up to 115200 bps!
Jonathan Law
Novice
 
Posts: 16
Joined: Tue Feb 26, 2013 10:21 am

Re: Arduino Uno+SKPS+SC16A

Postby billykoe » Fri May 03, 2013 6:57 pm

Will the rx/tx pins connected from the arduino uno to the skps & the servo controller affect each other in any way??
billykoe
Freshie
 
Posts: 6
Joined: Thu May 02, 2013 10:03 pm

Re: Arduino Uno+SKPS+SC16A

Postby Jonathan Law » Fri May 03, 2013 8:16 pm

You can use directly the default tx/rx pin (pin 0 and 1) on arduino board for one application and another application use software serial. By default, the tx/rx pin on arduino board does not need library but software serial need library --> #include<SoftwareSerial.h>
Both serial can function independently and will not affect each other, if does, it might be your coding problem.
Another way will be declare both your UART application in software library instead of using default tx/rx pin,
Your code shall be like this:

CODE: SELECT_ALL_CODE
#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11); // RX, TX for first application
SoftwareSerial myserial2(12,13); // RX,TX for second application


void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(57600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  Serial.println("Goodnight moon!");

  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial2.begin(4800);

void loop()
{
//receive and transmit functions
}


Important reminder, software serial comes with some limitations, the most critical is if you are using multiple software serial ports, only one can receive data at a time. This will definitely slow down abit your overall system if both application run in parallel. Anyway, your can try it out come back here to share some experiences.. =)
Jonathan Law
Novice
 
Posts: 16
Joined: Tue Feb 26, 2013 10:21 am

Re: Arduino Uno+SKPS+SC16A

Postby billykoe » Mon May 20, 2013 4:53 pm

For the connection of the hardware, is it like, for example, we only have to connect the arduino's board rx and tx pins to the skps tx and rx pins? And do not no have to connect the rx and tx for the servo controller?
billykoe
Freshie
 
Posts: 6
Joined: Thu May 02, 2013 10:03 pm

Re: Arduino Uno+SKPS+SC16A

Postby robosang » Mon May 20, 2013 8:46 pm

How is the serial data being transmitted to SC16A or SKPS if the wires is not connected? Wireless? :mrgreen:
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Arduino Uno+SKPS+SC16A

Postby billykoe » Mon May 20, 2013 11:59 pm

If that is the case, then how should the hardware be connected? Any examples?
billykoe
Freshie
 
Posts: 6
Joined: Thu May 02, 2013 10:03 pm

Re: Arduino Uno+SKPS+SC16A

Postby robosang » Wed May 22, 2013 9:12 am

what have you did or try?
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Arduino Uno+SKPS+SC16A

Postby billykoe » Wed May 22, 2013 10:53 am

I haven't tried it yet. What i was planning to do is to connect the rx and tx pins onto the pcb and then branch out the tx and rx to the skps and the servo controller. Will this work?
billykoe
Freshie
 
Posts: 6
Joined: Thu May 02, 2013 10:03 pm

Re: Arduino Uno+SKPS+SC16A

Postby gadgetng » Thu May 23, 2013 4:14 pm

i think Jonathan Law has answered your question. Use hardware UART and software UART.
gadgetng
Discoverer
 
Posts: 97
Joined: Tue Jul 24, 2012 11:20 am

Next

Return to Arduino Based

Who is online

Users browsing this forum: No registered users and 25 guests

cron