help

who can help me?who can make the marco controled by the keyboard?just like mum0 for marco 0?

viewtopic.php?f=32&t=6286

i think i have described clearly,i just want to use the keyboard to control the ssc 32,but the LynxTerm just allows me use the mouse to click the marcos,it’s really inconvenient,Shortcuts is needed.

You just can’t just connect a terminal (LynxTerm or other) program to the SSC-32 and control it from the keyboard. To do this you are going to have to add a microcontroller between the PC and SSC-32. The microcontroller will receive commands through a terminal program and translate that into whatever commands you want to send to the SSC-32. This requires some programming on your part.

With robotics, you just can’t usually get away from needing a microcontroller. What you want to do, and so much more, can be accomplished by adding a microcontroller between the PC and SSC-32. The added beauty of this is that it’s extremely easy to do this wireless also, using BlueTooth, ZigBee, or some other method. I already have this setup for communicating with my Arduino and it works perfectly!

The Basic Atom and Atom Pro are extremely easy to program and are great ways to jump into learning to program for robots and other uses.

Here is exactly the type of program you are looking for, which I am developing for my Arduino and Sanguino:

[code]/*
http://www.arduino.cc/en/Tutorial/SerialCallResponse

Created 26 Sept. 2005
by Tom Igoe
Modified 14 April 2009
by Tom Igoe and Scott Fitzgerald

Modified 20-May-2010
Dale Weber [email protected]
Added commands to read sensors and send readings back through UART.
*/

#define IR_MAX 3
#define PING_MAX 2
#define PING_START 4

int inValue = 0; // Incoming serial byte
byte ir[6], ping[8]; // Sensor data

// Establish contact with the master controller
void establishContact() {
while (Serial.available() <= 0) {
Serial.print(’!’, BYTE); // Send a ‘!’
delay(300);
}
}

byte getByte (void) {
unsigned int i = 0;

while (Serial.available() > 0) {
// Loop until a byte is available
i++;

delay(5);
 
if (i > 65000)
  i = 0;

}

inValue = Serial.read(); // Get the byte

return inValue;
}

// Read distance from a PING ultrasonic sensor
// Code taken from the Arduino Playground. Returns distance in cm.
byte read_ping (byte pin) {
unsigned long echo = 0;
unsigned long ultrasoundValue = 0;

pinMode(pin, OUTPUT); // Switch signalpin to output
digitalWrite(pin, LOW); // Send low pulse
delayMicroseconds(2); // Wait for 2 uS
digitalWrite(pin, HIGH); // Send high pulse
delayMicroseconds(5); // Wait for 5 uS
digitalWrite(pin, LOW); // Hold off
pinMode(pin, INPUT); // Switch signal pin to input
digitalWrite(pin, HIGH); // Turn on pullup resistor

echo = pulseIn(pin, HIGH); // Listen for echo
ultrasoundValue = echo / 58.138; // Convert to cm

return ultrasoundValue;
}

// Read Sharp GP2D12 IR sensor.
// Code taken from the Arduino Playground. Returns distance in cm
byte read_gp2d12 (byte pin) {
int tmp;

tmp = analogRead(pin);

if (tmp < 3)
return -1; // Invalid value

return (6787.0 /((float)tmp - 3.0)) - 4.0;
}

void setup() {
// start serial port at 115200 bps:
Serial.begin(115200);
establishContact(); // Send a byte to establish contact until receiver responds
}

// Responds to commands from the master controller and updates sensor readings
void loop() {
byte errorNr, sensorNr; // Array index, Sensor number

errorNr = 0;

// If we get a byte, process it
if (Serial.available() > 0) {
  // Get incoming byte:
  inValue = Serial.read(); 

  // Process master controller commands
  switch (inValue) {
    case 'I':
    case 'i':
        // Read IR sensor
        sensorNr = getByte();
        
        Serial.print(ir[sensorNr], BYTE);

        break;
    case 'P':
    case 'p':
        // Read PING sensor
        sensorNr = getByte();  

        Serial.print(ping[sensorNr], BYTE);

        break;
    case 'R':
    case 'r':
        // Send all current sensor readings
        // Send header
        Serial.print(IR_MAX + PING_MAX, BYTE);
        Serial.print(IR_MAX, BYTE);
        Serial.print(PING_MAX, BYTE);

        // Send IR sensor readings
        for (sensorNr = 0; sensorNr < IR_MAX; sensorNr++) {
          Serial.print(ir[sensorNr], BYTE);
        }

        // Send PING sensor readings
        for (sensorNr = 0; sensorNr < PING_MAX; sensorNr++) {
          Serial.print(ping[sensorNr]);  
        }
        
        break;
    default:
      // Error - notify master controller
      errorNr = 255;
      break;
  }

  if (errorNr != 0) {
    // Send error code back to master controller
    Serial.print(0xFF, BYTE);
    Serial.print(errorNr, BYTE);
  } else {
    // Read IR sensors
    for (sensorNr = 0; sensorNr < IR_MAX; sensorNr++) {
       ir[sensorNr] = read_gp2d12(sensorNr);
    }

    // Read PING sensors - Digital pins 4 through 11 
    for (sensorNr = 0; sensorNr < PING_MAX; sensorNr++) {
      ping[sensorNr] = read_ping(sensorNr + PING_START);  
    }

  delay(50);
}

}
}
[/code]
You can do the same thing extremely easily using the Basic Atom or Atom Pro.

8-Dale

Looks like lynxterm only supports mouse actions. You might look at autoit or other applications that possibly make keyboard shortcuts to mouse actions.

Look at Docklight, you can create scripts to be sent by keys. Search this forum for previous discussions.

Alan KM6VV