1

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.

3
  • 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
  • 1
    I could use it to make decisions based on type - why do you even need to? – Nick Gammon Apr 11 '16 at 23:46