E-ink Display doesnt Work


#41

Hi @chipmc I was wondering… Did you get your display to work?

What pin configuration did you use?

This one:

//CLK = A3; // SPI CLK
//DI = A5; // SPI MOSI (master out slave in)
const int pCS = A2;
const int pRESET = D6;
const int pDC = D5;
const int pBUSY = D4;

Or this

Display - Photon
3.3V - 3.3V
GND - GND
RESET - A0
DC - A1
CS - A2 (SS)
CLK - A3 (CLK)
DI - A4 (MISO)
BUSY - D7

I’m still paying with the library but my display is not responding :frowning:
I still have the original picture that the display came with.

Thank you!

Pablo


#42

The wiring has to match the object constructor call too.


#43

@gadget

I was able to get the display to work. Here are the pins I am using as well as the constructor on the Electron:

const int pRESET = B2;
const int pDC    = B1;
const int pCS    = A2;
const int pBUSY  = B3;          

Epd   epd(SPI, pCS, pDC, pRESET, pBUSY);                  // Prototype the display class

I am using the standard SPI pins - A2(SS), A3(CLK) and A5(MOSI)

On the display itself, I am a bit disappointed in the refresh rate especially to get the red bits. I may look at a different library that promises to deliver a partial screen refresh which could help considerably.

There is a great explanation of this by Ben Krasnow that @rwb linked to earlier in this thread. Worth a watch for sure.

I hope this helps.

Chip


#44

Hey @chipmc thanks a lot! I am going to try doing the connections and calling the Epd constructor that way and post my results here.

Thank you :slight_smile:


#45

OK, for those who are trying to use this display: GDEP015OC1 - https://www.waveshare.com/1.54inch-e-paper-module.htm

Here is the library I found that is ready to be used: https://github.com/makercrew/hockey_stat_tracker

If you don’t modify the code, here are the connections between the display and the particle photon:
BUSY—>D0
RST------>D1
DC------->D2
CS------->A2
CLK----->A3
DIN------>A5
GND---->GND
3.3V---->3.3V

Pablo


#46

Hi @gadget,
I’ve bought new 1.54 inch Epaper display. I’ve been trying to figure out the library file for the epaper display to work with Photon. I’ve done whatever you suggested. But am not able to compile the code.
Please give any details regarding this.


#47

Hi @ScruffR,
I have bought new epaper display of 1.54 inch from waveshare. I have been looking for the library and an example to display something. I am currently using Particle Photon device. I have a confusion regarding the pin connections :thinking: . If you know anything related to this, please kindly share the details. That would be helpful to me.
Thank you so much


#48

First, have you found a working library? If so, which?

Only then we can say how you should wire the device.
In my port of the Waveshare library for the 2.9" B-display I added a way to select the HW SPI interface (A3/A5 for SPI or D4/D2 for SPI1 as CLK/DIN).
The other pins (BUSY, RST, DC, CS) are user selectable via the library constructor.


#49

Hey @ScruffR
I have used the library " https://github.com/makercrew/hockey_stat_tracker" which is suggested by @gadget and i have been getting the error saying : Error: Could not compile. Please review your code. Please kindly look into it.

Processing  eink3201.ino
make -C ../newlib_nano 
make[1]: Entering directory '/firmware/newlib_nano'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/newlib_nano'
make -C ../user 
make[1]: Entering directory '/firmware/user'
Building cpp file: GxIO_SPI.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoGxIO_SPI.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoGxIO_SPI.o GxIO_SPI.cpp

Building cpp file: GxEPD.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoGxEPD.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoGxEPD.o GxEPD.cpp

