Torque

Forums

Forums

Guest  

Show or hide header
Welcome Guest, posting in this forum require registration.




Torque » Torque OBD ECU Scanner » Torque Discussion / Ideas » Arduino-code send data

Pages: [1]
Author Topic: Arduino-code send data
stroker88
Member
Posts: 2
Post Arduino-code send data
on: May 25, 2016 (GMT)

I want to use the new arduino-code
https://torque-bhp.com/wiki/Arduino_code
for an ebike projekt.Send data from the arduino board to torque via the torque “GETSENSORS” command works fine, but in the opposite direction, with the “SETSENSOR” command, it doesnt work, nothing is send to the arduino, i cannot set any pins. I tried it with the “Send” Button and various strings, the wrong way? What is the sequence in torque to send “SETSENSOR” commands from torque to arduino?

tg1968
Member
Posts: 1
Post Re: Arduino-code send data
on: July 9, 2016 (GMT)

Hi Stroker88, did you get any info on this?
I am trying the same thing at the moment, I managed to get a LED to turn on and off on the Arduino module but only using the “Test Command” feature within the “Set command to send” screen.
Once I accept the command and press the newly configured button it does nothing. It does not seem to send the command I entered.

Has anyone been able to make this work?

tgrandahl
Member
Posts: 10
Post Re: Arduino-code send data
on: August 15, 2016 (GMT)

Just ran into the same problem. Looks like the syntax for sending data given the example Arduino code is S(output pin):(output value). So i’m using S13:1 to enable the Arduino LED on pin 13 and its working fine with the test command button.

I have noticed that if i repeatedly press the test command button Torque eventually hangs and resets the connection to the “adapter”. I’m guessing that torque is waiting for a specific response here and its not getting it.

Whats this raw OBD command sending feature usually used for?

piemmm
Administrator
Posts: 6629
Post Re: Arduino-code send data
on: August 15, 2016 (GMT)

Hi!

I’m going to look into this this week – analogue data sending wasn’t complete (still on the to-do list) but digital pins should work. I need to set the arduino up again and get this fixed if there’s an issue. Will try to get this into the next update as well

tgrandahl
Member
Posts: 10
Post Re: Arduino-code send data
on: August 15, 2016 (GMT)

Awesome, thanks!

Digital control does work, but only with the “test command” function under the buttons set “display configuration” -> “command to send” dialogue.

When i send S13:1 using the test command button, i see exactly that command come through in the serial terminal from the Arduino. The arduino reacts as expected.

Then i select “ok” to close the configuration dialogue and lock in the command. After that pressing the button on the display causes it to blink green for a moment, but i dont see the command sent in the arduino terminal.

Similarly, when i set the buttons configuration to Clear Faults, pressing the button causes it to flash green for a moment, but no command other than “G” is seen in the arduino terminal.

This had me suspecting there is a sort of general bug with the button…

1989Marathon
Member
Posts: 18
Post Re: Arduino-code send data
on: August 16, 2016 (GMT)

Analog SETSENSOR works with the TEST button, but not consistently. It never works with the SEND button. From what I can tell, it appears to be either a protocol/parity issue, or the fact that the GETSENSOR command is issued unconditionally of the SETSENSOR command. It sends data every time the TEST button is pressed, but the character string is not correct every time.

piemmm
Administrator
Posts: 6629
Post Re: Arduino-code send data
on: August 18, 2016 (GMT)

Fixed the test command button, and also now sends when the button itself is pressed. Will be in tonights beta update (if you’re subscribed to the beta updates)

Edit: Beta update has now been sent out

1989Marathon
Member
Posts: 18
Post Re: Arduino-code send data
on: August 19, 2016 (GMT)

How do I subscribe to the Beta updates?

diesl
Member
Posts: 26
Post Re: Arduino-code send data
on: August 19, 2016 (GMT)

From what Ian posted in the mode 6 thread, the beta link is

https://play.google.com/apps/testing/org.prowl.torque
(Hope it’s OK to repeat this, since it was a post).

2012 VW JSW TDI w/ DSG

tgrandahl
Member
Posts: 10
Post Re: Arduino-code send data
on: August 20, 2016 (GMT)

Its working for me now in the beta release, this is great. Thanks Ian!

Horst123
Member
Posts: 2
Post Re: Arduino-code send data
on: September 1, 2016 (GMT)

I don´t get “Send Data” working!

I have the Torque Pro Version 1.8.106.

As a button I do the following:

In the view “realtime information”, “Add display” “Push Button” (the last entry in the list) with the type of button “Broadcast Android Intent” (the last entry in the list too). As “Intent to sent” I set 13:1 or S13:1 for setting Pin13 (LED on Arduino board) to ON.

This doesn´t work and in the serial monitor i only see Gs for GETSENSORS but no Ss for SETSENSORS.

ATE0
ATM0
ATL0
ATST62
ATS0
AT@1
ATI
GETCONFIGURATION
GETDEFINITIONS
G
G

When I press the button on the touch screen it becomes green for a short time but nothing happens on the arduino or in the serial monitor showing the commands from torque to the arduino.

What ist wrong?

What about the TEST button and the SEND button mentioned above? What is the difference? Where do I find them?

Is there a description of the protocol between torque and arduino?

Thanks in advance and regards

Horst

Horst123
Member
Posts: 2
Post Re: Arduino-code send data
on: September 2, 2016 (GMT)

I´ve found my error.

For the button the type must be “OBD-Befehl senden” resp. “Send OBD command” but “Android Braodcast what I tryed before.

Pages: [1]
WP-Forum by: Fredrik Fahlstad, Version: 2.4
Page loaded in: 0.067 seconds.

  Follow me on twitter