Go Down

Topic: Ascii value to char (Read 419 times) previous topic - next topic

gloob

Hallo,

Weiß jemand von euch wie ich zufällig einen Ascii value in einen char parsen kann?
Angenommen ich habe eine 109 und möchte diese gerne in ein "m" parsen.

Serial.print gibt mir leider nur die 109 aus und nicht das m was ich benötige.

Vielen Dank schonmal
Stefan
http://www.panoduino.de

uwefed

http://arduino.cc/en/Reference/CharCast
meinchar = char(asciivalue);

oder
http://arduino.cc/en/Serial/Print
Serial.print(byte(78)) gives "N" (whose ASCII value is 78)
Serial.print(78, BYTE) gives "N"

Grüße Uwe

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview