New!!OBD2 Com with Xsim3 and Arduino-New!!

Dashboard, gauge projects etc.
Please use the image gallery for your pictures, a short tutorial can be found here.
The first image in the first post will be shown in the project gallery.

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby sirnoname » Sat 18. Apr 2015, 00:02

LCD Studio has nothing to do with this code. Read the manual and use comport.
If a answer is correct or did help you for a solution, please use the solve button.
User avatar
sirnoname
Site Admin
 
Posts: 1829
Images: 45
Joined: Thu 1. Sep 2011, 22:02
Location: Munich, Germany
Has thanked: 35 times
Been thanked: 128 times

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby rdriver » Sat 18. Apr 2015, 21:32

pls guide me. where is the manual?
rdriver
 
Posts: 6
Joined: Sun 12. Apr 2015, 22:22
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby algea » Fri 24. Apr 2015, 20:53

Is this for a GLCD and if so is the same pins used as 16x2 LCD.
Thanks.
algea
 
Posts: 1
Joined: Mon 20. Apr 2015, 18:05
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby liuxi » Sat 5. Sep 2015, 19:45

Hello there! In accordance with the successful application tutorial arduino + Tm1638, but why only LFS effective, other games did not show. My X-sim is free subscribers, primarily playing racing program and AssettoCorsa. I'm sorry I was a novice from China, English only rely on Google to help, if the syntax nowhere please understand!
liuxi
 
Posts: 2
Joined: Sat 29. Aug 2015, 07:05
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby wosh » Sat 10. Sep 2016, 16:26

Great :D
wosh
 
Posts: 1
Joined: Sat 10. Sep 2016, 16:22
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby manc0ntr0 » Fri 3. Feb 2017, 20:33

Hi all.
Much time since anyone talk about this great code. I'm beginning with Arduino and TM1638 and trying what is explained in this thread.
For now I tested Richard Burns and seems to work well. I had to change one thing in leds part because if I'm not playing all LEDs are blinking. I changed "rpmleds==10" instead "rpmleds>=10" and now is working well.

I'm trying to have the possibility to manually adjust rpm but I have some issues. Max RPM change well, but when RPM raises, LEDs light up until new rpmmax and then light off instead remain blinking.
I want to to this because some cars have ideal rpm in 5000 but then can reach 8000, for example. And I want all LEDs blink at 5000, not 8000.

Here is the code I made to change max RPM:

Code: Select all
         case 0b00100000:
         mode = 6;
          rpmmax=rpmmax-250;
          module.setDisplayToDecNumber( rpmmax, 0, false );
          mode = 2;
            break;
         case 0b01000000:   
         mode = 7;
          rpmmax=rpmmax+250;
          module.setDisplayToDecNumber( rpmmax, 0, false );
          mode = 2;
            break;


mode 2 is to display gear and rpm, so if I push the button, rpmmax is modified and then back to show gear and rpm in display.
As I said it changes rpmmax but then LEDs didn't work properly.
Here is the code for LEDs:

Code: Select all
         if ( mode == 8 )
         {
                module.setDisplayToDecNumber( rpmmax, 0, false );
                if ( rpmlast > ( rpmmax + 200 ) )
            {
               rpmmax = rpmlast;
                }
                mode = 2;
         }
         
         
rpmleds = map(rpm,rpmmax*0.75,rpmmax,0,10);    // distributes the rpm level to the 8 leds + 1 for shift change
         if ( rpmleds==1 ) {
            module.setLEDs( 0b00000000 | 0b00000000 << 8);
         }
         if ( rpmleds==2 ) {
            module.setLEDs( 0b00000001 | 0b00000000 << 8 );
         }
         if ( rpmleds==3 ) {
            module.setLEDs( 0b00000011 | 0b00000000 << 8 );
         }
         if ( rpmleds==4 ) {
            module.setLEDs( 0b00000111 | 0b00000000 << 8 );
         }
         if ( rpmleds==5 ) {
            module.setLEDs( 0b00001111 | 0b00000000 << 8 );
         }
         if ( rpmleds==6 ) {
            module.setLEDs( 0b00011111 | 0b00000000 << 8 );
         }
            if ( rpmleds==7 ) {
            module.setLEDs( 0b00111111 | 0b00000000 << 8 );
         }
            if ( rpmleds==8 ) {
            module.setLEDs( 0b01111111 | 0b00000000 << 8 );
         }
         if ( rpmleds==9 ) {
            module.setLEDs( 0b00000000 | 0b11111111 << 8 );
         }
         if ( rpmleds==10 ) {
            module.setLEDs( 0b00000000 | 0b11111111 << 8 );
            delay ( 20 );
            module.setLEDs( 0b00000000 | 0b00000000 << 8 );
            delay ( 20 );
         }
      }         
     
      rpmlast = rpm;


Any help will be appreciated.

Sorry for my english.
manc0ntr0
 
Posts: 7
Joined: Sun 8. Jan 2017, 20:42
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby manc0ntr0 » Tue 7. Feb 2017, 17:40

Hi again.

Seems like nobody is looking this thread any more haha.

I've been testing some games and for now I found that Richard Burns Rally, GTR Evolution and pCARS worked. But pCARS disconnects few minutes after start and I have to go to desktop and play game again in Extractor.

Dirt Rally, Assetto Corsa and rFactor2 didn't worked. I see a window showing info about some of them but no data displayed and "game paused" is checked and I can't uncheck it.
manc0ntr0
 
Posts: 7
Joined: Sun 8. Jan 2017, 20:42
Has thanked: 0 time
Been thanked: 0 time

Re: New!!OBD2 Com with Xsim3 and Arduino-New!!

Postby devrimci » Sun 26. Feb 2017, 12:12

I got a Problem, with Dirt it is ok, but it will not work with pcars. Shared Memory is on.
I installed last time Windows 10 and after that it doesnt work anymore. On Win 7 i didnt have any problems.

Another Problem is, that it shows me too much RPM and when its high it goes to minus.
devrimci
 
Posts: 3
Joined: Sun 26. Feb 2017, 11:03
Has thanked: 0 time
Been thanked: 0 time

Previous

Return to Peripheral Projects

Who is online

Users browsing this forum: No registered users and 1 guest