A char is only an 8 bit data type, so you will not get readings higher than 255 with analogvalue typed that way. As @BDub said, that should be typed as an int
1 Like
A char is only an 8 bit data type, so you will not get readings higher than 255 with analogvalue typed that way. As @BDub said, that should be typed as an int