Jump to content
LegacyGT.com

Underdog

I Donated Too
  • Posts

    4,428
  • Joined

  • Days Won

    12

Posts posted by Underdog

  1. I'm not going to use the display for ethanol % because we don't have e85 around here. I'll be displaying: time/date (from the DS3231 RTC), outside temp (tapped off the factory sensor), intake air temp (tapped of the MAF sensor), and DCCD % lock (5V output signal from my DCCD controller).

     

     

    I'm using Wire.h for I2C and U8g2lib.h to drive my screens (they have SSD1309 controllers).

     

     

    The constructors for my screens are:

    U8G2_SSD1309_128X64_NONAME0_1_HW_I2C oled1(U8G2_R0, U8X8_PIN_NONE);
    U8G2_SSD1309_128X64_NONAME0_1_HW_I2C oled2(U8G2_R0, U8X8_PIN_NONE);

    The "1" in between "NONAME0" and "HW_I2C" means I'm using page buffering, which dictates how I display to the screens. The “HW_I2C” means I’m using the hardware I2C for my Arduino (the SDA and SCL pins). You can use other pins with software (SW) I2C but you have to assign them in the () of the constructor. U8g2 explains all this in their readme on GitHub.

     

     

    My setup code is:

    void setup() {
     oled1.setI2CAddress(0x3C * 2); //This is the default address for my display/controller
     oled2.setI2CAddress(0x3D * 2); //This was changed for the 2nd display by soldering a pad on the breakoutboard
     oled1.begin();
     oled2.begin();
     oled1.setFont(u8g2_font_7x14_mf);
     oled2.setFont(u8g2_font_7x14_mf);
     }

    And in the loop I basically do whatever operations I need (removed for clarity) then output to the display using a do/while loop with firstPage() and nextPage() (this is because of the page buffering that I mentioned earlier - if I had more RAM I could do full frame buffering, though I don't really need the speed). The following code will display "SCREEN 1" on oled1 and "SCREEN 2" on oled2. I use the refresh# variable so that the display only updates if I've changed something that needs to be displayed, which doesn't happen in this sample code. The refresh variables are set to 1 when I declare them (not shown here), then you can see they are set to 0 after the screen is displayed.

     

    void loop() {
    
     //Draw to screen 1 if refresh1 has been flagged
     if(refresh1 == 1) {
       oled1.firstPage();
       do {
         oled1.drawStr(36,20,"SCREEN 1");
       } while ( oled1.nextPage() );
       refresh1 = 0;
     }
    
     //Draw to screen 2 if refresh2 has been flagged
     if(refresh2 == 1) {
       oled2.firstPage();
       do {
         oled2.drawStr(36, 20, "SCREEN 2");
       } while ( oled2.nextPage() );
       refresh2 = 0;
     }
    
     delay(1000);
    
    }

     

    If you have the ethanol % stored in a variable (say "ethanol" for example) you could simply replace

    oled1.drawStr(36,20,"SCREEN 1");

     

     

    with something like

     

    oled1.setCursor(0,20);
    oled1.print(ethanol);
    oled1.print("%");

  2. Trimming the inner tie rod is optional but recommended, whether you use OEM or whiteine outer tie rods (I was using the KCA313 when I wrote that DIY). It’s a super easy mod that’s a lot easier to do off the car, but it’s not strictly necessary. Wouldn’t it suck to get to the alignment shop and once it’s on the rack they tell you they can’t bring in one side to your spec?
  3. I've hit a bit of a wall trying to get my Arduino to play nice with the 128x64 OLEDs I bought. First I have to run all the communications through a logic level shifter since the Arduino UNO logic is 5V and the displays use 3.3V, though this is pretty straightforward and just adds a bunch of wires. However I still can't seem to get the screen to display even a basic "Hello World!" type message, so I've had to ask on the Arduino forums. Anyways, it's still fun trying to figure this stuff out, and hopefully I'll have more updates soon!

    IMG_2751.thumb.jpg.3faa48fe7ef0ef874277b11b374a964e.jpg

  4. Picked up this little gem the other day... it's a hoot to shoot, and about the only caliber I can afford to shoot right now, LOL.

     

    That looks like a lot of fun. I’d love to get something to plink with like a 22lr AR or a PCC... I haven’t been able to find 7.62 milsurp for my M1A in months if not a year at this point, and I don’t want to use up my reserves.

  5. Man... I was 6 when my car was purchased August 2005 by the original owner. Funnily enough, I now work for the dealer that this car was purchased from.

     

    What do most who end up giving up on theirs end up buying afterwards? There just aren't any cars out there like it if, in the case of my car, you value a manual transmission.

     

    Still have my LGT so not an exact answer to your question, but I went from daily driving my Legacy to a 5MT OBXT which I finally traded in last year for a ‘19 Accord 2.0T sport with the 10AT. It’s a modern version of everything I wanted from my Legacy back in 2006, with the obvious exception of being FWD (MT was at least an option for 2019, though hard to find). It’s a great appliance, much larger cabin and exterior dimensions though similar weight to the LGT, but it’s not nearly as fun to drive as the Legacy. I paid $23k for it, new, which is what my Legacy cost (also new) 14 years ago. It also has a lot of bolt-on mod options since it has the K20 from the Civic Type R.

  6. Thanks for the reply. I performed that fix in my 09 OBXT and am familiar with it. The indicators do seem to be functioning correctly for seatbelt status - it’s the occupant detection that I think is incorrect. I had punctured the bladder in the passenger seat when I swapped parts over to my Bride seats. I made a voltage divider to simulate the bladder pressure sensor, and used a switch to toggle between two resistance values so I could simulate an empty seat and an occupied seat. I think what’s happening now is that the “empty” resistance is not quite right and the ODS brain thinks there is someone ver light in the passenger seat - hence the airbag being “off” but the seatbelt chime on. When I fasten the seatbelt - chime stops. When I toggle the switch on my bypass module the airbag goes from “off” to “on”, regardless of whether the seatbelt is connected. Also, sometimes it all behaves totally normal. The intermittent part makes me think you could be right, but it’s weird that the display otherwise works correctly.

     

    Maybe I’ll open up my bypass module and try a higher resistance on the “disarmed” side of the divider.

     

     

    edit: checked over my work - I had swapped R1 and R2 when I assembled the bypass. Corrected the error and all is behaving normally.

  7. Recently I've noticed my passenger seat belt chime going off intermittently, even though there's no passenger in the seat. My occupant detection system bypass module is still working - the pass. airbag display in the map light will switch from "OFF" to "ON" when I toggle the switch. Plugging in the seat belt makes it stop. The click-to-disable doesn't seem to work anymore, though it's possible I forgot how many clicks to try - though I'm still not sure why the ODS thinks there is someone in the seat in the first place. Maybe I need a higher resistance value for the "disarmed" side of the switch? Would anyone be willing to check the resistance of the 06-09 seat while empty and occupied?
×
×
  • Create New...

Important Information

Terms of Use