Based on comments under question no one seems to really know the answer.
So the short answer is: IT'S IMPOSSIBLE - to use Arduino IDE serial monitor to send raw data.
@Edgar_Bonet submitted hint for linux users
@jsotola suggested to use PuTTY, but no additional info on how to do that. Short glance at settings and I couldn't find the way to achieve raw input.
After some additional googling i found some reading where I found program called RealTerm which does the job.
Simply setup your port on Port card and then hit Change button.
On card Display change Display As From ASCII to your prefered format, such as Hex(space)
Then swich on card Send - type your number into input box left to button Send Numbers and press that button
Thats all
The input box accepts decimal value from 0 to 255, or a hexadecimal value, which are prefixed with either a "0x" or a '$'. Each value is separated by space.
Following line is correctly accepted: "255 0xff 0xFF $ff $FF"
Yet another useful tool is Serial Port Monitor. With this you can observe what is really transmitted on line without relying on the interpretation of you application.
Usage is really simple: click white file icon, or Session > New session or press
Ctrl+N
Choose port and vizualizer and click Start monitoring... that's it.
I found most useful mode "Dump view"
3.14159265358
) you are sending a number. But you're wrong. Consequently, you will have to "implement some silly translation from character value to int", or learn how to use your available tools to do this for you.xxd -r -p > /dev/ttyACM0
and then just type hex in the terminal.if(inByte == '1') // do stuff