No announcement yet.

Error while connecting to 4Duino to Workshop 4

  • Filter
  • Time
  • Show
Clear All
new posts

  • Error while connecting to 4Duino to Workshop 4

    I tried to connect for the first time my 4Duino Board to Workshop 4 IDE, but when I press "connect" on the COMms section it says "Device is not responding". I already double checked the COM port.

  • #2

    Welcome to the forum

    The 4Duino com port is selected in the dropdown on the right

    .Click image for larger version

Name:	4duinoselect.png
Views:	132
Size:	29.4 KB
ID:	59568

    The red button is for detecting other 4d Displays and if you need to connect to the Picaso display which shouldn't be necessary.

    A setup guide can be found here which may help

    Best regards



    • #3
      I have this :
      Click image for larger version

Name:	Schermata 2017-09-11 alle 20.49.33.png
Views:	121
Size:	7.3 KB
ID:	59570
      If I try to upload the code to the board I have an error (An error occurred while uploading the sketch / Completed RC=1)


      • #4

        Can you let me know if there were any other compile errors or send me the code you were trying to upload.

        Best regards



        • #5
          Here's the code:
          // Define LOG_MESSAGES to a serial port to send SPE errors messages to. Do not use the same Serial port as SPE
          //#define LOG_MESSAGES Serial

          %%Display%%.DefineResetLine ; // *Replaced* at compile time with define for reset line connected to the display
          %%Display%%.DefineDisplaySerialx ; // *Replaced* at compile time with define the Serial Port connected to the display

          #include "SandboxConst.h"

          %%Display%%.IncludeSerial_4DLib ; // *Replaced* at compile time with an Include the Serial Library relevant to the display
          %%Display%%.IncludeSerial_Const4D ; // *Replaced* at compile time with an Include the Constants file relevant to the display

          %%Display%%.AssignDisplaySerialtoLibrary ; // *Replaced* at compile time with an Assign of the correct Serial port to the correct library

          // Uncomment to use ESP8266
          //#define ESPRESET 17
          //#include <SoftwareSerial.h>
          //#define ESPserial SerialS
          //SoftwareSerial SerialS(8, 9) ;
          // Uncomment next 2 lines to use ESP8266 with ESP8266 library from
          //#include "ESP8266.h"
          //ESP8266 wifi(SerialS,19200);

          // routine to handle Serial errors
          void mycallback(int ErrCode, unsigned char Errorbyte)
          #ifdef LOG_MESSAGES
          const char *Error4DText[] = {"OK\0", "Timeout\0", "NAK\0", "Length\0", "Invalid\0"} ;
          LOG_MESSAGES.print(F("Serial 4D Library reports error ")) ;
          LOG_MESSAGES.print(Error4DText[ErrCode]) ;
          if (ErrCode == Err4D_NAK)
          LOG_MESSAGES.print(F(" returned data= ")) ;
          LOG_MESSAGES.println(Errorbyte) ;
          LOG_MESSAGES.println(F("")) ;
          while (1) ; // you can return here, or you can loop
          // Pin 13 has an LED connected on most Arduino boards. Just give it a name
          #define led 13
          while (1)
          digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
          delay(200); // wait for a second
          digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
          delay(200); // wait for a second
          // end of routine to handle Serial errors

          word hndl ;

          void setup()
          // Ucomment to use the Serial link to the PC for debugging
          // Serial.begin(115200) ; // serial to USB port
          // Note! The next statement will stop the sketch from running until the serial monitor is started
          // If it is not present the monitor will be missing the initial writes
          // while (!Serial) ; // wait for serial to be established

          pinMode(RESETLINE, OUTPUT); // Display reset pin
          %%Display%%.Toggle_Reset_On ; // *Replaced* at compile time with correct rest on logic for the attached display
          delay(100); // wait for it to be recognised
          %%Display%%.Toggle_Reset_Off ; // *Replaced* at compile time with correct rest off logic for the attached display
          // Uncomment when using ESP8266
          // pinMode(ESPRESET, OUTPUT); // ESP reset pin
          // digitalWrite(ESPRESET, 1); // Reset ESP
          // delay(100); // wait for it t
          // digitalWrite(ESPRESET, 0); // Release ESP reset
          delay(3000) ; // give display time to startup

          // now start display as Serial lines should have 'stabilised'
          %%Display%%.DisplaySerial.Begin_Speed ; // *Replaced* at compile time with command to start the serial port at the correct speed
          Display.TimeLimit4D = 5000 ; // 5 second timeout on all commands
          Display.Callback4D = mycallback ;

          // uncomment if using ESP8266
          // ESPserial.begin(115200) ; // assume esp set to 115200 baud, it's default setting
          // what we need to do is attempt to flip it to 19200
          // the maximum baud rate at which software serial actually works
          // if we run a program without resetting the ESP it will already be 19200
          // and hence the next command will not be understood or executed
          // ESPserial.println("AT+UART_CUR=19200,8,1,0,0\r\n") ;
          // ESPserial.end() ;
          // delay(10) ; // Necessary to allow for baud rate changes
          // ESPserial.begin(19200) ; // start again at a resonable baud rate
          Display.gfx_ScreenMode(PORTRAIT) ; // change manually if orientation change
          if (!(Display.file_Mount()))
          Display.putstr("Drive not mounted...");
          //hFontn = Display.file_LoadImageControl("NoName1.dnn", "NoName1.gnn", 1); // Open handle to access uSD fonts, uncomment if required and change nn to font number
          //hstrings = Display.file_Open("SANDBO~1.txf", 'r') ; // Open handle to access uSD strings, uncomment if required
          hndl = Display.file_LoadImageControl("SANDBO~1.dat", "SANDBO~1.gci", 1);
          // put your setup code here, to run once:
          } // end Setup **do not alter, remove or duplicate this line**

          void loop()
          // put your main code here, to run repeatedly:


          • #6

            Can you try to upload an example in the Arduino IDE just so we can see if is working through the Arduino IDE.

            Open the Arduino IDE and click on Tools, then Board and select the 4Duino. Next click on Tools again, then Port and select the port the 4Duino is using.

            Click on File, Examples,01.Basics and then Blink.

            Click on the upload Icon ->

            and let me know if it uploaded ok.

            Best regards



            • #7
              I have a error:
              Impossibile trovare una scheda sulla porta selezionata. Controlla di
              avere selezionato la porta giusta. Se รจ giusta, prova a premere il tasto di
              reset sulla scheda subito dopo aver avviato il caricamento dello sketch
              (Translated with Google Translate):
              Could not find a tab on the selected port. Check out have selected the right port. If it is correct, try pressing the reset on the card immediately after you start loading the sketch


              • #8
                Ok, can you check in Device manager to see if the 4Duino is shown as a port



                • #9
                  Like this

                  Click image for larger version

Name:	4duinodev.png
Views:	117
Size:	12.1 KB
ID:	59581


                  • #10
                    If your port doesnt look like above, Download and unzip the attached file. Right click on the port that is shown in the Device manager, then click on Update Driver software. In the next window that opens, click on Browse my computer and then navigate to where you unzipped the driver and then follow the prompts.

                    Back in Device manager, the port should show as above..

                    Best regards

                    Attached Files


                    • #11
                      I've already installed the drivers:
                      Click image for larger version  Name:	Schermata 2017-09-13 alle 18.21.16.png Views:	2 Size:	22.0 KB ID:	59598
                      Last edited by MarcoBuster; 14 September 2017, 03:49 AM.


                      • #12

                        Thanks for the image of your device manager. What version of Arduino IDE are you using ?



                        • #13
                          The latest version, Arduino CC 1.8.4 for Windows 10


                          • #14

                            Everything looks correct and should work for you, the only other thing that can rarely happen is your bootloader may be corrupted but it isn't likely as it is a first time use and the syptoms are slightly different. It may be worthwhile removing the device and re-installing it with the supplied driver.