Homework due November 20: LCD Circuit

For this assignment, we were asked to build the LCD circuit and print the numbers sent by Processing onto the LCD. At first, after I assembled my circuit, I uploaded the Hello World example but all I received is 16 white blocks without any word displayed. Because the code in the example cannot be wrong so I thought my circuit must have been wrong. I checked the tutorial in the Sparkfun Kit Guide and realized that I had built my circuit backwards. Luckily, when I rebuilt the circuit, it worked perfectly.

When I used the Serial Display example to print the numbers sent from Processing, I discovered that lcd.write() prints characters, not numbers, while lcd.print() prints numbers. Also, initially, I did not declare a variable for what I want to print, for example, byte numbers; and then use lcd.print(numbers) to print it. Instead, I used lcd.print(Serial.read()) and the numbers changed very slowly. Thus after that, I changed my code to resemble the code in the Dimmer example, which declares a variable for the numbers sent from Processing, and the LCD reflected the change instantly. 

Arduino code: 

Processing code: 


Leave a Reply

Your email address will not be published. Required fields are marked *