ok im new to arduino and having a really hard time trying to convince arduino to do what i want, so please correct me if i do anything wrong
so i have Win7 64bit & arduino-1.0.5-r2 - software (tested on multiple computers with unsucessfull results)
Arduino UNO & arduino Nano - hardware (tested same thing on both devices with same unsucessfull results)
reproduction of problem:
1/ install driver (from arduino-1.0.5-r2 folder)
2/ port and arduino selected in menu correctly
3/ load code check & upload correct too
4A/ ctrl+shift+M open up a serial monitor
5A/ type "on" without quotes, send COM4 everything works led13 is up and shining
4B/ commandline (serial monitor is closed, so port is not occupied)
5B/ type "echo on > COM4" without quotes hit enter nothing happends
4+5C/ i also tryed php fopen COM3, but results were the same as previous
so that is basically my problem i am unable to communicate with arduino in any else program than serial monitor
i have checked that serial port is 9600 baud on both sides, and virtually everythinkg and nothing works i am lost and cant find a working solution, please help, advise working solution to this
source code:
void setup()
{
pinMode(13, OUTPUT); // Set pin 13 as digital out
Serial.begin(9600); // baud rate
Serial.flush();
}void loop()
{
String input = "";
while (Serial.available() > 0)
{
input += (char) Serial.read();
delay(5);
}if (input == "on")
digitalWrite(13, HIGH);if (input == "off")
digitalWrite(13, LOW);
}
trying to make work:
echo on > COM4