|CS252 Course Wiki: Fall 2015||Guess »
Troubleshooting and FAQ
Problem: Wires from the keyboard’s cable can have colors not corresponding to the Arduino Instructional Page
Solution: The first step to take is of course to try to plug the wires in the right pin port as written on the Arduino Instructional Page. If that does not work, it must be that the colors of the wires are not matching the wiki. The only solution is to try plugin-in manually all the cables in the pin ports until the keyboard is finally available (the keyboard’s LEDs will light up) and the serial monitor should work correctly.
Problem: Screen does not overwrite previous data
Solution: The screen needs to be cleared before a string can be printed. So if you want more than one string printed, they would have to be printed in one go. You cannot print a string and then print another one in a different location without clearing the whole screen. To clear out the screen of anything, use clear().
Problem: The first letter of my string does not print or the word does not print correctly.
Solution: Use the following code to help you write a string on the screen. This example should be used every time you want to write something on the screen.
Here is how the code should be:
char* example = "This is a simple example of what will be printed"; glcd.begin(0x18); glcd.clear(); glcd.display(); delay(10); glcd.clear(); delay(10); glcd.drawstring(0, 0, example); glcd.display();
|Page last modified on August 31, 2012, visited times|