Building cpp file: Adafruit_mfGFX.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoAdafruit_mfGFX.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoAdafruit_mfGFX.o Adafruit_mfGFX.cpp
Adafruit_mfGFX.cpp: In member function 'Adafruit_GFX::drawChar(short, short, unsigned char, unsigned short, unsigned short, unsigned char)':
Adafruit_mfGFX.cpp:486:7: warning: 'line' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (line & 0x80) {
       ^

Building cpp file: eink3201.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoeink3201.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoeink3201.o eink3201.cpp

Building cpp file: fonts.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltofonts.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltofonts.o fonts.cpp

Building cpp file: GxIO.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoGxIO.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoGxIO.o GxIO.cpp

Building cpp file: GxGDEP015OC1.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -DSPARK_PLATFORM -DFLASHEE_EEPROM -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -I./inc -I../wiring/inc -I../system/inc -I../services/inc -I../communication/src -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I -I./libraries -I -I -I -I -I. -MD -MP -MF ../build/target/user/platform-0-ltoGxGDEP015OC1.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DSPARK_PLATFORM_NET=CC3000 -fno-builtin-malloc -fno-builtin-free -fno-builtin-realloc  -DLOG_INCLUDE_SOURCE_INFO=1 -DPARTICLE_USER_MODULE -DUSE_THREADING=0 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_SPI=SPI -DUSE_CS=A2 -DUSE_THREADING=0 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE -DLOG_MODULE_CATEGORY="\"app\""  -fno-exceptions -fno-rtti -fcheck-new -std=gnu++11 -c -o ../build/target/user/platform-0-ltoGxGDEP015OC1.o GxGDEP015OC1.cpp
In file included from GxGDEP015OC1.cpp:30:0:
GxGDEP015OC1.h: In constructor 'GxGDEP015OC1::GxGDEP015OC1(GxIO&, uint8_t, uint8_t)':
GxGDEP015OC1.h:141:13: warning: 'GxGDEP015OC1::_busy' will be initialized after [-Wreorder]
     uint8_t _busy;
             ^
GxGDEP015OC1.h:138:13: warning:   'int16_t GxGDEP015OC1::_current_page' [-Wreorder]
     int16_t _current_page;
             ^
GxGDEP015OC1.cpp:65:1: warning:   when initialized here [-Wreorder]
 GxGDEP015OC1::GxGDEP015OC1(GxIO& io, uint8_t rst, uint8_t busy) :
 ^
GxGDEP015OC1.cpp: In member function 'virtual void GxGDEP015OC1::drawPixel(int16_t, int16_t, uint16_t)':
GxGDEP015OC1.cpp:88:11: warning: left operand of comma operator has no effect [-Wunused-value]
       (x, y);
           ^
GxGDEP015OC1.cpp: In member function 'void GxGDEP015OC1::_waitWhileBusy(const char*)':
GxGDEP015OC1.cpp:445:19: warning: unused variable 'elapsed' [-Wunused-variable]
     unsigned long elapsed = micros() - start;
                   ^

Building target: ../build/target/user/platform-0-ltolibuser.a
Invoking: ARM GCC Archiver
mkdir -p ../build/target/user/platform-0-lto
arm-none-eabi-gcc-ar -cr ../build/target/user/platform-0-ltolibuser.a ../build/target/user/platform-0-ltoGxIO_SPI.o ../build/target/user/platform-0-ltoGxEPD.o ../build/target/user/platform-0-ltoAdafruit_mfGFX.o ../build/target/user/platform-0-ltoeink3201.o ../build/target/user/platform-0-ltofonts.o ../build/target/user/platform-0-ltoGxIO.o ../build/target/user/platform-0-ltoGxGDEP015OC1.o

make[1]: Leaving directory '/firmware/user'
make -C ../wiring 
make[1]: Entering directory '/firmware/wiring'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/wiring'
make -C ../hal 
make[1]: Entering directory '/firmware/hal'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/hal'
make -C ../system 
make[1]: Entering directory '/firmware/system'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/system'
make -C ../services 
make[1]: Entering directory '/firmware/services'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/services'
make -C ../communication 
make[1]: Entering directory '/firmware/communication'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/communication'
make -C ../platform 
make[1]: Entering directory '/firmware/platform'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/platform'
make -C ../wiring_globals 
make[1]: Entering directory '/firmware/wiring_globals'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/firmware/wiring_globals'
Building c file: src/module_info.c
Invoking: ARM GCC C Compiler
mkdir -p target/obj/./src/
arm-none-eabi-gcc -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -Werror -I../user/inc -I../wiring/inc -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../system/inc -I../services/inc -I../communication/src -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I. -MD -MP -MF target/obj/./src/module_info.o.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE  -Wno-pointer-sign -std=gnu99 -c -o target/obj/./src/module_info.o src/module_info.c

Building file: ../build/arm/startup/startup_stm32f10x_md.S
Invoking: ARM GCC Assembler
mkdir -p target/obj/startup/
arm-none-eabi-gcc -g3 -gdwarf-2 -mcpu=cortex-m3 -mthumb -I../build/arm/startup -Wa,--defsym -Wa,SPARK_INIT_STARTUP=1 -x assembler-with-cpp -fmessage-length=0 -c -o target/obj/startup/startup_stm32f10x_md.o ../build/arm/startup/startup_stm32f10x_md.S

Building target: target/workspace.elf
Invoking: ARM GCC C++ Linker
mkdir -p target/
arm-none-eabi-g++ -DSTM32_DEVICE -DSTM32F10X_MD -DPLATFORM_THREADING=0 -DPLATFORM_ID=0 -DPLATFORM_NAME=core -DUSBD_VID_SPARK=0x1D50 -DUSBD_PID_DFU=0x607F -DUSBD_PID_CDC=0x607D -g3 -gdwarf-2 -Os -mcpu=cortex-m3 -mthumb -flto -DINCLUDE_PLATFORM=1 -DPRODUCT_ID=0 -DPRODUCT_FIRMWARE_VERSION=65535 -DUSE_STDPERIPH_DRIVER -DDFU_BUILD_ENABLE -DSYSTEM_VERSION_STRING=0.6.2 -DRELEASE_BUILD -Werror -I../user/inc -I../wiring/inc -I../hal/inc -I../hal/shared -I../hal/src/core -I../hal/src/stm32 -I../system/inc -I../services/inc -I../communication/src -I../platform/shared/inc -I../platform/MCU/STM32F1xx/STM32_StdPeriph_Driver/inc -I../platform/MCU/STM32F1xx/STM32_USB_Device_Driver/inc -I../platform/MCU/STM32F1xx/SPARK_Firmware_Driver/inc -I../platform/MCU/shared/STM32/inc -I../platform/MCU/STM32F1xx/CMSIS/Include -I../platform/MCU/STM32F1xx/CMSIS/Device/ST/Include -I../platform/NET/CC3000/CC3000_Host_Driver -I../dynalib/inc -I. -MD -MP -MF target/workspace.elf.d -ffunction-sections -fdata-sections -Wall -Wno-switch -Wno-error=deprecated-declarations -fmessage-length=0 -fno-strict-aliasing -DSPARK=1 -DPARTICLE=1 -DSTART_DFU_FLASHER_SERIAL_SPEED=14400 -DSTART_YMODEM_FLASHER_SERIAL_SPEED=28800 -DMODULE_VERSION=0 -DMODULE_FUNCTION=3 -DMODULE_DEPENDENCY=0,0,0 -D_WINSOCK_H -D_GNU_SOURCE target/obj/./src/module_info.o  target/obj/startup/startup_stm32f10x_md.o --output target/workspace.elf -nostartfiles -Xlinker --gc-sections -flto -Os -fuse-linker-plugin -Tlinker_stm32f10x_md_dfu.ld -L../build/arm/linker --specs=nano.specs -lc -lnosys -u _printf_float -Wl,-Map,target/workspace.map  -L../build/target/user/platform-0-lto -L../build/target/wiring/platform-0-lto/ -L../build/target/system/platform-0-lto/ -L../build/target/services/platform-0-lto/ -L../build/target/communication/platform-0-lto-prod-0/ -L../build/target/hal/platform-0-lto/ -L../build/target/platform/platform-0-lto/ -L../build/target/wiring_globals/platform-0-lto/ -L../build/target/newlib_nano/platform-0-lto -L../build/arm/linker -Wl,--whole-archive -lnewlib_nano -luser -lwiring -lhal -lsystem -lservices -lcommunication -lplatform -lwiring_globals -Wl,--no-whole-archive
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: target/workspace.elf section `.text' will not fit in region `APP_FLASH'
/usr/local/gcc-arm-embedded/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld: region `APP_FLASH' overflowed by 4500 bytes
collect2: error: ld returned 1 exit status
../build/module.mk:222: recipe for target 'target/workspace.elf' failed
make: *** [target/workspace.elf] Error 1

#50

Hey @ScruffR,
Shall I need to provide my app id URL, so that you can have a look


#51

You seem to be building for a Spark Core and not for Particle Photon


#52

Then please let me know what should I do now


#53

Assuming you are using Web IDE, you need to select your Photon and set the correct system version (best 0.6.3) before you build
https://docs.particle.io/guide/getting-started/build/photon/#flashing-your-first-app

See

  • Select your device …
  • Device details …

#54

Hey @ScruffR,
Thank you so much, the code got compiled now successfully :smiley:


#55

Can anybody share Waveshare 1.54 inch epaper display library which will work with photon. I have found the library for arduino which works fine. But i haven’t seen the library related to the photon. So if anybody share the library it would be helpful for me. Thank you so much :smile:


#56

If your Photon system is 0.6.1 or later you should be fine with the Arduino library. Just make sure to have

#include <Particle.h>
#include <Arduino.h>

in place.

BTW, a few posts up there is a link to the library gadget and imran445 used.


#57

@ScruffR,

Thanks for your guidance on this however I seem to be getting a little confused with the multiple pin mapping as previous messages have eluded to.

I’ve currently got a 2.13 Waveshare Epaper module connected up to my Photon as such :

BUSY—>D7
RST------>A0
DC------->A1
CS------->A2
CLK----->A3
DIN------>A5
GND---->GND
3.3V---->3.3V

I’ve tried to confirm this against the SPI reference in the Particle Docs (using MOSI (Master Out…))

The hardware SPI pin functions, which can be used via the SPI object, are mapped as follows:
SS => A2 (default)
SCK => A3
MISO => A4
MOSI => A5

Code I’m using, with some specific pin allocation for the above.
https://go.particle.io/shared_apps/5ae0a208246c3e9f84000207

I’ve got no action on the Epaper module, not even a reset.

I’ve obviously also got a different sized / resolution module to the original 2.9 version, where the only difference I’ve made is to change the width / height as per the wiki page https://www.waveshare.com/wiki/2.13inch_e-Paper_HAT

#define WIDTH 250 //understood to be in landscape mode here
#define HEIGHT 122

  1. I’ve also only got a black/white unit (no red colour available). I assume all the calls for paintRed won’t mean anything to my unit?

  2. Are there any other changes I should be making to the library?

  3. Do you think the soldered selector for 3 or 4 line SPI would make a difference here?

Thanks all for your help, and looking forward to getting this thing working.

Neal.
South Africa.


#58

I have no clue what the difference between the 3-line or 4-line SPI is on these boards.
My 2.9" display is set for 4-line but I’m using the MISO/A4 pin as BUSY line since there is no actual SPI communication coming from the display.
Only DIN (A5/MOSI) and CLK (A3/SCLK) are to be consiered fix when using SPI - all other pins (apart from Vcc & GND obviously) can be chosen as you see fit but need to be set in the library accordingly.

As said D7 is a good candidate for BUSY as the onboard LED will give you a visual clue whether the device is busy or not.


#59

Thanks @ScruffR. I’ve :

  • updated the pin mapping to align with yours above, as well as double checked the remaining in the code.
  • I know, through the course of this thread, you were working on your code. Which version should I be using?
  • Any advice on the changing of the size of the epaper unit, from your original 2.9in to the one I’m using 2.13in? I’ve only changed two dimensions, WIDTH and HEIGTH… not sure if there is mention made anywhere else of sizing…

I’ve reflashed the code, confirmed the pinouts and still get no action on the epaper unit. Will have to get my multimeter out to confirm voltages on some key pins…

Any other advice always welcome.


#60

I originally intended to make the library support all kinds of WaveShare ePaper displays, but for the three displays I checked out the instruction set for each of them appeared to be “completely” diffferent, so I didn’t.
So just changing the size parameters won’t be enough. You probably need to use the sample code provided in the WaveShare Wiki.