Hello. I'd like to ask you about serial communications.
I'm trying to print the value of the current ADC on a serial monitor using the Serial.print() function.
I'll google it. Serial.From Begin (speed, config), I found that config's default settings are 8 data, no parity, and 1 stop bit.
I understand that when you print out a value on a serial monitor, you can only express it up to eight bits.
If it's eight bits, you'll only be able to print numbers from 0 to 256 in the Serial.print function, but the short type and the range of values are the same. After 32,767, there was an overflow, and any negative value was output.
I really want to know why. It's so strange that I think I misunderstood the data on the Internet.
The current code receives the ADC value of 10 bits, and stores the ADC value in the float type variable and outputs it on the serial monitor.
I know that we need to send 8 bits for serial communication, so I'm going to change the float type to the 8-bit data type, the Char type.
When I googled it, is it possible to change it from float type to char type, or is it a problem that can be solved by just changing the shape?
I have a question here. If the ADC value is 1023, is it printed as 255 instead of 1023 when the shape is changed to Char?
Thank you for reading it. Please give me an answer.