I am trying to connect a 4x20 LCD display to my Spark Core and cannot get it to work, no matter what I try.
If I connect this LCD to Arduino it works perfectly fine. I did some Arduino projects before but I am new to the whole Particle thing (maybe that’s the issue) - I just found the Spark in my pile of electronics and thought I give it a go. Eventually I want to connect the Spark to some cloud backend like Azure to demo IoT capabilities. But I need to get this LCD running first.
“Normal” code works fine, like blinking an LED or something, so the spark works
Also the LCD works fine when I connect it to an Arduino
Tried without the pullup resistors or just pullup to 3v3
Flashed with newest firmware (and cc3000)
Different I2C addesses do not work either (like 0x20 or 0x3F)
Standard I2C scanner cannot find anything (?) and when I try the I2C scanner with particle publish code it fails and device keeps restarting
Thoughts
Not sure if this is my limited understanding of Particle but compiling seems to be a bit buggy? I have sometimes the compile fail for no reason (both Desktop IDE and CLI) with a simple “Failed. Compile exit” message. Is there any log I can check what actually failed?
When flashing the device back to factory settings I got this error - does that mean my spark is damaged?
@marcg, everything seems to be fine with power and pull-ups and connections. On the Photon, you don’t need #include <Wire>; so you can comment that out. What version of Particle CLI are you using?
@marcg, I just test a 16x2 LCD with the same piggyback board and got it working with 10K pull-ups. Which library are you using? I am using the LiquidCrystal_I2C_Spark library from the web IDE. The example is working just fine.
I am using the LiquidCrystal_I2C library with this header:
// ---------------------------------------------------------------------------
// Created by Francisco Malpartida on 20/08/11.
// Copyright 2011 - Under creative commons license 3.0:
// Attribution-ShareAlike CC BY-SA
//
// This software is furnished "as is", without technical support, and with no
// warranty, express or implied, as to its usefulness for any purpose.
//
// Thread Safe: No
// Extendable: Yes
//
// @file LiquidCrystal_I2C.h
// This file implements a basic liquid crystal library that comes as standard
// in the Arduino SDK but using an I2C IO extension board.
//
// @brief
// This is a basic implementation of the LiquidCrystal library of the
// Arduino SDK. The original library has been reworked in such a way that
// this class implements the all methods to command an LCD based
// on the Hitachi HD44780 and compatible chipsets using I2C extension
// backpacks such as the I2CLCDextraIO with the PCF8574* I2C IO Expander ASIC.
//
// The functionality provided by this class and its base class is identical
// to the original functionality of the Arduino LiquidCrystal library.
//
//
// @author F. Malpartida - fmalpartida@gmail.com
// ---------------------------------------------------------------------------
I actually thought the LiquidCrystal_I2C_Spark is only for 16x2 displays and I cannot use it with my 20x4? Maybe I am wrong - will give that library a shot in a second, thanks!
You should open a new thread for that and place a link to it here.
Also please include the whole log including the actual command used and some more background about your code and project structure.