Show Posts
Pages: [1]
1  Topics / Home Automation and Networked Objects / rc-switch and bash commands on: January 22, 2013, 05:51:17 pm
Hello.
First of all this concept was main reason i ended up buying arduino smiley-sad

Im trying to set up router with custom firmware (tomato based) and on that router device is recognised as /dev/ttyACM0

For example
Code:
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableTransmit(10);
}
void loop() {
mySwitch.switchOn("11001", "01000");
}

works perfect with my setup - device connected to receiver responds and turns on.
The question is - how can i control that from bash on router.
I tried with:

Code:
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
void setup() {
Serial.begin(9600);
mySwitch.enableTransmit(10);
}
void loop()
{
}

uploaded to arduino
and echo command to arduino:

echo "mySwitch.switchOn(\"11001\", \"01000\");" > /dev/ttyACM0

but it doesnt seem to work
arduino is blinking and RF transmitter is not smiley-sad
any sugestions for arduino and linux newbie?
Thank You in advance.
Pages: [1]