@peekay123 Sounds good. I think the 2.7 inch screen with the Photon and Electron are a perfect match for low power applications.
I never did hear back from Sharp but I did hear back from one of their resellers who apologized and asked me to resend him all the questions I previously sent so he could then forward them to Sharp.
Since you had the library up and running and It looks like we will soon have the color bitmap image creation with the proper bitmap output format I just figured we didn’t need their help anyways.
I have the color screen up and running and it’s working perfectly, just waiting on the guy to get the image conversion software ready to export to the format we need to keep moving forward with the screen layout.
The 5" Nextion screen arrived yesterday, its a very nice screen but these screens get washed out in bright light and they consume 2 watts while ON which is unacceptable in smaller battery powered applications.
@RWB, I still would like to hear from Sharp and I’m dumbfounded as to their lack of information.
The Nextion displays are very promising but only for non-battery applications for sure. It will be interesting to see what can be done with the image conversion software once they implement the new format.
@peekay123 I’ll forward your questions to the local Sharp sales rep and see what happens.
Do you think there is a way to upload a .H file full of bitmap arrays to the 1Mb of extra memory on the P1 using only the Flashee library and the online IDE?
That would be awesome since then I would be able to remotely update products + the bitmaps on the 1Mb of flash without having to do any local compiling.
I know were both busy but I’m willing to pay for your time if your willing to help figure a solution for this. The P1 looks to be a really good way to replace the Teeny 3’s I’m used to using.
The only advantage with the Teensy is they have the deep sleep modes only consuming around 2 uA vs 80 uA on the Photon & P1 but still both are pretty dam low.
@peekay123 Ahh that makes sense. I was expecting to see that circle face with the X X eyes like in the picture earlier in this thread
The screen layout is clean but it’s going to be completely redone to something better. The clean fonts are only possible because of YOU and your custom mfGFX library.
Now if I could only figure out how to store my bitmaps on the P1’s extra memory I would have plenty of room to make awesome full screen animations
@RWB, you could use flashee-prom combined with an SD to flash your code over to the P1 external flash. You would first run an app to read a file, either a raw bin or a txt file (eg. CSV) with the data and flash it over. Then you could run your regular app making use of the data in external flash.
@peekay123 I was under the impression that the extra 1Mb of flash was just there and ready to use on the P1 via the online IDE.
What makes this extra memory so hard to write to via the normal IDE.
So once a P1 gets shipped out in a product the data that’s on the 1Mb chip can not be changed via a remote software update right? It would be so much better to be able to write to that memory via a remote update, like the Photon does now.
@peekay123 Hey Paul I’m laying out the schematic for a few new boards using the P1 Modules.
I have a quick question about the Memory Displays.
Am I right in assuming that the Color LCD requires the use of A2, A3, and A5 pins, and the monochrome display firmware requres the use of pins A1, A3, and A5?
The difference being the use of A1 or A2 for the SS signal.
Hello All, I am having a terrible time trying to get peekay123’s library to work with my Photon connected to a 2.7 inch Sharp Mem LCD. I did make my own interface board, but it is almost identical to other’s interface boards. Using my board an an Arduino Nano - and limiting the screen to 400 x 24 pixels, I can get the whole thing working just fine (albeit with just 24 pixel height) using the original Adafruit library. However, switching to anything in the 32-bit realm, using SPI.h, seems to not work. I tried an Adafruit Feather M0 board and my Photon. I am now around 80% sure it has to do with SPI. Reading the Photon docs, SPI runs around 60Mhz. Reading the 2.7" LCD docs max clock should be 2Mhz. I’ve tried the following:
without any luck. I cannot imagine it is my hardware and interface board as it works fine with the other microcontroller. But, I could be wrong. I don’t get jumbled text or lines, I get a completely blank screen. I’ve tried several different options for SS, A1, A2, D7. I even tried my 400x24 trick that got the Nano working. I’ve switched back and forth between the Nano and the Photon and each time it works with the Nano. That is why I’ve been chasing down the possible SPI issue. However I cannot understand how others are able to get this working and I am not. Can someone post their exact connections/wiring?
/*********************************************************************
This is an example sketch for our Monochrome SHARP Memory Displays
Pick one up today in the adafruit shop!
------> http://www.adafruit.com/products/1393
These displays use SPI to communicate, 3 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!
Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, check license.txt for more information
All text above, and the splash screen must be included in any redistribution
*********************************************************************/
#include "Adafruit_mfGFX.h"
#include "Adafruit_SharpMem.h"
/*********************************************************************
Our pin setup for the Spark
CLK = pin A3
DI = pin A5
CS = pin A1
To convert your image to a Bitmap make the image 96px x 96px in a program like Photoshop.
One the image is the correct size go to http://www.digole.com/tools/PicturetoC_Hex_converter.php
to convert your image to a hex value like shown below.
*********************************************************************/
Adafruit_SharpMem display(SCK, MOSI, A1); //SCK, MOSI, SS
#define BLACK 0
#define WHITE 1
void setup(void)
{
SPI.begin();
SPI.setBitOrder(MSBFIRST);
SPI.setDataMode(SPI_MODE0);
SPI.setClockDivider(SPI_CLOCK_DIV16);
display.init(); // Initialize the hardware ports since cannot be done in class instantation above
// start & clear the display
display.begin();
display.clearDisplay();
// draw the first ~12 characters in the font
testdrawchar();
display.refresh();
delay(500);
display.clearDisplay();
// text display tests
display.setTextSize(4);
display.setTextColor(BLACK);
display.setCursor(0,0);
display.println("Hello, world");
delay(1000);
}
void loop(void)
{
// Screen must be refreshed at least once per second
display.refresh();
Particle.connect();
delay(500);
}
///
void testdrawchar(void) {
display.setTextSize(1);
display.setTextColor(BLACK);
display.setCursor(0,0);
for (uint8_t i=0; i < 168; i++) {
if (i == '\n') continue;
display.write(i);
//if ((i > 0) && (i % 14 == 0))
//display.println();
}
display.refresh();
}
I’m not sure if changing A2 to A1 is OK or not. You may be able to choose which ever one you want but I’m not the expert on that. I would just leave it as A2 as Paul’s code is using because we know it works.
Do you have a link to that Memory LCD breakout that your using?