0

LCD and Feather M0 mismatch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

LCD and Feather M0 mismatch

by tenapier on Mon Feb 11, 2019 1:01 am

Hi, I'm a noob, trying to get a Sunfounder I2C 20x4 LCD to work with my Adafruit Feather M0. Using the USB pin to power the LCD and the logic wires are going to the SDA and SCL pins. I'm trying to get HelloWorld_i2c to work. Any help would be much appreciated!

Code: Select all | TOGGLE FULL SIZE
#include <SPI.h>
// include the library code:
#include "Wire.h"
#include "Adafruit_LiquidCrystal.h"
#include <LiquidCrystal_I2C.h>
#include <WiFi101.h>
const int en = 2, rw = 1, rs = 0, d4 = 4, d5 = 5, d6 = 6, d7 = 7, bl = 3;

const int i2c_addr = (0x70);


// Connect via i2c, default address #0 (A0-A2 not jumpered)
Adafruit_LiquidCrystal lcd(0);

void setup() {
    //Configure pins for Adafruit ATWINC1500 Feather
  WiFi.setPins(8,7,4,2);
 
  // set up the LCD's number of rows and columns:
  lcd.begin(20, 4);
  // Print a message to the LCD.
  lcd. setCursor(0,1);
  lcd.print("hello, world!");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print(millis()/1000);

  lcd.setBacklight(HIGH);
  delay(500);
  lcd.setBacklight(LOW);
  delay(500);
}

tenapier
 
Posts: 4
Joined: Mon Feb 04, 2019 11:48 am

Re: LCD and Feather M0 mismatch

by franklin97355 on Mon Feb 11, 2019 4:31 am

Do you also have a ground wire between the Feather and the display? Try running the Sunfounder code as a test.

franklin97355
 
Posts: 20135
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: LCD and Feather M0 mismatch

by tenapier on Mon Feb 11, 2019 9:47 am

Thanks so much for your reply, Franklin. The LCD is grounded with the Feather, and I do get a back light. I will try the SunFounder code when I get back home this afternoon. Thanks again!

tenapier
 
Posts: 4
Joined: Mon Feb 04, 2019 11:48 am

Re: LCD and Feather M0 mismatch

by tenapier on Mon Feb 11, 2019 6:21 pm

Well, unfortunately the Sunfounder code did not work with the Feather M0/ LCD problem. Any other tips or wisdom, would be much appreciated.

tenapier
 
Posts: 4
Joined: Mon Feb 04, 2019 11:48 am

Re: LCD and Feather M0 mismatch

by tenapier on Tue Feb 12, 2019 3:44 pm

Was able to setup a working 16X2 LCD via SPI with using six data pins on the Feather M0. But, for some reason, cannot do the same with my I2C LCM1602 20X4 Sunfounder LCD. Would like to use the LCD without tying up so many data pins.
Attachments
IMG_3397.jpg
IMG_3397.jpg (23.46 KiB) Viewed 34 times

tenapier
 
Posts: 4
Joined: Mon Feb 04, 2019 11:48 am

Please be positive and constructive with your questions and comments.