Using u8glib for Spark? (super beginner question alert!)


#54

Guys,
may be I’m here too late, but the pictures seems to mention 1.3" OLED, and trust me, I scratched my head with these one some month ago, just because the controller is not SSD1306 but SH1106 and that make a difference, because Adafruit Lib (as far as I used it) was not able to drive SH1106 controllers.

But you’re in luck, I was able to drive them (from Arduino) with MicroLCD (Aka MultiLCD) and U8GLib because they have driver for SH1106. I will bet on U8Glib for Particle devices, it’s really a very good library with lots of fonts and feature, I use it day by bay, and I will use it on Particle (hoping port will be done ;-))

Here my 2 cents !


#55

@Charly, I looked at U8Glib which I really like and gave up on porting it as it is too much effort IMO. :disappointed:


#56

@peekay123,

Yeah, I know this, I took some time one day and gave up also, it’s a pitty because it’s really cool but it has very lot of feature and source code files, Also the Author is really cool and opened to discuss.

But it’s on my list also, may be I will give it a try at least for only one LCD at first (this reduce sources) just to try.

It’s on my top 2 libraries to port (which will requires effort), the 2nd one is RadioHead RF universal library !!


#57

@charly, perhaps the author can help you. The Core/Photon are very close to Arduino in many ways so its should be easy for someone who knows how to get around the code.


#58

Yeah that’s correct, not sure will be a good idea to add it to WEB IDE except if we want 100 opened tab :wink:


#59

@charly, no way that will work on IDE. It would be cool if the author made a flat file folder with only the files needed.


#60

The Arduino 1.18 version hosted on github seems much cleaner in term of folder organization


#61

@peekay123
I decided to give it a try this morning, here my results
First I decided to do it the clean way, creating a new folder, putting into
the GraphicTest.ino (from example folder) and in this new folder called u8glib and putting the u8glib library minimal structure into ie u8glib.cpp and u8gilb.h then a new subfolder clib containing all sources files
Opened spark-dev corrected #include "u8glib/u8glib.h" from .ino and shot a compilation


Atom out of date ? well I’m using latest spark-dev version ??
Ok forgot clean way, put all the files into the same folder, the .ino, u8glib.h, u8glib.cpp and all contained info clib folder. Corrected back #include from .ino to #include "u8glib.h" and also the one from u8glib.h to #include "u8g.h"`` instead of#include "clib/u8g.h"go to compile same atom error, ok without any descent error message, I decided to forgot IDE and go to particle-cli my project folder containing all the file is called u8gtest so went one folder up and issued aparticle compile p u8gtestok, got an error telling me it can't push u8g_font_data.c file to cloud, because it's too big (4Mo), So I splitted this file in 3 files calledu8g_font_data1.ctou8g_font_data3.cthen the file original fileu8g_font_data.ccontains 3 more include to the new filesu8g_font_datax.c`
let’s get a new try
hummm,
Compile failed - Compile failed ? yeah, what’s the problem ? I do not know because I don’t have any error message more than Compile failed

