Lynxmotion Tech Support

www.lynxmotion.com
It is currently Sat May 25, 2013 4:49 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Thu Sep 03, 2009 10:44 am 
Offline
Lynxmotion Founder
User avatar

Joined: Mon Oct 31, 2005 10:46 am
Posts: 9325
Location: my quiet place
Hope this helps!

http://learnhub.com/lesson/7437-moving- ... an-arduino

_________________
Jim Frye, the Robot Guy
http://www.lynxmotion.com
I've always tried to do my best...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 03, 2009 5:51 pm 
Offline
Roboteer
User avatar

Joined: Sun Feb 08, 2009 7:50 pm
Posts: 93
Location: Mesa, AZ
Nice Find!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 05, 2009 2:16 am 
Offline
Roboteer

Joined: Wed Apr 09, 2008 9:39 pm
Posts: 26
I have source for driving an SSC-32 from an Arduino, the Arduino wireless over XBee to the remote SSC-32. It's trivially easy, but I can post it if you like.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 05, 2009 7:01 pm 
Offline
Roboteer
User avatar

Joined: Sun Feb 08, 2009 7:50 pm
Posts: 93
Location: Mesa, AZ
Every little bit helps.


Top
 Profile  
 
PostPosted: Mon Sep 20, 2010 11:36 am 
Offline
Robot Guru

Joined: Thu Jul 13, 2006 10:10 pm
Posts: 2226
Below is some of my arduino test code (for version 18) that can interface with the ssc-32. The ssc-32 TTL tx/rx/ground is connected to the arduino rx/tx/ground pins. The ssc-32 board probably can be powered from the arduino +5v if needed (but no servos!). The below code can take a control string entered in the arduino serial monitor and send it to the ssc-32. The bottom code is for use with the arduino/ethernet shield combo. HTTP request are sent from a web page to the arduino, which processes the request and sends the control strings to the ssc-32 via its serial output (and also to the serial monitor. This is part of my routerbot testing.

Code:
//zoomkat 9-9-10 simple delimited ',' string parce
//from serial port input (via serial monitor)
//and print result out serial port
// CR/LF could also be a delimiter
// http://www.arduino.cc/en/Tutorial/TextString for WString.h

#include <WString.h> //provides easy string handling
String readString = String(100);

void setup() {
   Serial.begin(9600);
        }

void loop() {

        //expect a string like wer,qwe rty,123 456,hyre kjhg,
        //or like hello world,who are you?,bye!,
        while (Serial.available()) {
        delay(10);  //small delay to allow input buffer to fill
       if (Serial.available() >0) {
        char c = Serial.read();  //gets one byte from serial buffer
        if (c == ',') {break;}  //breaks out of capture loop to print readstring
        readString.append(c); } //makes the string readString
        }
     
      if (readString.length() >0) {
      Serial.println(readString); //prints string to serial port out
     
      readString=""; //clears variable for new input
      }
   }


Code:
//zoomkat 5-24-10
// http://www.arduino.cc/en/Tutorial/TextString for WString.h

#include <WString.h>
#include <Ethernet.h>

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; //physical mac address
byte ip[] = { 192, 168, 1, 102 }; // ip in lan
byte gateway[] = { 192, 168, 1, 1 }; // internet access via router
byte subnet[] = { 255, 255, 255, 0 }; //subnet mask
Server server(84); //server port

String readString = String(100); //string for fetching data from address

///////////////////////
 String teststring = String(100);
 String finalstring = String(100);
 String flag = String(2);
 int ind1 = 0;
 int ind2 = 0;
 int pos = 0;
 //////////////////////

void setup(){

//start Ethernet
Ethernet.begin(mac, ip, gateway, subnet);
server.begin();

//enable serial data print
Serial.begin(9600); }

void loop(){
// Create a client connection
Client client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();

//read char by char HTTP request
if (readString.length() < 100) {

//store characters to string
readString.append(c);
}

//if HTTP request has ended
if (c == '\n') {

///////////////
//Serial.println(readString);
//readString looks like "GET /?-0p1555-1p500t1000 HTTP/1.1"

  if(readString.contains("-")) { //test for servo control sring
  readString.replace('-', '#');
  pos = readString.length(); //capture string length
  //find start of servo command string (#)
  ind1 = readString.indexOf('#');
  //capture front part of command string
  teststring = readString.substring(ind1, pos);
  //locate the end of the command string
  ind2 = teststring.indexOf(' ');
  //capturing the servo command string from readString
  finalstring = readString.substring(ind1, ind2+ind1);
  //print "finalstring" to com port;
  Serial.println(finalstring); //print string with CR
    }
  ////////////////////////
  //GET /?Slidervalue0=1800&Submit=Sub+0 HTTP/1.1
  if(readString.contains("Slidervalue")) {
  ind1 = readString.indexOf('u');
  ind2 = readString.indexOf('&');
  finalstring = readString.substring(ind1+1, ind2);
  finalstring.replace('e', '#');
  finalstring.replace('=', 'p');
  Serial.println(finalstring);
  }
  ///////////////////
 
  //now output HTML data header
  client.println("HTTP/1.1 204 Zoomkat");
  client.println();
  client.println();
  delay(1);
  //stopping client
client.stop();

/////////////////////
//clearing string for next read
readString="";
teststring="";
finalstring="";
 
}}}}}

_________________
Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
http://youtube.com/watch?v=pWjMvrkUqX0
http://youtube.com/watch?v=qfyRA-g1nhI
http://web.comporium.net/~shb/S2000video.htm


Top
 Profile  
 
PostPosted: Mon Sep 20, 2010 1:12 pm 
Offline
Roboteer
User avatar

Joined: Wed Jun 10, 2009 10:33 am
Posts: 287
Location: Boston, MA
From the post,
Quote:
There are two separate powering options that you will have to consider. The first is the power for the board, and the second is power for the servos. I highly recommend powering the board separately from the servos. For powering the board, I give the SSC-32 +5V from the Arduino. For powering the servos, I give it about 13V, which changes to about 10V under load. However, it is your choice about how you want to power it.

13V? I see dead servos...

dj

_________________
Heard in the workshop: PEBRAC...


Top
 Profile  
 
PostPosted: Tue Nov 20, 2012 3:46 pm 
Offline
Roboteer

Joined: Tue Nov 20, 2012 3:28 pm
Posts: 7
Thanks for sharing.

I'm building a tetrapod using a SSC 32 board and Arduino Mega. Soon I will post a link to my blog.


Top
 Profile  
 
PostPosted: Wed Nov 21, 2012 8:24 am 
Offline
Site Admin
User avatar

Joined: Fri Aug 31, 2012 7:45 am
Posts: 529
Perhaps start a new thread? Looking forward to seeing it.

_________________
Coleman Benson
Lynxmotion
Imagine it. Build it. Control it.™
http://www.Lynxmotion.com


Top
 Profile  
 
PostPosted: Wed Nov 21, 2012 4:32 pm 
Offline
Roboteer

Joined: Tue Nov 20, 2012 3:28 pm
Posts: 7
CBenson, I've taken your advice and I've started a post in the multi-leg forum.

Thanks for the support and interest.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group