Forum >Replies by mva
Replies (3)
  • You Reply: 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?
  • You Reply: 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?

  • You Reply: 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.