S:\Skydrive\devt\spark>particle compile p u8gtest
Compiling code for photon
Including:
S:/Skydrive/devt/spark/u8gtest/U8glib.h
S:/Skydrive/devt/spark/u8gtest/u8g.h
S:/Skydrive/devt/spark/u8gtest/GraphicsTest.ino
S:/Skydrive/devt/spark/u8gtest/U8glib.cpp
S:/Skydrive/devt/spark/u8gtest/chessengine.c
S:/Skydrive/devt/spark/u8gtest/u8g_bitmap.c
S:/Skydrive/devt/spark/u8gtest/u8g_circle.c
S:/Skydrive/devt/spark/u8gtest/u8g_clip.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_api.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_api_16gr.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_attiny85_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_common.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_fast_parallel.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_hw_usart_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_no_en_parallel.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_parallel.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_port_d_wr.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_ssd_i2c.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_custom.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_std_sw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_sw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_t6963.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_uc_i2c.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_parallel.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_st7920_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_st7920_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_sw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_i2c.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_io.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_msp430_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_null.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_raspberrypi_hw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_raspberrypi_ssd_i2c.c
S:/Skydrive/devt/spark/u8gtest/u8g_com_std_sw_spi.c
S:/Skydrive/devt/spark/u8gtest/u8g_cursor.c
S:/Skydrive/devt/spark/u8gtest/u8g_delay.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_a2_micro_printer.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_flipdisc_2x7.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_gprof.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ht1632.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ili9325d_320x240.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ks0108_128x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_160x80.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_240x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_240x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_320x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ld7032_60x32.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_null.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_pcd8544_84x48.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_pcf8812_96x65.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_sbn1661_122x32.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_128x32.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_128x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_64x48.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1309_128x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1322_nhd31oled_bw.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1322_nhd31oled_gr.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_bw.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_bw_new.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_gr.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_gr_new.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1327_96x96_gr.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1351_128x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1353_160x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_64128n.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_dogm128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_dogm132.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_lm6059.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_lm6063.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_nhd_c12832.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_nhd_c12864.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7687_c144mvgd.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_128x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_192x32.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_202x32.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_128x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_128x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_240x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_240x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_tls8204_84x48.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1601_c128032.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1608_240x128.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1608_240x64.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1610_dogxl160.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1611_dogm240.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1611_dogxl240.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1701_dogs102.c
S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1701_mini12864.c
S:/Skydrive/devt/spark/u8gtest/u8g_ellipse.c
S:/Skydrive/devt/spark/u8gtest/u8g_font.c
S:/Skydrive/devt/spark/u8gtest/u8g_font_data.c
S:/Skydrive/devt/spark/u8gtest/u8g_font_data1.c
S:/Skydrive/devt/spark/u8gtest/u8g_font_data2.c
S:/Skydrive/devt/spark/u8gtest/u8g_font_data3.c
S:/Skydrive/devt/spark/u8gtest/u8g_line.c
S:/Skydrive/devt/spark/u8gtest/u8g_ll_api.c
S:/Skydrive/devt/spark/u8gtest/u8g_page.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb14v1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb16h1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb16h2.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb16v1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb16v2.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb32h1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8h1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8h1f.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8h2.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8h8.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8v1.c
S:/Skydrive/devt/spark/u8gtest/u8g_pb8v2.c
S:/Skydrive/devt/spark/u8gtest/u8g_pbxh16.c
S:/Skydrive/devt/spark/u8gtest/u8g_pbxh24.c
S:/Skydrive/devt/spark/u8gtest/u8g_polygon.c
S:/Skydrive/devt/spark/u8gtest/u8g_rect.c
S:/Skydrive/devt/spark/u8gtest/u8g_rot.c
S:/Skydrive/devt/spark/u8gtest/u8g_scale.c
S:/Skydrive/devt/spark/u8gtest/u8g_state.c
S:/Skydrive/devt/spark/u8gtest/u8g_u16toa.c
S:/Skydrive/devt/spark/u8gtest/u8g_u8toa.c
S:/Skydrive/devt/spark/u8gtest/u8g_virtual_screen.c
attempting to compile firmware
pushing file: S:/Skydrive/devt/spark/u8gtest/U8glib.h
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g.h
pushing file: S:/Skydrive/devt/spark/u8gtest/GraphicsTest.ino
pushing file: S:/Skydrive/devt/spark/u8gtest/U8glib.cpp
pushing file: S:/Skydrive/devt/spark/u8gtest/chessengine.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_bitmap.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_circle.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_clip.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_api.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_api_16gr.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_attiny85_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_common.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_fast_parallel.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_hw_usart_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_no_en_parallel.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_parallel.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_port_d_wr.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_ssd_i2c.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_custom.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_st7920_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_std_sw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_sw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_t6963.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_arduino_uc_i2c.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_parallel.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_st7920_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_st7920_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_atmega_sw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_i2c.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_io.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_msp430_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_null.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_raspberrypi_hw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_raspberrypi_ssd_i2c.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_com_std_sw_spi.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_cursor.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_delay.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_a2_micro_printer.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_flipdisc_2x7.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_gprof.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ht1632.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ili9325d_320x240.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ks0108_128x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_160x80.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_240x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_240x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_lc7981_320x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ld7032_60x32.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_null.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_pcd8544_84x48.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_pcf8812_96x65.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_sbn1661_122x32.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_128x32.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_128x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1306_64x48.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1309_128x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1322_nhd31oled_bw.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1322_nhd31oled_gr.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_bw.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_bw_new.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_gr.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1325_nhd27oled_gr_new.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1327_96x96_gr.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1351_128x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_ssd1353_160x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_64128n.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_dogm128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_dogm132.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_lm6059.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_lm6063.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_nhd_c12832.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7565_nhd_c12864.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7687_c144mvgd.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_128x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_192x32.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_st7920_202x32.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_128x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_128x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_240x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_t6963_240x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_tls8204_84x48.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1601_c128032.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1608_240x128.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1608_240x64.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1610_dogxl160.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1611_dogm240.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1611_dogxl240.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1701_dogs102.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_dev_uc1701_mini12864.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_ellipse.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_font.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_font_data.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_font_data1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_font_data2.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_font_data3.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_line.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_ll_api.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_page.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb14v1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb16h1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb16h2.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb16v1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb16v2.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb32h1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8h1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8h1f.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8h2.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8h8.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8v1.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pb8v2.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pbxh16.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_pbxh24.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_polygon.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_rect.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_rot.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_scale.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_state.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_u16toa.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_u8toa.c
pushing file: S:/Skydrive/devt/spark/u8gtest/u8g_virtual_screen.c
Compile failed -  compile failed

S:\Skydrive\devt\spark>

