Announcement

Collapse
No announcement yet.

Upload issue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload issue

    Hi i am new to the 4d system products, been using arduino for a while. I am having issue uploading this sketch on 4d workshop to gen-iod-32. I am getting rc=1. I am trying to get different fastled sketching running off a button.

    it uploads fine until i put this line off code in, FastLED.addLeds"WS2812B, DATA_PIN, RGB"(leds, NUM_LEDS);

    #include "ESP8266WiFi.h"
    #include "GFX4d.h"
    #include "FastLED.h"

    GFX4d gfx = GFX4d();

    #include "ButtonsConst.h" // Note. This file will not be created if there are no generated graphics

    #define NUM_LEDS 1

    int state;

    CRGB leds[NUM_LEDS];

    void setup()
    {
    gfx.begin();
    gfx.Cls();
    gfx.ScrollEnable(false);
    gfx.BacklightOn(true);
    gfx.Orientation(PORTRAIT);
    gfx.SmoothScrollSpeed(5);
    gfx.TextColor(WHITE, BLACK); gfx.Font(2); gfx.TextSize(1);
    gfx.Open4dGFX("BUTTON~1"); // Opens DAT and GCI files for read using filename without extension. Note! Workshop generates files with Short filenames
    gfx.imageTouchEnable(iWinbutton1, true) ; // Winbutton1 show initialy, if required
    gfx.UserImages(iWinbutton1,0) ; // Winbutton1 show initialy, if required
    gfx.imageTouchEnable(iWinbutton2, true) ; // Winbutton2 show initialy, if required
    gfx.UserImages(iWinbutton2,0) ; // Winbutton2 show initialy, if required
    gfx.imageTouchEnable(iWinbutton3, true) ; // Winbutton3 show initialy, if required
    gfx.UserImages(iWinbutton3,0) ; // Winbutton3 show initialy, if required

    FastLED.addLeds"WS2812B, DATA_PIN, RGB"(leds, NUM_LEDS);


    } // end Setup **do not alter, remove or duplicate this line**

    void loop()
    {
    gfx.touch_Update();
    state = gfx.touch_GetPen();
    if(state == TOUCH_PRESSED){
    if(gfx.imageTouched() == iWinbutton1){
    gfx.UserImages(iWinbutton1, 1);

    }
    if(gfx.imageTouched() == iWinbutton2){
    gfx.UserImages(iWinbutton2, 1);

    }
    if(gfx.imageTouched() == iWinbutton3){
    gfx.UserImages(iWinbutton3, 1);


    leds[0] = CRGB::Red;
    FastLED.show();
    delay(500);
    // Now turn the LED off, then pause
    leds[0] = CRGB::Black;
    FastLED.show();
    delay(500);
    //do something
    }
    }
    if(state == TOUCH_RELEASED){
    gfx.UserImages(iWinbutton1, 0); // Winbutton1 where state is 0 for up and 1 for down
    gfx.UserImages(iWinbutton2, 0); // Winbutton2 where state is 0 for up and 1 for down
    gfx.UserImages(iWinbutton3, 0); // Winbutton3 where state is 0 for up and 1 for down
    }
    // put your main code here, to run repeatedly:
    yield(); // Required for ESP
    }
    Last edited by Jynx; 4 weeks ago.

  • #2
    Hi

    Welcome to the forum,

    I can't see anything visibly wrong but the RC1 error isn't very useful to you. Have you tried compiling uploading in the Arduino IDE, it may give you a more detailed reason for the failure.

    The error may also be the result of an earlier version of the ESP8266 core. If it is below 2.5.2 could you please try to update it.

    Best regards

    Paul

    Comment


    • #3
      Hi Paul

      Thanks for the fast response. i have tried through arduino ide and says winbutton not declared wasn't sure the best way to declare them. all software is up to date only downloaded two days ago.

      regards

      wayne

      Comment


      • #4
        figured out the declared button issue.

        Comment


        • #5
          Originally posted by Jynx View Post
          figured out the declared button issue.
          Thats great news, thank you for the update

          Comment


          • #6
            Hi,

            I have attached a registry key as a fix if the compile times out in Workshop. Later versions of the Arduino take a bit longer to compile so please instalol the key if you notice this happening.

            Best regards

            Paul
            Attached Files

            Comment


            • #7
              HI thanks, i am sure i have installed that will run it again. The sketch does upload with arduino and not workshop4. However when i push the button it does not run the fastled sketch. i have tested pin 16 with two buttons sending them high and low that works.

              Comment


              • #8
                Hi,

                If it's a touch issue try adding this line to your setup code

                gfx.touch_Set(TOUCH_ENABLE);


                Paul

                Comment

                Working...
                X