Announcement

Collapse
No announcement yet.

Using gauges with uOLED-160-g2

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

  • ch varma
    started a topic Using gauges with uOLED-160-g2

    Using gauges with uOLED-160-g2

    sir, someone help. i dont know where to post my dought and posted here..... sir im using arduino uno + 160 g2 goldlex + pa5 for displaying a speed gauge (digital or analog) for my vehicle project.

    plz help with a code as im not pro in serial or arduino code ;

    i tried to run visi gauges with arduino, but no use or help me in sharing a code wher in 160 g2 display will act like a slave for arduino host to display visi gauges....

    plz

  • michael_4D
    replied
    Hello,

    I do not have the other parts required for the project that you've linked and I cannot fully simulate this.

    Please understand that there is no quick solution to this, you'll need to understand the underlying concept of how the code works in order to taylor this to your needs.

    As far as I can understand, most of the syntax on printing to the LCD display on that project is closely similar to the goldelox serial library's command set.

    tft.setTextSize(1) for example is very similar to txt_Width(multiplier) and txt_Height(multiplier) that we've previously discussed.

    To be guided further on the goldelox Serial Command Set, I would Suggest reading the Goldelox Serial Command Refference Manual, Goldelox_Serial_4DLib.h might also help in understanding the proper syntax for the Goldelox Serial Library for the Arduino.

    For the part where something gets written or read out of the uSD card, please see the attached sample project.

    I really hope this helps.

    Best regards,
    Attached Files

    Leave a comment:


  • ch varma
    replied
    sir, im trying to modify this code to display some values from tft display to your 4d systems display.....but cant able to suceed...plz help

    project aim: to display team picture, gps speeds, laps, time etc

    this is the link for that project: https://create.arduino.cc/projecthub...atayu&offset=0

    Attached Files

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Based on the Arduino Mega Reference Page.

    Serial: 0 (RX) and 1 (TX); Serial 1: 19 (RX) and 18 (TX); Serial 2: 17 (RX) and 16 (TX); Serial 3: 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
    Since the Arduino Mega has multiple hardware serial ports, you don't necessarily need the Software Serial Library, thus you can remove the "#include <SoftwareSerial.h>" line if you want.

    You might also want to change "SoftwareSerial DisplaySerial (2,3)" into #define DisplaySerial Serial.

    This will allow you to use Serial0 (D0 and D1) to communicate with the Display.

    If you want to use Serial0 for talking with your PC (error Logging), You may also use Serial 1 (D19, D18), Serial 2 (D17, D16), or Serial 3 (D15, D14) just as long as you have your RX and TX wired correctly.

    You can apply the same concept to your GPS device ("SoftwareSerial ss(RXPin, TXPin);").

    Please be careful not to use the same Serial Port to talk to different devices.

    I hope this helps.

    Best regards,

    Leave a comment:


  • ch varma
    replied
    here is the arduino uno supported code.....but display not showing any value....as u said, it wont as i dont have two serial ports in uno
    Attached Files

    Leave a comment:


  • ch varma
    replied
    1. sir, i procured arduino mega....plz help me in modifying the code so as to show the gps speed in display......
    2. while running existing code, that u have shared, serial 2,3 pins are not working...i tried with 10,11,12,13...which are working
    3. how to show two rpms in same display but when a button is pressed...so that display changes from one sensor to other


    plz help , as my project tenure is ending.....

    Leave a comment:


  • michael_4D
    replied
    Hello,

    Unfortunately, the Arduino UNO only has one hardware serial port. If you'd like to use multiple hardware serial ports, you might be better off at using an Arduino Mega which has 3 Hardware serial ports or other arduinos with multiple hardware serial ports.

    Other than that, I think your best option might be to learn to manage your Serial communication traffic similar to the Two Port Receive Sample program.

    Best regards

    Leave a comment:


  • ch varma
    replied
    Sir, thanks for the reply...but still I need to display value in both display and serial monitor...

    Leave a comment:


  • michael_4D
    replied
    Hello,

    As you may know, we're currently using the Arduino uno's only Hardware serial port for error logging.
    If you want, you can use this hardware serial port to talk to your Display or GPS device.

    To use it for your display, you may follow these steps:

    1. On your code, replace SoftwareSerial DisplaySerial (2,3); with #define DisplaySerial Serial
    2. Remove Serial.begin(9600); on your setup so it looks something like this:
    Code:
    void setup()
    {
      ss.begin(GPSBaud);
      Display.TimeLimit4D = 5000 ;
      DisplaySerial.begin(9600) ;
      Display.gfx_ScreenMode(LANDSCAPE);
      Display.SSTimeout(0) ;
      Display.SSSpeed(0) ;
      Display.SSMode(0) ;
      Display.media_Init();
      Display.gfx_Cls();
      delay(1000);
    }
    3. Reconnect your hardware so that:
    Arduino D0 pin-----------------------------------------------------> Display Tx Pin
    Arduino D1 pin ----------------------------------------------------> Display Rx Pin

    GND, Reset, and 5v should remain on their previous position.


    Please note that doing this would remove the error logging function of this program. This means that you will not be seeing anything useful on the Serial monitor. It's also not recommended to open the serial monitor while your Arduino is communicating with the display. Any instance of printing to Serial0 (Serial.print(); ) should be removed from your code.

    You might want to consult this application note as reference for using Serial0 to communicate with the display

    Serial Connection to an Arduino Host
    https://www.4dsystems.com.au/appnote/4D-AN-00092/

    This demo project uses Serial0 for communicating with the Display. You may use this as reference as well.

    Display_print.ino
    https://github.com/4dsystems/Goldelo...play_print.ino

    Best regards,

    Leave a comment:


  • ch varma
    replied
    sir, the below attached code is for LCD basic 16x2 displays...which is working very fine.... but to replicate that GPS based speed, in ur 4d display, its a bit tough....without using multi serial comm, cant i end up using any simple technique... share me any simple links sir...

    Leave a comment:


  • 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:

Working...
X