I think I will leave for now, without any clues on what’s going wrong due to missing descent error message. It remind my some VB6 generic error code some years (too much) ago :wink:
You know guys, I love Particle devices, but each time I want to do a library port, it’s really a pain in term of where files need to be located, which are pushed to cloud for compilation and which not . I think we reach the limits of “blind cloud” compilation for this kind of libraries ;-(


#62

Oh, sorry one more information, when I’m going to my u8gtest folder (the one containing all source and the .ino file) and I do a
particle compile p GraphicsTest.ino

Compiling code for photon
Including:
GraphicsTest.ino
attempting to compile firmware
pushing file: GraphicsTest.ino
Errors
GraphicsTest.cpp:2:20: fatal error: U8glib.h: No such file or directory

                ^
compilation terminated.
make[1]: *** [../build/target/user/platform-6GraphicsTest.o] Error 1
make: *** [user] Error 2

Compile failed -  compile failed

S:\Skydrive\devt\spark\u8gtest>

all the others sources files are not pushed to cloud, so of course it can’t find the file u8glib.h


#63

@charly, CLI and DEV don’t play well with subfolders just yet, explaining why you are having issues. I will ping @suda and @harrisonhjones for their thoughts on this. If you locally compile, this is not an issue of course.


#64

@peekay123
Yes I saw that, that is why I pushed all files (with the .ino) into the same folder to be sure I do not have this kind of problem. Unfortunatly doing this I saw that all files are cloud pushed but compilation just bring me a “compile failed”, hard to find when you have 124 sources files

Thanks for your help,


#65

@Charly, this is one thing that turned me off of u8glib. It is hard to figure what files need to be modified and how to create a “minimal” file setup for compiling. There is no question that the cloud compile will have issues with 124 files! Have you considered compiling locally?


#66

Yep, just installed all,able to build default firmware :wink:

Sorry now I’ve got 2 newbie questions :

  • when I’m on firmware folder I do make everything is fine. I saw that I could put my app in application folder (there is already a tinker folder in it) but how do, for example I can compile tinker ? I tried make tinker (from build folder but does not work) ?
  • how do I know if I’m compiling for core or photon ? is there a define do set ?

Thank you for your help


#67

@charly, with the Photon being so new, all of us are “newbies”!

So, to build and flash the system firmware, you switch to the firmware/modules folder, put your Photon in DFU mode and run

make clean all PLATFORM=photon program-dfu

That will flash the system firmware and tinker to your Photon. To build your own app, switch back to the firmware/main folder. You create your application folder which will have your code in the firmware/user/application/yourappfolder that your created. The compiler does not know .ino files so you will have to rename it to .cpp. The local compile does not do “pre-processing” like the cloud so you mean need to declare function stubs at the top of your (previously named .ino) file. You compile and flash your code this way:

make clean all PLATFORM=photon APP=yourappfolder program-dfu

for tinker, you would run:

make clean all PLATFORM=photon APP=tinker program-dfu

for the Core, PLATFORM=core is used. Make sure your Photon is in DFU mode if you want to flash.

You can dig further into how local compile works and @jerrytron is using his own make files for his choosatron setup. :smile:


#68

Great, got it, compiled tinker for core ;-):wink:
Just saw I did not cloned the develop version but the master so that’s why I was not finding photon files :wink:
anyway I will create a u8g test app folder, thank you very much for your help


#69

@peekay123
ouppss I just deleted all files (issued from master branch) to clone the develop branch to be able to compile for photon, I’m in no luck, I’m unable to compile anything for photon or core


#70

@Charly, I would recommend cloning the release/0.4.3 branch instead since develop is not for the faint of heart and is not stable (it is beta after all).


SOLVED - SH1106 SPI library needed - anyone ported it?
#71

@peekay123
Ok, cloned and got it, going much far away now, but still now luck, xdd command is not in cygwin package and sourceforge seems to have one for windows, but it’s down for now, I need to wait

By the way I can’t build for core even with this version

modules # make clean all PLATFORM=core APP=tinker
makefile:12: *** "Platform 0 does not support dynamic modules".  Stop.
modules #

I think for testing my best option is to return for core with master branch


#72

+1 for a u8glib port… I’m specifically needing to drive a SSD1325 display but I think it would be great to have all the devices supported by this library available on the platform at some point. I’m going to have a go at this too, once my modules turn up. However it might be an uphill battle since I’m more of a hardware guy… Will let you know if I make any progress.


#73

Hi guys,

I had a chance to do some tests with 0.4.4 firmware version. I’m now able to compile and flash u8g test program (with minor modification).

Unfortunately, it does not works, then I dig into the u8gi 2c code, and I saw that it can’t work because u8g is using hardware registers (of arduino and/or RPI) to control and manage I2C. I should have checked this before, I thought it was using Wire library so expected some compatibility but it’s not the case. So from this point I’m not able to do more because I don’t know how Particle I2C hardware is working. It seems we only need basic function for Particle

u8g_i2c_init
u8g_i2c_wait
u8g_i2c_start
u8g_i2c_send_byte
u8g_i2c_stop

in u8g_com_i2c.c , if some particle’s gurus want to give it a try;-)
Anyway, as a workaround, I tested Sparkfun OLED library for particle, it’s working fine but limited to SSD1306 displays with far less fonts than u8glib (but more than Adafruit’s one), it can be a good compromise.