Time.sleep(betWait) //wait a bit for stringRead timeout This is the python function which sends the strings to the arduino: def serialClear(): ser.write("00clr")ĭef serialWrite(Line1, Line2): serialClear() //clear LCD The commands to get the Raspberry Pi system info in the python script I found them online at click here The python script is written so that it always adds the coordinates before the string I wrote a function which takes two arguments the first argument is the string that will be displayed at 00 (first line of lcd) and at 01 (second line of lcd) String Format: #String (since this is a 16x2 LCD the first number can range from 0-15 X position and the second number from 0 to 1 Y position) The arduino code listens for any strings coming in through the serial port, removes the first two characters which I chose to be the position where to write the string on the LCD and the rest would be the string to output. As you can see in the images and the code I added two more wires from the arduino to the LCD these basically control the LCD contrast instead of using a potentiometer and the screen brightness with PWM.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |