I can understand the “10” value being printed as a colon “:” character. Check the ASCII table out, and you’ll see ! http://www.asciitable.com/ I was trying to assist your learning in one way but didn’t really focus on the end result (a generic string to the display) which is why I didn’t point you to that solution first. Here’s a couple of related tips:
Debug.Print("My value is = " + MyVar.ToString());
// will show the string in the debugging window of Visual Studio - one of the best features of netmf
String myString = "Value: " + MyVar.ToString();
// can then be used to output to display and to debug output if you like!
To understand pins, there are usually pin mappings (enumerations) that GHI provide. And Visual Studio can help too. But for the best help, we’d need to know whether you created a Gadgeteer project or a regular netmf Console project - but assuming Gadgeteer (since that’s what the ProgramStarted() in your earlier code implies), here’s how I’d do it for a Cerb Bee Gadgeteer project.
By default, you get an inclusion of the “GHIElectronics.Gadgeteer.FEZCerbuinoBee” reference, and you need to add “GHI.Hardware.FEZCerb” manually. Then, make sure you add a “USING” statement to your program for the new reference (and Microsoft.Spot.Hardware) you can then start typing your command and have VS help along the way… I’ll list what I’d press as I type in <> brackets
at that point you can see the enumerations of the pins from the generic Fez Cerb - pick what one you want, and you’re good to go !
Be warned, the OutputPort approach we just went through is NOT a Gadgeteer method nor is it Gadgeteer “safe” to share with modules if you wanted to use some of the pins that are not used by a module plugged into a socket. We’re just keeping you moving here, right, not teaching you everything at once?
Analog input is pretty much the same as the OutputPort example. Let VS help you, so start
… and then you can see the AnalogIn channel enumerations. Here’s where it’s tricky. You need to match the Analog Channel to the individual pin you want. https://www.ghielectronics.com/docs/46/cerb-family describes the mapping for you that should help.
hope this all helps !