No announcement yet.

Using gauges with uOLED-160-g2

  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    sir, same again.. i tried even that... i have attached a video, plz go through it... my two displays,arduino,wiring,10k resistor is perfect . i cross verified many times. my uSD card is 2 gb, which is working good too....... my display scrool shows: spe2 rev 1.3, pmmc rev 2.6,comm 9600 & arduino was set to 9600..

    im having a dought.. in 4d ide settings, generally the programme & widgets data was saved in Flash uSD, can i select RAM option also? & when.. Click image for larger version

Name:	photo.jpg
Views:	146
Size:	2.03 MB
ID:	66311


    • #17


      • #18

        You seem to have the Rx and Tx lines swapped, the yellow wire should be on pin D2 of the Arduino and the Orange wire should be on Pin D3 of the Arduino.
        Click image for larger version  Name:	Wiring.png Views:	1 Size:	484.7 KB ID:	66318
        When using goldelox modules, you're only allowed to use Flash as the program destination this Application Note provide a deeper explanation on that.

        Best regards,
        Last edited by michael_4D; 12 December 2018, 02:35 PM.


        • #19
          Thank you sir . After interchanging the Tx , Rx, its working properly now..thanks. also i have two problems:

          1. some times while clicking compile option, its not asking for uSD card and even not showing any loading option and fails to load programme in uSD card. its regularly happening with your gauge code file what u have shared & not with any other sample examples.

          2. i tried to alter your potentiometre code, to show RPM of my engine in digital form. but i cant able to. my arduino displays rpm value from 0 to 4000 on serial monitor. kindly help me with a code that can display rpm of engine in digital widget .

          forgot to tell that, last time you told rx to d3 , tx to d4. thats why i faced some problem.
          Attached Files


          • #20

            First of all, I'm sorry if you got confused with the Rx and Tx lines, but the wiring diagram I sent matches my previous instructions;

            Arduino GND pin -------------------------------------------------> Display GND pin
            Arduino 5V pin ----------------------------------------------------> Display 5V pin
            Arduino D2 pin-----------------------------------------------------> Display Tx Pin
            Arduino D3 pin ----------------------------------------------------> Display Rx Pin
            Arduino D4 pin -------------10K resistor---------------------> Display Reset Pin
            For your first question, The ViSi environment only asks for a uSD card if you've changed something on your graphical layout. If nothing is changed or if you've only changed the coding section, it will not ask for a uSD card, if it does then you could click on 'No Thanks'. If the project is made entirely of 4DGL codes and no graphical layout like some other sample programs, It will also not ask for a uSD card. You could read more about that on this Application Note.

            I experienced an error similar to your attached image when I had some files on my uSD card, what I did was I reformatted my uSD card and when it was completely empty, I just let the RAWcopy.exe do its work. Please also be informed that not all uSD cards are 'compatible' with our products, you could check this forum thread for more information.

            For your second question, you could can just comment out the map function and equate the reading parameter tothe reading of A0, In order for the display to show values from 0 to 4000, you'll need to edit the ViSi graphical layout and change the 'maximum value' parameter of the cool gauge to 4000. More instructions on modifying the cool gauge could be found here.

            A deeper explanation of the map function could be found here.

            If you'd like to know more about using our products, you could try consulting our Application Notes.

            You could also visit the Arduino website for a deeper explanation on some of the commands and functions that I used on the sample program that I sent.

            Best regards,


            • #21
              Thanks sir, I understood how to make 4d gauge widget as a slave to Arduino instructions.. the same I tried with digital numbering gauge, but can't able to display it.

              Is their any sample code, which can display a digital number widgets from Arduino serial monitor to 4d display, as I told u that, my I/p engine rpm signal to Arduino is not analogue, but digital. So need to display digital signal value from 0 to 4000 on 4d display. Kindly, if I have any other sample code, pls share


              • #22
                I think I'm asking more and more. But sorry sir, as I'm a guy with zero knowledge in coding and can't able customize codes as per my requirements. Initially I bought 3 displays of 4d systems thinking that it's just drag-drop-use . But later came to know, it's so tough and no video tutorials are available to that extent.


                • #23

                  May I know what RPM sensor you're using?

                  May I know how you're getting the 4000 value?

                  Are you able to print out the sensor value to the Serial monitor? If so, could you please send the Arduino code that you're using to do that?

                  I'm sorry if you're having a hard time with our module, we try to provide as much detailed information as we can through our application notes.

                  We also have this forum site for customer inquiries and suggestions.

                  Best regards,


                  • #24
                    //this code measures the difference between two rising edges of the digitalized signal coming from hall sensor and then prints the rpm.
                    //pin A0 is the signal pin

                    int refsig=200; //for converting the analog signal coming from hall sensor to digital through Arduino code

                    int val; //the digital value of the incoming analog signals

                    int prev_val=0;

                    unsigned long t,cur_t; //time variables

                    void setup()

                    void loop() //Measure RPM
                    int sig=analogRead(A0); //read raw value of hall sensor

                    if(sig>refsig) val=HIGH; //convert it to digital 0,1 form

                    else val=LOW;

                    if(prev_val==0 && val==1)

                    { //check for rising edge

                    //print the rpm



                    • #25
                      1. im using hall sensor. just a bare 3 pin magnetic field sensor with vcc, grd & singnal pins.

                      2. im getting 4000rpm by just a simple rpm formula


                      • #26

                        A sample program for writing to custom digits is discussed in this forum thread (sample program on post #7).

                        If you're interested in using custom digits for your project, you might want to read up on that.

                        However, if you find that it's too complicated for your skill level, I would suggest using a third party font and printing the sensor value to the display instead.

                        You might want to read this application note for a deeper explanation.

                        I'm assuming 1000000*60/(cur_t-t) is the rpm value, right? to print that with the sample program I sent, you just need to put that in the place of 'reading'.

                        Best regards,
                        Attached Files


                        • #27
                          Sir, how to increase the font or number size in 4d display . Share me that single line code & where to paste.


                          • #28

                            Have you taken time to read the Goldelox Serial Command reference manual on C:\Users\Public\Documents\4D Labs\4DUpdates\Manuals?

                            Under the Text and Strings command section, you can find the Text Width and Text Height commands.

                            To implement this on Arduino you could put these commands before the text printing command. Similar to this:

                            You can also edit the font size of the string widget itself. This was explained on this Application note that I previously mentioned.

                            Best regards,


                            • #29
                              sir, how to display speed using same hall sensor, but connected to digital pin. i used that shared link as a refference and altered ur code from analogue to digital but of no output.
                              plz help
                              using hall sensor digital signal 0 & 1 , i need to display speed in ur 4d system display



                              • #30
                                is there any map function for digital signals