Arduino Open Source X-PID firmware incl.360°option

AMC, H-Bridge 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: Arduino Open Source X-PID firmware

Postby sirnoname » Tue 19. Feb 2013, 01:02

Updated to version 1.1
I have tested v1.0 with arduino nano and it does not really work. It seems the serial converter has problems on my board but must not on all boards. If a arduino do not work you have to change in the script the line "Serial.begin(115200);" . Comment with a leading // the line and uncommend the line "Serial.begin(9600);". Then upload the new arduino script and gice it a try. There is nearly no difference with lower baud rates. Will test this code with other boards. Added serial port error count to verify a stable connection. Also the plugin of X-Sim is updated and now stable. There was many errors that are now fixed.
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: Arduino Open Source X-PID firmware

Postby rohithkumar » Tue 19. Feb 2013, 07:59

sirnoname wrote:which issue?
Arduino is easily detected by X-sim and I can see the RX,TX blinking when i open USB-XPID settings.


Sorry i think i have miss directed my problem to you. RX,TX blinking only when i open settings of USB-XPID. but while i am playing the game i cant see any (RX)Receiving data to board.

Any way i will try changing the values you have suggested!!! thank you so much i will update the progess
rohithkumar
 
Posts: 25
Joined: Sat 26. Jan 2013, 21:45
Has thanked: 0 time
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby sirnoname » Tue 19. Feb 2013, 09:46

Slooooowly mate!
I wrote you to have a look at the pololu thread how you have to setup the direct output, else you will not get the position data from math to interface setup.
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: Arduino Open Source X-PID firmware

Postby rohithkumar » Tue 19. Feb 2013, 12:08

Hi every one
rohithkumar
 
Posts: 25
Joined: Sat 26. Jan 2013, 21:45
Has thanked: 0 time
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby sirnoname » Tue 19. Feb 2013, 12:24

Ok, found the problem of the not working arduino with FTDI detection.
The answer is noted on the arduino page:
Automatic (Software) Reset

Rather then requiring a physical press of the reset button before an upload, the Arduino Nano is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the FT232RL is connected to the reset line of the ATmega168 or ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Nano is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Nano. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.


This means I have to wait for a whole second after I have opened the comport because windows will also make a reset if I touch the port. Will change the plugin to that text.
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: Arduino Open Source X-PID firmware

Postby ericRacer » Tue 19. Feb 2013, 15:00

You are close to the solution ! :D :D :D
User avatar
ericRacer
X-Sim Supporter
 
Posts: 80
Images: 36
Joined: Wed 28. Mar 2012, 15:04
Location: Canada, Qc, Jonquiere
Has thanked: 3 times
Been thanked: 2 times

Re: Arduino Open Source X-PID firmware

Postby rohithkumar » Wed 20. Feb 2013, 08:20

Great thank you,
My board is talking with the game now!! :D
You have left us lot of information for us in this forum

Now comes the output but the values coming out of the game are not changing, I have used serial monitor to find out what is going on
with this string in the USO X~a01~~a02~
X= 58, a01= 01or02, a02= 02or03 next value unknown
I think i got "x" ASCII 58 as correct but rest of the values coming out they don't seem to be reasonable what do you think ?
Attachments
rohithkumar
 
Posts: 25
Joined: Sat 26. Jan 2013, 21:45
Has thanked: 0 time
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby sirnoname » Wed 20. Feb 2013, 09:45

I would say typing mismatch in your USO line. Make a screenshot of your USO setup.
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: Arduino Open Source X-PID firmware

Postby rohithkumar » Wed 20. Feb 2013, 11:25

Here are my screen shorts of my settings
Attachments
rohithkumar
 
Posts: 25
Joined: Sat 26. Jan 2013, 21:45
Has thanked: 0 time
Been thanked: 1 time

Re: Arduino Open Source X-PID firmware

Postby RichP » Wed 20. Feb 2013, 16:42

Hi all, just looking into this for a force feedback Steering System with X-Sim

one question i have is does the X-Sim software communicate with Arduino over the USB or via a serial port (9 wad D Sub) as my computer does not have one of these

Thanks

Rich
RichP
 
Posts: 3
Joined: Tue 19. Feb 2013, 13:31
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Controllers and Drivers Projects

Who is online

Users browsing this forum: No registered users and 2 guests