0

I'm using the Intel Edison for a project, but the code to introduce new lcds in arduino is as follows:

rgb_lcd lcd;

I am not capable of picking which grove shield plug I'd like when using multiple lcds. I'm wondering if there is another way to introduce new lcds that allows for choice of different plugs?

The way to pick plugs is generally done through the #define function, but when verifying the code via arduino's ide, the response given back is "request for member 'begin' in '10', which is of non-class type 'int'". Can anyone help on this?

r_l559
  • 1
  • Sharing your research helps everyone. Tell us what you've tried and why it didn’t meet your needs. This demonstrates that you’ve taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer! Also see [how to ask](http://stackoverflow.com/questions/how-to-ask) – Raju Mar 13 '16 at 05:36
  • I've attempted to connect to multiple lcds by creating them like such: rgb_lcd lcd; rgb_lcd lcd2; #define lcd A1 #define lcd2 A2 When doing this I receive the error mentioned above. You receive an error when you try defining the port inside the method to create an lcd: rgb_lcd lcd = A1; The error you receive this time is "conversion from 'const uint8_t {aka const unsigned char}' to non-scalar type 'rgb_lcd' requested". I'm not sure where to go from here. – r_l559 Mar 13 '16 at 13:22

3 Answers3

1

The Grove LCD has two I2C addresses 0x3E (LCD_ADDRESS) and 0x62 (RGB_ADDRESS for backlight). You can connect two LCDs to the Grove shield but both will receive the same commands and display same text. If you are very specific about using multiple I2C devices you might want to add a 4 Channel I2C multiplexer.

nraghuk
  • 156
  • 5
  • the edison is has 2 i2c buses-- except if you're using the arduino board. I wonder if that'd get him around this. – dethSwatch Jul 22 '16 at 20:18
0

This may not be an exact answer to your problem, but it might help you troubleshoot. https://www.arduino.cc/en/Reference/Wire

0

I suggest you use the i2c-tools(i2cdetect) to test the hardware connection first.

Before your run the i2cdetect, you need to config these gpio pins for Edison:

echo 28 > /sys/class/gpio/export
echo 27 > /sys/class/gpio/export
echo 204 > /sys/class/gpio/export
echo 205 > /sys/class/gpio/export
echo 236 > /sys/class/gpio/export
echo 237 > /sys/class/gpio/export
echo 14 > /sys/class/gpio/export
echo 165 > /sys/class/gpio/export
echo 212 > /sys/class/gpio/export
echo 213 > /sys/class/gpio/export
echo 214 > /sys/class/gpio/export
echo low > /sys/class/gpio/gpio214/direction
echo low > /sys/class/gpio/gpio204/direction
echo low > /sys/class/gpio/gpio205/direction
echo in > /sys/class/gpio/gpio14/direction
echo in > /sys/class/gpio/gpio165/direction
echo low > /sys/class/gpio/gpio236/direction
echo low > /sys/class/gpio/gpio237/direction
echo in > /sys/class/gpio/gpio212/direction
echo in > /sys/class/gpio/gpio213/direction
echo mode1 > /sys/kernel/debug/gpio_debug/gpio28/current_pinmux
echo mode1 > /sys/kernel/debug/gpio_debug/gpio27/current_pinmux
echo high > /sys/class/gpio/gpio214/direction
YONG LI
  • 11
  • 1