I'm trying to controll my Roomba vacuum cleaner by a RaspberryPi. But still having some problems.
I need to send a special command to the serial interface to start the vacuum cleaner. If I do this in the Bash it works fine:
echo -n -e "\x87" > /dev/ttyAMA0
If I put this in my shell script it does not work any more:
#! /bin/bash
echo -n -e "\x87" > /dev/ttyAMA0
Any idea?
Have you made the script runnable? I.E. chmod +x script.sh
. Also make sure you are running the script correctly ./script.sh
. For more help see this website.