1

I'm trying to communicate via I2C on the Raspi, programming it with the Arduino Create Web Editor. I have enabled I2C on the pi, made sure /dev/i2c-1 exists. The pi can see the device (just a simple LCD for now) via the command line on the pi itself.

I'm getting the error "no I2C device available for Wire10". I'm wired to SDA1/SCL1 (pins 3 and 5). I have previously tested the display and the code on an UNO and it works fine.

Please help! I saw someone had this issue before and simply said "I fixed it" but didn't provide an explanation.

Thanks! (Code below for reference)

/* I2C LCD with Arduino example code. More info: https://www.makerguides.com */

// Include the libraries:
// LiquidCrystal_I2C.h: https://github.com/johnrickman/LiquidCrystal_I2C
#include <Wire.h> // Library for I2C communication
#include <LiquidCrystal_I2C.h> // Library for LCD

// Wiring: SDA pin is connected to A4 and SCL pin to A5.
// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 20, 4); // Change to (0x27,16,2) for 16x2 LCD.

void setup() {
  // Initiate the LCD:
  lcd.init();
  lcd.backlight();
}

void loop() {
  // Print 'Hello World!' on the first line of the LCD:
  lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
  lcd.print("Hello Worlds!"); // Print the string "Hello World!"
  lcd.setCursor(2, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
  lcd.print("LCD tutorial");
}
4
  • There is some missing information. When you say: "I'm getting error" no I2C device... Where error is displayed? On RPi, Arduino IDE or what? What are conditions? What is connected and when? Uno? Display? What display? What is running on RPi? Another: When you saw someone having similar problem: provide a link, maybe someone can elaborate from there. Commented Nov 6, 2020 at 21:09
  • Here is the link o the original topic with the error: forum.arduino.cc/index.php?topic=560075.0, the error was on the arduino web IDE monitor, its an LCD display (Not sure of the exact model I will provide it when im able to get it) connected to the PI over i2c (gpio 2 and 3 from pinout.xyz) That code posted is whats running on the pi. Commented Nov 6, 2020 at 21:18
  • did you run the I2C scanner sketch? Commented Nov 7, 2020 at 6:07
  • Yes i did and was not able to see anything with it. (Link to LCD: amazon.ca/WayinTop-Display-Interface-Adapter-Arduino/dp/…" Commented Nov 9, 2020 at 13:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.