Two way serial communication with raspberry Pi (radio project)

Here is my scenario:

Arduino is connected to my Windows Desktop PC. This is where I write the Arduino code.
If I use the Serial Monitor and run the sketch, everything works fine. In the serial monitor I can fill variable "maxNumb" and the arduino sketch does what I want.

When I connect arduino to my Raspberry pi computer (the target system for my Internet radio):

  • Raspberry can receive tuner values between 1 and 26 (according to the pot position)
  • I cannot use "echo 40 > /dev/ttyACM0" to change the value of variable "maxNumb".

So the serial communication works from arduino to pi, but not the other way :frowning: