By mva
#2179
Hi!
I bought 4wd platform, Romeo controller and APC220 around month ago.
I have troubles withh APC220.
What I do:
1. Install drivers on PC.
2. RF-Magic see both modules.
3. Both modules has same settings (frequency, baud rate, net id, node id)

I use next program [url=http://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_%28SKU:DFR0004%29#PWM_Control_Mode]http://www.dfrobot.com/wiki/index.php?title=DFRduino_Romeo-All_in_one_Controller_%28SKU:DFR0004%29#PWM_Control_Mode[/url] for Romeo. But controller have not action :((

How I can check work of APC220 and found place of malfunction?
By Hector
#2180
Hi Mva,


First, have you made sure the Romeo is working? Try plugging in the Romeo through USB to the computer and testing your program through the Arduino IDE and make sure the robot is responding to serial commands.


If it is working, then try loading a simple program to test the communication between the Romeo/APC and your pc.


Something that requires you to press a button and get a return from the romeo.


Let me know if you need a sample test code, or if you have any other questions



By mva
#2181
Step 1.
Yes, Romeo works right. I upload program for blinking led and it executes correctly.

Step 2.
I upload program for working serial, for example

setup {
      pinMode(13, OUTPUT); 
}

loop {
 
        digitalWrite(13, HIGH);
        char val = Serial.read();
        digitalWrite(13, LOW);
        delay(2000);
}

Led light on, but not off - program waiting for response from Serial..

I send from PC any symbols, but led not light off.



[quote="Hector"]
Something that requires you to press a button and get a return from the romeo.

Let me know if you need a sample test code, or if you have any other questions
[/quote]

What button? And, yes, please post me your sample code.

By Hector
#2182
Hi Mva,


Here is a sample code that should help test your APC Radio. Load the code on to the romeo.
Test it through USB and terminal to make sure it is working
unplug USB and test it with APC radios




Did you try controlling your robot through USB??




[code]

void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT); 
  Serial.begin(9600);
  Serial.println("  Lets test the APC module");
  Serial.println("Press 1 to light the LED, and 2 to turn it off");
  Serial.println("Input: "); 
  digitalWrite(13, HIGH);
}


void loop() {
  if (Serial.available()){
  char input = Serial.read();
  switch (input){
  case '1': //turn led on
  digitalWrite(13, HIGH);  // set the LED on
  delay(100);              // wait for a second
  Serial.println("it works on!!"); 
  break;
  case '2':
  digitalWrite(13, LOW);    // set the LED off
  delay(100);              // wait for a second
  Serial.println("it works off!!");
  break;
}
  }
}

[/code]
By mva
#2183
Yes, I want control robot using APC220. Controlling movement program running on PC. Robot must transmit data from sensors to PC.

I sligtly modified your sample code


[code]void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT); 
  Serial.begin(9600);
  Serial.println("  Lets test the APC module");
  Serial.println("Press 1 to light the LED, and 2 to turn it off");
  Serial.println("Input: "); 
  digitalWrite(13, HIGH);
}


void loop() {
  if (Serial.available()){
    char input = Serial.read();
    switch (input){
      case '1': //turn led on
        digitalWrite(13, HIGH);  // set the LED on
        delay(100);              // wait for a second
        Serial.println("it works on!!"); 
        break;
      case '2':
        digitalWrite(13, LOW);    // set the LED off
        delay(100);              // wait for a second
        Serial.println("it works off!!");
        break;
    }
  } 
  else {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
    delay(100);
  } 
}[/code]


Led blinking - serial not available?

By mva
#2184
All it's OK! After start using serial monitor from arduino IDE, I see responses from serial port. I not understand why it don't work properly, when I used hyperterminal.
Thanks for help

Small question - after some time, PC disconnect link with robot. After power off/power on link reconnect. I think, that power supply fall to 6.0V when motor works. I am right?
By Hector
#2185
Hi Mva,


It could be that the motors are taking too much current from your supply. You could try using two separate supplies. 1 for motors only, and 1 for everything else.