I am doing a project utilizing a Raspberry Pi with MATLAB, and I have installed the MATLAB Support Package for Raspberry Pi. We have a SunFounder LCD screen that uses an I2C connection, but we cannot get it to display the text that we want. We have used the 'read' and 'write' functions, as well as the 'readRegister' and 'writeRegister' functions, but they do not function as expected. For example, writing '0x42' to the device shuts off the LCD screen instead of displaying a character. Our MATLAB code is below:
>> mypi = raspi;>> scanI2CBus(mypi);>> lcd = i2cdev(mypi, 'i2c-1', '0x27');>> write(lcd, hex2dec('42'));
Best Answer