Announcement

Collapse
No announcement yet.

Using gauges with uOLED-160-g2

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

  • ch varma
    replied
    without using software serial, cant i communicate with ur 4d system display sir????..

    meaning: without using this command : - SoftwareSerial DisplaySerial (2,3);

    Leave a comment:


  • ch varma
    replied
    actually i attached a wrong code....sorry....check this attached code sir, i made it simple....
    Attached Files

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Welcome back!

    I'm not really sure how you're getting the "live!" message since I'm not seeing a Serial.begin() function on your code.

    Also, please note that based on this Arduino reference Article, the SoftwareSerial Library can only handle one port at a time.

    SoftwareSerial
    https://www.arduino.cc/en/Reference/softwareSerial

    Since you're using multiple Software Serial ports, you might be interested in using the listen() function as shown here

    Simple Multiple RX/TX SoftwareSerial?
    https://arduino.stackexchange.com/qu...softwareserial

    Two Port Receive
    https://www.arduino.cc/en/Tutorial/TwoPortReceive

    To ensure that the display has been properly initialized, I moved ss.begin(); to the end of the setup function.

    I hope this helps.

    Best regards,

    Leave a comment:


  • ch varma
    replied
    sir, i was trying to showcase a gps based digital speed value to my 4d display... though gps speed value and gps is working independently and using other lcd display, its not working with my 4d display. plz go through the code that i have shared.

    problems faced: serial moitor showing live! ok.. after that no responce. 4d display not showing any speed value or text.
    Attached Files

    Leave a comment:


  • michael_4D
    replied
    Hello,

    There are multiple ways of doing what you want. In my opinion, the simplest way would be to print it out as a string as we've previously discussed.

    You may find more details on the sample program "Display_print.ino" that could be found under C:\Users\Public\Documents\4D Labs\Goldelox Serial\Arduino\Goldelox_Serial_4DLib\Examples\Display_print.

    It would really be helpful to read and understand the application notes that we provide, this should help you gain a fundamental understanding on how to manipulate our displays.

    Application Notes:
    https://www.4dsystems.com.au/appnotes

    For more information on the Arduino command set, you may visit their Language reference page.

    Arduino Language Reference:
    https://www.arduino.cc/reference/en/

    I hope this helps.

    Best regards,

    Leave a comment:


  • ch varma
    replied
    HI SIR,

    need a code, to display two diff values from two diff sensors in same display, next to each other or through a switch, which will change from screen 1 to 2.

    test example: need to see both engine & vehicle speed from two diff sensors, in the same display either on same screen or by swifting from screen 1 to 2 using a switch


    plz provide me some code for that... thanks

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Similar to this:

    Display.txt_Width(3);
    Display.txt_Heght(3);
    Display.txt_MoveCursor(0,0);
    Display.print(reading)
    You could add Display.txt_FGcolour(color); to change the foreground of the text and txt.BGcolour(color); to change the background of the text.

    You could check Goldelox_Const4D.h at C:\Users\Public\Documents\4D Labs\Goldelox Serial\Arduino\Goldelox_Serial_4DLib (line 505 onwards) for the complete list of 16-bit color constants.
    Click image for larger version  Name:	Capture.PNG Views:	1 Size:	36.5 KB ID:	66483

    Alternatively, you could also enter the hexadecimal color value as the color parameter.

    Display.txt_FGcolour(ALICEBLUE); and Display.txt_FGcolour(0xF7DF); will have the same result.

    To ensure that the "Word Values" are recognized by the Arduino please ensure that Goldelox_Const4D.h is included on your project.

    You could do this by checking if you could see a #include "Goldelox_Const4D.h" on your Arduino program.

    This application note and this Arduino post might provide additional insights.

    You could also check GoldeloxBigDemo.ino at C:\Users\Public\Documents\4D Labs\Goldelox Serial\Arduino\Goldelox_Serial_4DLib\Examples\GoldeloxBigDemo for reference.


    Best regards,
    Last edited by michael_4D; 26 December 2018, 05:56 PM.

    Leave a comment:


  • ch varma
    replied
    sir its working now. like font size, how to change colour of text or digits ??? . i tried in visi environment its not changing

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Have you checked the blog post that I was referring to?

    That website had an example code, have you tried that?

    sir, sorry but i am getting confused due to some errors.
    could you give more details on these errors?

    Are you able to print accurate values on your Serial Monitor?

    If you could print accurate values on your Serial Monitor, the next step for you is to print those same values to your Goldelox display.

    Based on the Application notes the I previously sent, you can print anything on the Goldelox display using the print(); command.

    On the last Arduino program that I sent, there was a line that says Display.print(reading);. To print out whatever your RPM value is, all you need to do is change "reading" to your RPM Value.

    Best regards,
    Last edited by michael_4D; 20 December 2018, 01:20 PM.

    Leave a comment:


  • ch varma
    replied
    sir, sorry but i am getting confused due to some errors. could u share me a complete code, to show digital speed in 4d display using any digital pin of arduino using hall or ir sensor, or what part to modify in existing analogue pin code that you have sent previously.

    Leave a comment:


  • michael_4D
    replied
    Hello,

    If I'm not mistaken, the sample program on the link you sent will only produce a digital output of Hi (1) or Lo (0) right?

    Code:
    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
    cur_t=micros();
    
    
    Serial.println(1000000*60/(cur_t-t));
    //print the rpm
    t=micros();
    }
    prev_val=val;
    
    }
    Were you having issues with this one? I thought it was giving you a good RPM value.

    If I understand this correctly, this blog post might be more helpful for you.

    Best regards,
    Last edited by michael_4D; 20 December 2018, 01:19 PM.

    Leave a comment:


  • ch varma
    replied
    is there any map function for digital signals

    Leave a comment:


  • ch varma
    replied
    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

    http://www.theorycircuit.com/hall-ef...duino-program/

    Leave a comment:


  • michael_4D
    replied
    Hello,

    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:

    Code:
    Display.txt_Width(3);           
    Display.txt_Heght(3);
    Display.txt_MoveCursor(0,0);
    Display.print(reading)
    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,

    Leave a comment:


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

    Leave a comment:

Working...
X