Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with I2C Scan code #145

Open
thierry7100 opened this issue Jan 16, 2019 · 1 comment
Open

Problem with I2C Scan code #145

thierry7100 opened this issue Jan 16, 2019 · 1 comment

Comments

@thierry7100
Copy link

Hi,

I have opened this issue back in April 2018, but there is still some problems

  1. Within LCD I2C, the code is still incorrect, there are simple quotes instead of double quotes
    Serial.println('I2C scanner. Scanning ...');
    byte count = 0;

Wire.begin();
for (byte i = 8; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ('Found address: ');
Serial.print (i, DEC);
Serial.print (' (0x');
Serial.print (i, HEX);
Serial.println (')');
count++;
delay (1);
} // end of good response
} // end of for loop
Serial.println ('Done.');
Serial.print ('Found ');
Serial.print (count, DEC);
Serial.println (' device(s).');

When using I2C block, the problem exists but some strings are enclosed between double quotes (correct) and some are enclosed between double quotes.

Serial.println('I2C scanner. Scanning ...');
byte count = 0;

Wire.begin();
for (byte i = 8; i < 120; i++)
{
Wire.beginTransmission (i);
if (Wire.endTransmission () == 0)
{
Serial.print ("Found address: ");
Serial.print (i, DEC);
Serial.print (" (0x");
Serial.print (i, HEX);
Serial.println (")");
count++;
delay (1);
} // end of good response
} // end of for loop
Serial.println ('Done.');
Serial.print ('Found ');
Serial.print (count, DEC);
Serial.println (' device(s).');

@SebCanet
Copy link
Member

In which category is this code ? Which LCD screen ?
Could you explain "strings are enclosed between double quotes (correct) and some are enclosed between double quotes"
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants