Arduino Stack Exchange is a question and answer site for developers of open-source hardware and software that is compatible with Arduino. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I found this post and implemented the code in a separate classed and then passed different variables to it in an attempt to get the type name printed to serial.

The code compiled and worked fine but i get the following strange output:

For type int I get Fn on the serial monitor
For String I get ;y on the serial monitor

If I don't make a type using MAKE_TYPE_INFO(type) then try TYPE_NAME() I don't get unknown printed on the serial monitor. I get .

All this weirdness is consistent and I could use it to make decisions based on type but why do that if their is a solution.

share|improve this question
1  
Can you show us your full code? The example you link to works fine for me. – Majenko Apr 11 '16 at 21:05
1  
Also, are you sure you don't just have the wrong baud rate selected? – Majenko Apr 11 '16 at 21:07
    
I could use it to make decisions based on type - why do you even need to? – Nick Gammon Apr 11 '16 at 23:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.