-1

So I already have a SSH connection working but I'm looking for a command that can write a number like '1' into the console on the raspberry pi.

Thanks Sabifa

Sabifa
  • 1
  • 2

1 Answers1

0

Have tried echoing it out to your terminal?

    echo 1 > /dev/pts/0 

Remember that (just about) everything has a device file, that can be redirected to. :)

yaquaholic
  • 152
  • 1
  • 11
  • Hi thanks for that it worked! Do you know if it can automatically press enter after the 1? I´m a real noob in this ssh communication thing^^ – Sabifa Feb 01 '17 at 08:39
  • Could you one up my answer please? I am trying to gain enough credits to hit 15! Many thanks and glad i answered your question. – yaquaholic Feb 08 '17 at 00:45
  • Sabifa, what are trying to do? It will probably be much easier to write it into a script and automate when it run. – yaquaholic Feb 24 '17 at 16:35
  • I have a led game running on my pi. This game needs User Inputs. For now, I give the inputs via a keyboard Input but with the iot a Smartphone control for this game would be nice. My program is used to do something If the numbers from 1 to 9 are pressed. So I thought it would be the easiest way to send a number, ie. a one via something like a ssh connection. – Sabifa Feb 25 '17 at 18:04