M5StickC Nixie tube Clock
-
I downloaded the program here : "https://github.com/McOrts/M5StickC_Nixie_tube_Clock" and installed it via Arduino.
But with me comes only the following error message see picture and the clock does not work.
What am I doing wrong or what is missing !greeting skink!
-
@skink looks like you don't have all the libraries installed.
-
Arduino: 1.8.9 (Windows 10), Board: "M5Stick-C, Default, 115200, None"
In file included from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Print.h:27:0, from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Stream.h:26, from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:31, from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:67, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Printable.h:25:1: error: unknown type name 'class' class Print; ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Printable.h:33:1: error: unknown type name 'class' class Printable ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Printable.h:34:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ In file included from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Stream.h:26:0, from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:31, from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:67, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Print.h:34:1: error: unknown type name 'class' class Print ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Print.h:35:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ In file included from C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:31:0, from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:67, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Stream.h:38:1: error: unknown type name 'class' class Stream: public Print ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32/Stream.h:38:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token class Stream: public Print ^ In file included from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:67:0, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:38:1: error: unknown type name 'class' class TwoWire: public Stream ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:38:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token class TwoWire: public Stream ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:136:8: error: unknown type name 'TwoWire' extern TwoWire Wire; ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\Wire\src/Wire.h:137:8: error: unknown type name 'TwoWire' extern TwoWire Wire1; ^ In file included from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:68:0, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src/SPI.h:28:1: error: unknown type name 'class' class SPISettings ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src/SPI.h:29:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ In file included from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:68:0, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src/SPI.h:38:1: error: unknown type name 'class' class SPIClass ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src/SPI.h:39:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token { ^ C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\SPI\src/SPI.h:86:8: error: unknown type name 'SPIClass' extern SPIClass SPI; ^ In file included from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5Display.h:5:0, from C:\Users\Reiner St�hler\Documents\Arduino\libraries\M5StickC\src/M5StickC.h:69, from sketch\vfd_18x34.c:3: C:\Users\Reiner St�hler\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\FS\src/FS.h:24:18: fatal error: memory: No such file or directory compilation terminated. exit status 1 Fehler beim Kompilieren für das Board M5Stick-C.
Where are the libraries are must Install ??
greetings skink -
I need to see a screen shot of the beginning of the sketch with the Include lines please.
-
Hello and thank you very much, here is the screenshot for you. M5Stickc is installed according to the M5stack manual: "https://docs.m5stack.com/#/en/quick_start/m5stickc/m5stickc_quick_start_with_arduino_Windows" and both files are loaded automatically when I load the "M5StickC_Nixie_tube_Clock.ino".
Don't understand why this doesn't work, so it's in the description of the Nixi Clock !!Greetings skink
-
Without wanting to anticipate @ajb2k3 :
Your first screenshot says "Fehler beim Kompilieren für das Board ESP32 Pico Kit" and this board is also listed in the lower right corner of the screenshot.
I think, that you should first change the board-Type in the Arduino IDE under 'Tools/Werkzeuge' - 'Board/???' - .... to: 'M5Stick-C' and than try to compile again.
May be (and I hope) it helps ... -
@grelm
Hello,
unfortunately no, I reinstalled everything and now I'm using M5Stick-C and also the transfer parameters are correct but it doesn't happen at all.
I'm really helpless what's missing or why he can't compile ???????Grus skink
-
@skink said in M5StickC Nixie tube Clock:
Grus skink
When you change something like adding library you need to restart arduino
Try upload speed 150000 as that was what mine was set to when I installed it.
BTW are you suing the provided black usb cable? -
@ajb2k3 Hello @all,
I've done everything like this, I also have a few more library´s.
But the program doesn't want to run on the M5Stick-C.
It is always only shown to me that an error occurred during compiling for the board M5Stick-C.
The program stops and that was it.
Means I don't get the program complicated at all, so I didn't even install it.
Can someone send me the link to the program again or send me a copy.
I am really in despair, because all examples from the Arduino environment for the M5Stick-C can be installed and run problem-free!
Greetings Skink -
If @ajb2k3's suggestion didn't help, you could look into this:
I am not sure, but did you this: (from: https://github.com/McOrts/M5StickC_Nixie_tube_Clock)
Update Nixie Tube images
Execute the lcd-image-converter.exe include in this repository.
" Png or Jpg is read from File->Open Menu. The image will be displayed when loaded.
Select: Option->Conversions Menu. The top Preset: selects "Color R5G6B5".
Select: Image tap and select “8 bit” for Block size :. Press "OK".
The example "vfd_35x67_8.c" is output by "Convert ..." in File-Convert Menu. Know in advance the destination path. Tick: Import All Images You can also output all the images with “Convert ... all”.
Edit .c converted file. You will get an error as it is, so fix it with your editor." Change: "Static const uint8_t image_data_vfd_35x67 [4690] = {" at the top of the file deleting "image_data_" as result of "static const uint8_t vfd_35x67_8 [4690] = {".
At the bottom of delete de entire line: "const tImage vfd_35x67 = {image_data_vfd_35x67, 35, 67, 8};
Save the example "vfd_35x67_8".c***May be you could send us the complete compiler-error-listing again, as the board-selection is correct now.
(Btw: as I don't have a M5Stick-C, i can not check even my own suggestions!)
-
I'm not sure what could be wrong as I have just compiled it
#include <M5StickC.h> #include "vfd_18x34.c" #include "vfd_35x67.c" RTC_TimeTypeDef RTC_TimeStruct; RTC_DateTypeDef RTC_DateStruct; int mode_ = 3; // 3:2Lines 2: 2Lines(YYMM), 1:1Line const uint8_t*n[] = { // vfd font 18x34 vfd_18x34_0,vfd_18x34_1,vfd_18x34_2,vfd_18x34_3,vfd_18x34_4, vfd_18x34_5,vfd_18x34_6,vfd_18x34_7,vfd_18x34_8,vfd_18x34_9 }; const uint8_t*m[] = { // vfd font 35x67 vfd_35x67_0,vfd_35x67_1,vfd_35x67_2,vfd_35x67_3,vfd_35x67_4, vfd_35x67_5,vfd_35x67_6,vfd_35x67_7,vfd_35x67_8,vfd_35x67_9 }; const char *monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; void setup(void){ M5.begin(); pinMode(M5_BUTTON_HOME, INPUT); M5.Lcd.fillScreen(BLACK); M5.Lcd.setRotation(1); M5.Axp.ScreenBreath(10); // 7-15 // rtc setup start --------------------------------------------- String pt = (__DATE__ " " __TIME__); // PC DATE TIME READ //000000000011111111112 Read data //012345678901234567890 //Jun 6 2019 07:20:41 char m1[3]; int m2; // Month conversion ( Jun to 6 ) (pt.substring(0,3)).toCharArray(m1,4); for (int mx = 0; mx < 12; mx ++) { if (strcmp(m1, monthName[mx]) == 0){m2 = mx + 1; break;} } RTC_DateTypeDef DateStruct; // Month, Date, Year DateStruct.Month = m2; DateStruct.Date = (pt.substring(4, 6)).toInt(); DateStruct.Year = (pt.substring(7,11)).toInt(); M5.Rtc.SetData(&DateStruct); RTC_TimeTypeDef TimeStruct; // Hours, Minutes, Seconds TimeStruct.Hours = (pt.substring(12,14)).toInt(); TimeStruct.Minutes = (pt.substring(15,17)).toInt(); TimeStruct.Seconds = (pt.substring(18,20)).toInt(); M5.Rtc.SetTime(&TimeStruct); // rtc setup end ----------------------------------------------- } void loop(void){ if(digitalRead(M5_BUTTON_HOME) == LOW){ if (mode_ == 3){mode_ = 1;M5.Lcd.fillScreen(BLACK);return;} if (mode_ == 2){mode_ = 3;M5.Lcd.fillScreen(BLACK);return;} if (mode_ == 1){mode_ = 2;M5.Lcd.fillScreen(BLACK);return;} } if ( mode_ == 3 ){ vfd_3_line();} // hh,mm,ss if ( mode_ == 2 ){ vfd_2_line();} // yyyy,mm,dd,hh,mm,ss if ( mode_ == 1 ){ vfd_1_line();} // mm,ss delay(500); } void vfd_3_line(){ M5.Rtc.GetTime(&RTC_TimeStruct); M5.Rtc.GetData(&RTC_DateStruct); int h1 = int(RTC_TimeStruct.Hours / 10 ); int h2 = int(RTC_TimeStruct.Hours - h1*10 ); int i1 = int(RTC_TimeStruct.Minutes / 10 ); int i2 = int(RTC_TimeStruct.Minutes - i1*10 ); int s1 = int(RTC_TimeStruct.Seconds / 10 ); int s2 = int(RTC_TimeStruct.Seconds - s1*10 ); M5.Lcd.pushImage( 2,0,35,67, (uint16_t *)m[h1]); M5.Lcd.pushImage( 41,0,35,67, (uint16_t *)m[h2]); M5.Lcd.drawPixel( 79,22, ORANGE); M5.Lcd.drawPixel( 79,48,ORANGE); M5.Lcd.drawPixel( 79,21, YELLOW); M5.Lcd.drawPixel( 79,47,YELLOW); M5.Lcd.pushImage( 83,0,35,67, (uint16_t *)m[i1]); M5.Lcd.pushImage(121,0,35,67, (uint16_t *)m[i2]); M5.Lcd.pushImage(120,45,18,34, (uint16_t *)n[s1]); M5.Lcd.pushImage(140,45,18,34, (uint16_t *)n[s2]); if ( s1 == 0 && s2 == 0 ){ fade();} } void vfd_2_line(){ M5.Rtc.GetTime(&RTC_TimeStruct); M5.Rtc.GetData(&RTC_DateStruct); //Serial.printf("Data: %04d-%02d-%02d\n",RTC_DateStruct.Year,RTC_DateStruct.Month,RTC_DateStruct.Date); //Serial.printf("Week: %d\n",RTC_DateStruct.WeekDay); //Serial.printf("Time: %02d : %02d : %02d\n",RTC_TimeStruct.Hours,RTC_TimeStruct.Minutes,RTC_TimeStruct.Seconds); // Data: 2019-06-06 // Week: 0 // Time: 09 : 55 : 26 int y1 = int(RTC_DateStruct.Year / 1000 ); int y2 = int((RTC_DateStruct.Year - y1*1000 ) / 100 ); int y3 = int((RTC_DateStruct.Year - y1*1000 - y2*100 ) / 10 ); int y4 = int(RTC_DateStruct.Year - y1*1000 - y2*100 - y3*10 ); int j1 = int(RTC_DateStruct.Month / 10); int j2 = int(RTC_DateStruct.Month - j1*10 ); int d1 = int(RTC_DateStruct.Date / 10 ); int d2 = int(RTC_DateStruct.Date - d1*10 ); int h1 = int(RTC_TimeStruct.Hours / 10) ; int h2 = int(RTC_TimeStruct.Hours - h1*10 ); int i1 = int(RTC_TimeStruct.Minutes / 10 ); int i2 = int(RTC_TimeStruct.Minutes - i1*10 ); int s1 = int(RTC_TimeStruct.Seconds / 10 ); int s2 = int(RTC_TimeStruct.Seconds - s1*10 ); M5.Lcd.pushImage( 0, 0,18,34, (uint16_t *)n[y1]); M5.Lcd.pushImage( 19, 0,18,34, (uint16_t *)n[y2]); M5.Lcd.pushImage( 38, 0,18,34, (uint16_t *)n[y3]); M5.Lcd.pushImage( 57, 0,18,34, (uint16_t *)n[y4]); M5.Lcd.drawPixel( 77,13, ORANGE); M5.Lcd.drawPixel( 77,23,ORANGE); M5.Lcd.pushImage( 80, 0,18,34, (uint16_t *)n[j1]); M5.Lcd.pushImage( 99, 0,18,34, (uint16_t *)n[j2]); M5.Lcd.drawPixel(118,13, ORANGE); M5.Lcd.drawPixel(119,23,ORANGE); M5.Lcd.pushImage(120, 0,18,34, (uint16_t *)n[d1]); M5.Lcd.pushImage(140, 0,18,34, (uint16_t *)n[d2]); M5.Lcd.pushImage( 00,40,18,34, (uint16_t *)n[h1]); M5.Lcd.pushImage( 20,40,18,34, (uint16_t *)n[h2]); M5.Lcd.drawPixel( 48,54, ORANGE); M5.Lcd.drawPixel( 48,64,ORANGE); M5.Lcd.pushImage( 60,40,18,34, (uint16_t *)n[i1]); M5.Lcd.pushImage( 80,40,18,34, (uint16_t *)n[i2]); M5.Lcd.drawPixel(108,54, ORANGE); M5.Lcd.drawPixel(108,64,ORANGE); M5.Lcd.pushImage(120,40,18,34, (uint16_t *)n[s1]); M5.Lcd.pushImage(140,40,18,34, (uint16_t *)n[s2]); if ( i1 == 0 && i2 == 0 ){ fade();} } void vfd_1_line(){ M5.Rtc.GetTime(&RTC_TimeStruct); M5.Rtc.GetData(&RTC_DateStruct); int i1 = int(RTC_TimeStruct.Minutes / 10 ); int i2 = int(RTC_TimeStruct.Minutes - i1*10 ); int s1 = int(RTC_TimeStruct.Seconds / 10 ); int s2 = int(RTC_TimeStruct.Seconds - s1*10 ); M5.Lcd.pushImage( 2,6,35,67, (uint16_t *)m[i1]); M5.Lcd.pushImage( 41,6,35,67, (uint16_t *)m[i2]); M5.Lcd.drawPixel( 79,28, ORANGE); M5.Lcd.drawPixel( 79,54,ORANGE); M5.Lcd.drawPixel( 79,27, YELLOW); M5.Lcd.drawPixel( 79,53,YELLOW); M5.Lcd.pushImage( 83,6,35,67, (uint16_t *)m[s1]); M5.Lcd.pushImage(121,6,35,67, (uint16_t *)m[s2]); if ( s1 == 0 && s2 == 0 ){ fade();} } void fade(){ for (int i=7;i<16;i++){M5.Axp.ScreenBreath(i);delay(25);} for (int i=15;i>7;i--){M5.Axp.ScreenBreath(i);delay(25);} M5.Axp.ScreenBreath(12); }
I'm using Arduino 1.8.9 to compile fresh from github.
Have you tried updating your M5Stack vfd Libraries?
it looks like you libs are 1.0.2 where as I am using 1.22
-
-
@skink is the battery in the M5Stick fully charged?
Plug the stick into a wall charger and leave it for a few hours.
-
the battery is full, even if I leave the M5Stick-C connected to the laptop, the Nixi clock disappears after a second and the screen stays black, but you can still see the backlight.
What I haven't understood about the manual so far is the following part:Update Nixie Tube images
Execute the lcd-image-converter.exe include in this repository.
" Png or Jpg is read from File->Open Menu. The image will be displayed when loaded.
Select: Option->Conversions Menu. The top Preset: selects "Color R5G6B5".
Select: Image tap and select “8 bit” for Block size :. Press "OK".
The example "vfd_35x67_8.c" is output by "Convert ..." in File-Convert Menu. Know in advance the destination path. Tick: Import All Images You can also output all the images with “Convert ... all”.
Edit .c converted file. You will get an error as it is, so fix it with your editor." Change: "Static const uint8_t image_data_vfd_35x67 [4690] = {" at the top of the file deleting "image_data_" as result of "static const uint8_t vfd_35x67_8 [4690] = {".
At the bottom of delete de entire line: "const tImage vfd_35x67 = {image_data_vfd_35x67, 35, 67, 8};
Save the example "vfd_35x67_8".c***When I load the file M5StickC-Nixie-tube_clock.ino into Arduino, both files vfd_1834.c and vfd_3567.c are loaded automatically.
Where or what should I change !
Don't understand this !
Greetings Reiner -
@skink I'm not sure as i just down loaded and compiled/flash strait to the stick c.
one thing to try is to download m5burner, wipe and install uiflow. the try re compiling and uploading in arduino.
is it only the nixi tube demo doing this?
-
@ajb2k3 Yes it is only with the Nixi Tube demo, all other examples from the Arduino application run without problems.
Just started UI-Flow Desktop application and install UIFlow-v1.3.4 beta with M5Burner now.
And then I will install the Nixi Clock again by Arduino software.
Unfortunately we don't see any success with UIFlow-v1.3.5 beta.
Yes, the problem only occurs during the Nixi tube demo.
If something is missing at Arduino or like already ajb2k3 writes maybe it is due to the libs 1.0.2 how do I install the 1.22 ???
Maybe it works then.
Too bad you always see it for a second and the Nixi clock looks really awesome.Greetings Reiner
-
@skink All you are doing is using UIFlow to clear the program storage space on the M5Stack. I'm confused because my stick C is working as it should and not showing a blank screen after a few seconds.
-
@ajb2k3
Well, I'm afraid I don't know any more advice either. Try to attach a video, if possible.
This is what it looks like in any case, I only deleted the memory with M5 Stack Burner and then played the Nixi Clock with Arduino, the same result unfortunately!Greetings Reiner
P.S. Unfortunately I don't have the possibility to upload a video here. Too bad
-
@ to all
I noticed something else interesting, but I don't know if it has anything to do with it, I plug the M5Stick-C into the USB port and the M5Stick-C is displayed with "USB Serial Port (COM11)" under the COM&LPT ports.If I connect one of my M5Stack modules to the USB port, the M5 stack are displayed with "Silicon Labs CP210x USB to UART Bridge (COM6)" under the COM&LPT ports.
Should the M5Stick-C not display the same Silicon Labs CP210x ....?
Do I have to assume otherwise that it is defective!
Otherwise I would order one more !!Greetings Skink
P.S. The display of the port doesn't change if I switch the M5Stick-c to USB mode or to Wifi-Cloud mode via UIFlow!
-
m5stick-c