Due to a VS bug 10.11+ versions require you to manually tell visual studio to color code your arduino code.
1. Open the Visual Studio Tools>Options
2. Navigate to Text Editor>File Extensions
3. Add the INO and PDE extensions setting the Editor to "Microsoft Visual C++" for each
4. Click OK and re-open any open sketch code files
This is what you should see once you have made the changes
Note: Users of versions earlier than 10.11 who encounter random color code failings should remove the extensions from the above list. Click OK and then re-add them as shown above
使用库: http://www.visualmicro.com/post/ ... -Visual-Studio.aspx
How to add an Arduino library using Visual Studio
by Visual Micro 27. 十月 2011 05:46
Add an arduino Library using the project menu
The 2nd entry on the Project menu allows libraries to be added
When adding libraries the #includes are automatically added to the master .pde source.
You must click "Save" before the intellisense will detect the new libraries.
Optionally toggle the library sources in/out of the visual studio project using "Project>Show all Arduino files".
Including the actual library sources codes does not break the compiler but allows the libraries to be explored using the Visual Studio object browser