Reputation: 235
I'm trying to set up so that I don't have to type in these two commands after boot up (PI as user):
1) sudo CHMOD 777 /dev/ttyAMA0
2) sudo stty -F /dev/ttyAMA0 cs8 9600 -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echoctl -echoke noflsh -ixon -crtscts
Thanks
Upvotes: 0
Views: 1812
Reputation: 15929
You could add it to the end of /etc/rc.local,
CHMOD 777 /dev/ttyAMA0 &
stty -F /dev/ttyAMA0 cs8 9600 -brkint -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echoctl -echoke noflsh -ixon -crtscts &
Upvotes: 1
Reputation: 306
You can add your script executable command to the bottom of .bashrc
that will run your script every time you log in.
If you are looking for a solution that works on bootup to the console, take a look at this link.
If you want a script to run when you boot into the LXDE environment, you could take a look at this Raspberry Pi forum post.
https://raspberrypi.stackexchange.com/a/8735
Upvotes: 1