Announcement

Collapse
No announcement yet.

Using gauges with uOLED-160-g2

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

  • pauleilio
    replied
    Hi,

    Could you try the attached code to see if it prints to the screen. Its possible that the font is the cause. If it is the cause we can work around that later but it will test if everything else is ok.

    Best regards

    Paul
    Attached Files

    Leave a comment:


  • ch varma
    replied
    need some help reg this code ... I'm using 4d 160g2 instead of TFT display for my new project. I'm trying to display any or some values or text from my old code to 4d display. but failed several times, as I can't able to know from the problem arises. when error logging using serial monitor, i found till display serial begin everything working well. thereafter display call back error is occuring.

    in that process, i tried to sum up working 4d code with my working old TFT display code. i made each and every TFT commands as comments & inserting 4d headers & code lines in it.

    im attaching text file 1 & 2 of which 1 being - old working TFT display code & 2 being working 4d display code.


    in detetail about code:
    its reg data logging from gps to sd card & cloud plus dispalying. serial1 - display
    serial2 - gps
    serial3 - wifi -nodemcu-cloud

    Attached Files

    Leave a comment:


  • ch varma
    replied
    thanks sir... the issue was solved

    Leave a comment:


  • pauleilio
    replied
    Hi,

    I can't really test your code as I don't have your GPS module but looking at the code I think that millis() would already be at 5000 when it enters the loop and will stay in the while(true);

    I've changed it a little to take that into account and also changed it so it will only check the GPS if there is SS activity but not sure how well it will work.

    Best regards

    Paul
    Attached Files

    Leave a comment:


  • ch varma
    replied
    sir, Im getting an "no gps found " msg on my 160g2 display. i have done the following

    1. loaded custom digital numbers from 4d visi to sd & display & loaded spi
    2. checked gps data is coming or not through tx,rx in other uno board and found to be working
    3. checked display is working or not through sample digital number code & found to be working
    4. connected display through hardware serial of arduino uno & gps through software serial

    the issue is with code itself which i combined using two examles. showing no gps found, but my gps is working fine

    plz help.. i have attached my code below

    Attached Files

    Leave a comment:


  • ch varma
    replied
    sir, i have now arduino mega, 4d display with me know

    plz share me a code that displayes any gps data ex- speed or latitude on 160g2 4d display & also in serial monitor along with your error logging

    Leave a comment:


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

Working...
X